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

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..32b2d739ebff46cfa81a2451d7379f3817291e87 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,7 +20,9 @@
class SyncableExtensionSettingsStorage : public ExtensionSettingsStorage {
public:
explicit SyncableExtensionSettingsStorage(
- std::string extension_id,
+ const scoped_refptr<ObserverListThreadSafe<ExtensionSettingsObserver> >&
+ observers,
+ const std::string& extension_id,
// 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_;
akalin 2011/10/12 22:26:30 const scoped_refptr
not at google - send to devlin 2011/10/13 06:40:43 Done.
+
// Id of the extension these settings are for.
std::string const extension_id_;

Powered by Google App Engine
This is Rietveld 408576698