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

Unified Diff: chrome/browser/policy/cloud/component_cloud_policy_store.cc

Issue 72793003: ComponentCloudPolicyService tracks the signin state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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/component_cloud_policy_store.cc
diff --git a/chrome/browser/policy/cloud/component_cloud_policy_store.cc b/chrome/browser/policy/cloud/component_cloud_policy_store.cc
index a6c8d629dc8cdc7f2e24230ec5ee22a64282edb1..6ce6ea1e7cf37f1c92a7589bb007dd4768da51b0 100644
--- a/chrome/browser/policy/cloud/component_cloud_policy_store.cc
+++ b/chrome/browser/policy/cloud/component_cloud_policy_store.cc
@@ -231,6 +231,20 @@ void ComponentCloudPolicyStore::Purge(
delegate_->OnComponentCloudPolicyStoreUpdated();
}
+void ComponentCloudPolicyStore::Clear() {
+ const std::set<std::string> empty;
bartfab (slow) 2013/11/18 13:15:39 Nit: Not used.
Joao da Silva 2013/11/18 14:54:18 Eh, what is this doing here :-) Done
+ for (size_t i = 0; i < arraysize(kDomains); ++i) {
+ cache_->Clear(kDomains[i].proto_cache_key);
+ cache_->Clear(kDomains[i].data_cache_key);
+ }
+ cached_hashes_.clear();
+ const PolicyBundle empty_bundle;
+ if (!policy_bundle_.Equals(empty_bundle)) {
+ policy_bundle_.Clear();
+ delegate_->OnComponentCloudPolicyStoreUpdated();
+ }
+}
+
bool ComponentCloudPolicyStore::ValidatePolicy(
scoped_ptr<em::PolicyFetchResponse> proto,
PolicyNamespace* ns,

Powered by Google App Engine
This is Rietveld 408576698