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

Unified Diff: chrome/browser/policy/user_cloud_policy_manager.cc

Issue 12220060: Load policy before signin completes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with ToT. Created 7 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
« no previous file with comments | « chrome/browser/policy/user_cloud_policy_manager.h ('k') | chrome/browser/policy/user_cloud_policy_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « chrome/browser/policy/user_cloud_policy_manager.h ('k') | chrome/browser/policy/user_cloud_policy_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698