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

Unified Diff: chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc

Issue 19733003: Implement cloud policy invalidations using the invalidation service framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 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: chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc
index dcc41d53f36de4559b883a22025c3321a30ff008..e0820066c117e8adac2ae8a3aad85a8cd3e92c61 100644
--- a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc
+++ b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc
@@ -148,7 +148,7 @@ void UserCloudPolicyManagerChromeOS::OnInitializationCompleted(
// Start the refresh scheduler now, which will eventually refresh the
// cached policy or make the first fetch once the OAuth2 token is
// available.
- StartRefreshScheduler();
+ StartRefreshSchedulerIfReady();
}
}
@@ -188,7 +188,7 @@ void UserCloudPolicyManagerChromeOS::OnComponentCloudPolicyRefreshNeeded() {
void UserCloudPolicyManagerChromeOS::OnComponentCloudPolicyUpdated() {
CheckAndPublishPolicy();
- StartRefreshScheduler();
+ StartRefreshSchedulerIfReady();
}
void UserCloudPolicyManagerChromeOS::FetchPolicyOAuthTokenUsingSigninProfile() {
@@ -252,10 +252,10 @@ void UserCloudPolicyManagerChromeOS::CancelWaitForPolicyFetch() {
CheckAndPublishPolicy();
// Now that |wait_for_policy_fetch_| is guaranteed to be false, the scheduler
// can be started.
- StartRefreshScheduler();
+ StartRefreshSchedulerIfReady();
}
-void UserCloudPolicyManagerChromeOS::StartRefreshScheduler() {
+void UserCloudPolicyManagerChromeOS::StartRefreshSchedulerIfReady() {
if (core()->refresh_scheduler())
return; // Already started.
@@ -273,7 +273,7 @@ void UserCloudPolicyManagerChromeOS::StartRefreshScheduler() {
return;
}
- core()->StartRefreshScheduler();
+ StartRefreshScheduler();
core()->TrackRefreshDelayPref(local_state_, prefs::kUserPolicyRefreshRate);
}

Powered by Google App Engine
This is Rietveld 408576698