New DBus methods to enable/disable P2P update sharing.

This patch adds two new methods to enable/disable sharing updates
over P2P in the local network. This allows a crosh command to set
and get this flag to enable or disable this feature.

BUG=chromium:260441
TEST=Manual test. See below.

Manual test procedure.
1. Enable P2P:
update_engine_client -p2p_update yes -show_p2p_update

[0829/141039:INFO:update_engine_client.cc(433)] Current update using P2P setting: ENABLED
[0829/141039:INFO:update_engine_client.cc(500)] Done.

2. Start the p2p server (this will be done by the p2p_manager
   as part of the update_engine procedure).

3. Run an update check
update_engine_client -check_for_update

The /var/log/update_engine.log shows the following line confirming
p2p is enabled.
[0829/141317:INFO:p2p_manager.cc(194)] Returning value 1 for whether p2p is enabled.

4. Disable p2p and verify the p2p server is not running.
update_engine_client -p2p_update no -show_p2p_update

[0829/141039:INFO:update_engine_client.cc(433)] Current update using P2P setting: ENABLED
[0829/141039:INFO:update_engine_client.cc(500)] Done.

5. Verify p2p server is not running (ps aux | grep p2p doesn't show
p2p-server)

Change-Id: I3215e2961be440c491f669d4c580bbf87f7fec25
Reviewed-on: https://chromium-review.googlesource.com/62505
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Commit-Queue: Alejandro Deymo <deymo@chromium.org>
Tested-by: Alejandro Deymo <deymo@chromium.org>
diff --git a/UpdateEngine.conf b/UpdateEngine.conf
index 5c259b4..a89bcac 100644
--- a/UpdateEngine.conf
+++ b/UpdateEngine.conf
@@ -36,6 +36,12 @@
            send_member="GetChannel"/>
     <allow send_destination="org.chromium.UpdateEngine"
            send_interface="org.chromium.UpdateEngineInterface"
+           send_member="SetP2PUpdatePermission"/>
+    <allow send_destination="org.chromium.UpdateEngine"
+           send_interface="org.chromium.UpdateEngineInterface"
+           send_member="GetP2PUpdatePermission"/>
+    <allow send_destination="org.chromium.UpdateEngine"
+           send_interface="org.chromium.UpdateEngineInterface"
            send_member="SetUpdateOverCellularPermission"/>
     <allow send_destination="org.chromium.UpdateEngine"
            send_interface="org.chromium.UpdateEngineInterface"