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

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: minor fixes 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"
+#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_);
bartfab (slow) 2015/02/28 00:01:22 Nit 1: #include "base/logging.h" Nit 2: Is it wort
binjin 2015/02/28 02:18:05 1. Done. 2. Not sure, but I didn't see any guarant
bartfab (slow) 2015/03/10 16:09:20 remote_commands_service_->FetchRemoteCommands() a
binjin 2015/03/12 11:03:15 Acknowledged.
+ DCHECK(factory);
+
+ remote_commands_service_.reset(
+ new RemoteCommandsService(factory.Pass(), client_.get()));
+
+ // Do an initial remote commands fetching immediately.
bartfab (slow) 2015/02/28 00:01:22 Nit: s/fetching/fetch/
binjin 2015/02/28 02:18:05 Done.
+ remote_commands_service_->FetchRemoteCommands();
+}
+
void CloudPolicyCore::RefreshSoon() {
if (refresh_scheduler_)
refresh_scheduler_->RefreshSoon();

Powered by Google App Engine
This is Rietveld 408576698