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

Unified Diff: chrome/browser/extensions/syncable_extension_settings_storage.h

Issue 8177022: Add onChanged events to the extension settings API, both from sync and between (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 2 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/syncable_extension_settings_storage.h
diff --git a/chrome/browser/extensions/syncable_extension_settings_storage.h b/chrome/browser/extensions/syncable_extension_settings_storage.h
index 39f4607001efe39c275d36f9630e5b64bc7277dc..ec7d1d758f925d9479a0f66f27ff8b38dd1022f5 100644
--- a/chrome/browser/extensions/syncable_extension_settings_storage.h
+++ b/chrome/browser/extensions/syncable_extension_settings_storage.h
@@ -8,7 +8,9 @@
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
+#include "base/observer_list_threadsafe.h"
#include "base/values.h"
+#include "chrome/browser/extensions/extension_settings_observer.h"
#include "chrome/browser/extensions/extension_settings_storage.h"
#include "chrome/browser/extensions/extension_setting_sync_data.h"
#include "chrome/browser/sync/api/syncable_service.h"
@@ -18,6 +20,8 @@
class SyncableExtensionSettingsStorage : public ExtensionSettingsStorage {
public:
explicit SyncableExtensionSettingsStorage(
+ // Reference taken.
+ ObserverListThreadSafe<ExtensionSettingsObserver>* observers,
akalin 2011/10/07 21:06:23 const ref to scoped_ptr
not at google - send to devlin 2011/10/10 01:00:16 Done.
std::string extension_id,
akalin 2011/10/07 21:06:23 const ref to string
not at google - send to devlin 2011/10/10 01:00:16 Done.
// Ownership taken.
ExtensionSettingsStorage* delegate);
@@ -62,6 +66,9 @@ class SyncableExtensionSettingsStorage : public ExtensionSettingsStorage {
SyncError OverwriteLocalSettingsWithSync(
const DictionaryValue& sync_state, const DictionaryValue& settings);
+ // List of observers to settings changes.
+ scoped_refptr<ObserverListThreadSafe<ExtensionSettingsObserver> > observers_;
+
// Id of the extension these settings are for.
std::string const extension_id_;

Powered by Google App Engine
This is Rietveld 408576698