Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(481)

Unified Diff: components/policy/core/common/cloud/cloud_policy_core.h

Issue 879233003: Initial RemoteCommandService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remote-commands
Patch Set: rebase, fixes addressing #31 Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/policy/core/common/cloud/cloud_policy_core.h
diff --git a/components/policy/core/common/cloud/cloud_policy_core.h b/components/policy/core/common/cloud/cloud_policy_core.h
index c8e6e5987718640fc7a64f52aba25886a23e74ba..031aa34000961d81081d50c43ac335e1c1b37b6c 100644
--- a/components/policy/core/common/cloud/cloud_policy_core.h
+++ b/components/policy/core/common/cloud/cloud_policy_core.h
@@ -26,6 +26,8 @@ class CloudPolicyClient;
class CloudPolicyRefreshScheduler;
class CloudPolicyService;
class CloudPolicyStore;
+class RemoteCommandsFactory;
+class RemoteCommandsService;
// CloudPolicyCore glues together the ingredients that are essential for
// obtaining a fully-functional cloud policy system: CloudPolicyClient and
@@ -73,12 +75,24 @@ class POLICY_EXPORT CloudPolicyCore {
return refresh_scheduler_.get();
}
+ RemoteCommandsService* remote_commands_service() {
+ return remote_commands_service_.get();
+ }
+ const RemoteCommandsService* remote_commands_service() const {
+ return remote_commands_service_.get();
+ }
+
// Initializes the cloud connection.
void Connect(scoped_ptr<CloudPolicyClient> client);
// Shuts down the cloud connection.
void Disconnect();
+ // Starts a remote commands service, with the provided factory. Will attempt
+ // to fetch commands immediately, thus requiring the cloud policy client to
+ // be registered.
+ void StartRemoteCommandsService(scoped_ptr<RemoteCommandsFactory> factory);
+
// Requests a policy refresh to be performed soon. This may apply throttling,
// and the request may not be immediately sent.
void RefreshSoon();
@@ -108,6 +122,7 @@ class POLICY_EXPORT CloudPolicyCore {
scoped_ptr<CloudPolicyClient> client_;
scoped_ptr<CloudPolicyService> service_;
scoped_ptr<CloudPolicyRefreshScheduler> refresh_scheduler_;
+ scoped_ptr<RemoteCommandsService> remote_commands_service_;
scoped_ptr<IntegerPrefMember> refresh_delay_;
ObserverList<Observer, true> observers_;

Powered by Google App Engine
This is Rietveld 408576698