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

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 f08c1a083c8111d372505474f4cff6ea37e0cc6d..388e8e98b196ffdb1621cef91c9a5517f1a99574 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() {
@@ -250,10 +250,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.
@@ -271,7 +271,7 @@ void UserCloudPolicyManagerChromeOS::StartRefreshScheduler() {
return;
}
- core()->StartRefreshScheduler();
+ StartRefreshScheduler();
core()->TrackRefreshDelayPref(local_state_, prefs::kUserPolicyRefreshRate);
}

Powered by Google App Engine
This is Rietveld 408576698