p2p: Make P2PManager available from the SystemState singleton

BUG=chromium:260426
TEST=Unit tests pass
Change-Id: Iadaa531d631c8d7268f35d512ff33f8d53e1cc5e
Reviewed-on: https://chromium-review.googlesource.com/64828
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Commit-Queue: David Zeuthen <zeuthen@chromium.org>
Tested-by: David Zeuthen <zeuthen@chromium.org>
diff --git a/real_system_state.h b/real_system_state.h
index c51094e..fa7b544 100644
--- a/real_system_state.h
+++ b/real_system_state.h
@@ -14,6 +14,7 @@
 #include <update_engine/payload_state.h>
 #include <update_engine/prefs.h>
 #include <update_engine/update_attempter.h>
+#include <update_engine/p2p_manager.h>
 
 namespace chromeos_update_engine {
 
@@ -79,6 +80,10 @@
     return &request_params_;
   }
 
+  virtual inline P2PManager* p2p_manager() {
+    return p2p_manager_.get();
+  }
+
   virtual inline bool system_rebooted(){
     return system_rebooted_;
   }
@@ -130,6 +135,8 @@
   // Common parameters for all Omaha requests.
   OmahaRequestParams request_params_;
 
+  scoped_ptr<P2PManager> p2p_manager_;
+
   // If true, this is the first instance of the update engine since the system
   // rebooted. Important for tracking whether you are running instance of the
   // update engine on first boot or due to a crash/restart.