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

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

Issue 8586030: Added ConfigurationPolicyProvider::RefreshPolicies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 9 years, 1 month 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/cloud_policy_cache_base.h ('k') | chrome/browser/policy/cloud_policy_provider_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/cloud_policy_cache_base.cc
diff --git a/chrome/browser/policy/cloud_policy_cache_base.cc b/chrome/browser/policy/cloud_policy_cache_base.cc
index 6e88043fc6e6de4f971f80cf757213317864ffcd..57118f4bcd2ddaa66425c3ced9aa952fd517ea6a 100644
--- a/chrome/browser/policy/cloud_policy_cache_base.cc
+++ b/chrome/browser/policy/cloud_policy_cache_base.cc
@@ -25,6 +25,11 @@ CloudPolicyCacheBase::~CloudPolicyCacheBase() {
FOR_EACH_OBSERVER(Observer, observer_list_, OnCacheGoingAway(this));
}
+void CloudPolicyCacheBase::SetFetchingDone() {
+ // NotifyObservers only fires notifications if the cache is ready.
+ NotifyObservers();
+}
+
void CloudPolicyCacheBase::AddObserver(Observer* observer) {
observer_list_.AddObserver(observer);
}
@@ -109,8 +114,6 @@ bool CloudPolicyCacheBase::SetPolicyInternal(
kMetricPolicySize);
}
- NotifyObservers();
-
InformNotifier(CloudPolicySubsystem::SUCCESS,
CloudPolicySubsystem::NO_DETAILS);
return true;
@@ -122,8 +125,6 @@ void CloudPolicyCacheBase::SetUnmanagedInternal(const base::Time& timestamp) {
mandatory_policy_.Clear();
recommended_policy_.Clear();
last_policy_refresh_time_ = timestamp;
-
- NotifyObservers();
}
void CloudPolicyCacheBase::SetReady() {
« no previous file with comments | « chrome/browser/policy/cloud_policy_cache_base.h ('k') | chrome/browser/policy/cloud_policy_provider_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698