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, |