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

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

Issue 879233003: Initial RemoteCommandService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remote-commands
Patch Set: comments grammar fixes; fix win compile Created 5 years, 10 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.cc
diff --git a/components/policy/core/common/cloud/cloud_policy_core.cc b/components/policy/core/common/cloud/cloud_policy_core.cc
index dd9f46eb30158c901649bfd15db83b41352e2d54..19e1470a170d801164b4fd3065fe769556e82865 100644
--- a/components/policy/core/common/cloud/cloud_policy_core.cc
+++ b/components/policy/core/common/cloud/cloud_policy_core.cc
@@ -11,6 +11,8 @@
#include "components/policy/core/common/cloud/cloud_policy_refresh_scheduler.h"
#include "components/policy/core/common/cloud/cloud_policy_service.h"
#include "components/policy/core/common/cloud/cloud_policy_store.h"
+#include "components/policy/core/common/remote_commands/remote_commands_factory.h"
bartfab (slow) 2015/02/18 11:12:53 Nit: You do not need this include as you never der
binjin 2015/02/18 15:37:50 Looks like it's required for default deleter due t
bartfab (slow) 2015/02/23 13:13:56 Interesting. You learn something new every day :).
binjin 2015/02/24 05:29:49 Acknowledged.
+#include "components/policy/core/common/remote_commands/remote_commands_service.h"
namespace policy {
@@ -46,6 +48,18 @@ void CloudPolicyCore::Disconnect() {
client_.reset();
}
+void CloudPolicyCore::StartRemoteCommandsService(
+ scoped_ptr<RemoteCommandsFactory> factory) {
+ DCHECK(client_);
+ DCHECK(factory);
+
+ remote_commands_service_.reset(
+ new RemoteCommandsService(factory.Pass(), client_.get()));
+
+ // Do an initial remote commands fetching immediately.
+ remote_commands_service_->FetchRemoteCommands();
+}
+
void CloudPolicyCore::RefreshSoon() {
if (refresh_scheduler_)
refresh_scheduler_->RefreshSoon();

Powered by Google App Engine
This is Rietveld 408576698