 Chromium Code Reviews
 Chromium Code Reviews Issue 879233003:
  Initial RemoteCommandService  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@remote-commands
    
  
    Issue 879233003:
  Initial RemoteCommandService  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@remote-commands| 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(); |