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