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

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..f770eed22de35ca6309e91f7fc1421a1a8232490 100644
--- a/chrome/browser/policy/cloud/component_cloud_policy_store.cc
+++ b/chrome/browser/policy/cloud/component_cloud_policy_store.cc
@@ -231,6 +231,19 @@ void ComponentCloudPolicyStore::Purge(
delegate_->OnComponentCloudPolicyStoreUpdated();
}
+void ComponentCloudPolicyStore::Clear() {
+ 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,
« no previous file with comments | « chrome/browser/policy/cloud/component_cloud_policy_store.h ('k') | chrome/browser/policy/cloud/resource_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698