Index: chrome/browser/policy/user_cloud_policy_manager.cc |
diff --git a/chrome/browser/policy/user_cloud_policy_manager.cc b/chrome/browser/policy/user_cloud_policy_manager.cc |
index b0c2367f6f97d7f21d55c2d37d35eb3b76e4f4f2..e0e71a05e166842289bf71253af7371ccfc30eb0 100644 |
--- a/chrome/browser/policy/user_cloud_policy_manager.cc |
+++ b/chrome/browser/policy/user_cloud_policy_manager.cc |
@@ -33,16 +33,22 @@ UserCloudPolicyManager::~UserCloudPolicyManager() { |
} |
void UserCloudPolicyManager::Connect( |
- PrefService* local_state, |
- DeviceManagementService* device_management_service) { |
- core()->Connect( |
- make_scoped_ptr(new CloudPolicyClient(std::string(), std::string(), |
- USER_AFFILIATION_NONE, |
- NULL, device_management_service))); |
+ PrefService* local_state, scoped_ptr<CloudPolicyClient> client) { |
+ core()->Connect(client.Pass()); |
core()->StartRefreshScheduler(); |
core()->TrackRefreshDelayPref(local_state, prefs::kUserPolicyRefreshRate); |
} |
+// static |
+scoped_ptr<CloudPolicyClient> |
+UserCloudPolicyManager::CreateCloudPolicyClient( |
+ DeviceManagementService* device_management_service) { |
+ return make_scoped_ptr( |
+ new CloudPolicyClient(std::string(), std::string(), |
+ USER_AFFILIATION_NONE, |
+ NULL, device_management_service)).Pass(); |
+} |
+ |
void UserCloudPolicyManager::DisconnectAndRemovePolicy() { |
core()->Disconnect(); |
store_->Clear(); |