Index: chrome/browser/policy/user_policy_cache.h |
diff --git a/chrome/browser/policy/user_policy_cache.h b/chrome/browser/policy/user_policy_cache.h |
index c98adfefbf0ec4cf33e79dba75932eaf35c06daf..c91a25bbb6c3e2f9c82afc56b411a26d58b950ce 100644 |
--- a/chrome/browser/policy/user_policy_cache.h |
+++ b/chrome/browser/policy/user_policy_cache.h |
@@ -8,6 +8,7 @@ |
#include <string> |
+#include "base/callback.h" |
#include "base/memory/ref_counted.h" |
#include "base/memory/weak_ptr.h" |
#include "base/values.h" |
@@ -37,8 +38,10 @@ class UserPolicyCache : public CloudPolicyCacheBase, |
// |backing_file_path| is the path to the cache file. |
// |wait_for_policy_fetch| is true if the cache should be ready only after |
// an attempt was made to fetch user policy. |
+ // If |callback| is not null, it will be invoked once the cache is ready. |
UserPolicyCache(const FilePath& backing_file_path, |
- bool wait_for_policy_fetch); |
+ bool wait_for_policy_fetch, |
+ const base::Closure& callback); |
virtual ~UserPolicyCache(); |
// CloudPolicyCacheBase implementation: |
@@ -94,6 +97,9 @@ class UserPolicyCache : public CloudPolicyCacheBase, |
// fetched policy, or if there is no need to wait for that. |
bool fetch_ready_; |
+ // Callback to invoke when the cache becomes ready. |
+ base::Closure ready_callback_; |
+ |
DISALLOW_COPY_AND_ASSIGN(UserPolicyCache); |
}; |