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

Unified Diff: chrome/browser/extensions/settings/settings_frontend.cc

Issue 10807086: Trigger chrome.storage.onChanged events for policy updates on the 'managed' namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased, addressed comments, fixed ManagedStorageDisabled test Created 8 years, 5 months 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/extensions/settings/settings_frontend.cc
diff --git a/chrome/browser/extensions/settings/settings_frontend.cc b/chrome/browser/extensions/settings/settings_frontend.cc
index 33342925f9ff969dd8a2584385747f8c6e9bd4ec..137964bba62d5aac3e6a3140884a13632bc5f82c 100644
--- a/chrome/browser/extensions/settings/settings_frontend.cc
+++ b/chrome/browser/extensions/settings/settings_frontend.cc
@@ -117,7 +117,7 @@ SettingsFrontend::SettingsFrontend(
#if defined(ENABLE_CONFIGURATION_POLICY)
caches_[settings_namespace::MANAGED] =
- new ManagedValueStoreCache(profile->GetPolicyService());
+ new ManagedValueStoreCache(profile->GetPolicyService(), observers_);
#endif
}
@@ -128,6 +128,7 @@ SettingsFrontend::~SettingsFrontend() {
// after any other task that might've been posted before.
for (CacheMap::iterator it = caches_.begin(); it != caches_.end(); ++it) {
ValueStoreCache* cache = it->second;
+ cache->ShutdownOnUI();
cache->GetMessageLoop()->DeleteSoon(FROM_HERE, cache);
}
}
@@ -201,6 +202,7 @@ void SettingsFrontend::DisableStorageForTesting(
CacheMap::iterator it = caches_.find(settings_namespace);
if (it != caches_.end()) {
ValueStoreCache* cache = it->second;
+ cache->ShutdownOnUI();
cache->GetMessageLoop()->DeleteSoon(FROM_HERE, cache);
caches_.erase(it);
}
« no previous file with comments | « chrome/browser/extensions/settings/settings_apitest.cc ('k') | chrome/browser/extensions/settings/value_store_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698