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

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

Issue 8499021: UserPolicyCache only becomes ready after policy has been fetched. (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
Index: chrome/browser/policy/cloud_policy_cache_base.h
diff --git a/chrome/browser/policy/cloud_policy_cache_base.h b/chrome/browser/policy/cloud_policy_cache_base.h
index f7c45eafcc808f677a38f6dccc523da11368cc37..69869527689626a954051372ea760931c6e09ae5 100644
--- a/chrome/browser/policy/cloud_policy_cache_base.h
+++ b/chrome/browser/policy/cloud_policy_cache_base.h
@@ -53,6 +53,12 @@ class CloudPolicyCacheBase : public base::NonThreadSafe {
virtual void SetPolicy(const em::PolicyFetchResponse& policy) = 0;
virtual void SetUnmanaged() = 0;
+
+ // Invoked whenever an attempt to fetch policy has been completed. The fetch
+ // may or may not have suceeded. This can be triggered by failed attempts to
+ // fetch oauth tokens, register with dmserver or fetch policy.
+ virtual void SetFetchingDone() = 0;
+
bool is_unmanaged() const {
return is_unmanaged_;
}
@@ -78,10 +84,10 @@ class CloudPolicyCacheBase : public base::NonThreadSafe {
void Reset();
// true if the cache contains data that is ready to be served as policies.
- // This should mean that this method turns true as soon as a round-trip to
- // the local policy storage is complete. The creation of the Profile is
- // blocked on this method, so we shouldn't wait for successful network
- // round trips.
+ // This usually means that the local policy storage has been loaded.
+ // Note that Profile creation will block until the cache is ready.
+ // On enrolled devices and for users of the enrolled domain, the cache only
+ // becomes ready after a user policy fetch is completed.
bool IsReady();
protected:

Powered by Google App Engine
This is Rietveld 408576698