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/system_state.h b/system_state.h
index 08092f1..f4bd19c 100644
--- a/system_state.h
+++ b/system_state.h
@@ -24,6 +24,7 @@
class PayloadStateInterface;
class GpioHandler;
class UpdateAttempter;
+class P2PManager;
// An interface to global system context, including platform resources,
// the current state of the system, high-level objects whose lifetime is same
@@ -83,6 +84,9 @@
// common to all Omaha requests.
virtual OmahaRequestParams* request_params() = 0;
+ // Returns a pointer to the P2PManager singleton.
+ virtual P2PManager* p2p_manager() = 0;
+
// If true, this is the first instance of the update engine since the system
// restarted. Important for tracking whether you are running instance of the
// update engine on first boot or due to a crash/restart.