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

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

Issue 8375047: Separate the syncing of extension settings and app settings into separate data (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/extension_settings_frontend.h
diff --git a/chrome/browser/extensions/extension_settings_frontend.h b/chrome/browser/extensions/extension_settings_frontend.h
index 104da18ef18517efe1a1eb6e88f74f7ccf6287c2..8e0dfc6615eba074a349bdde477422491873a9cb 100644
--- a/chrome/browser/extensions/extension_settings_frontend.h
+++ b/chrome/browser/extensions/extension_settings_frontend.h
@@ -18,7 +18,6 @@
class FilePath;
class Profile;
-class ExtensionSettingsBackend;
class ExtensionSettingsStorage;
// The component of extension settings which runs on the UI thread, as opposed
@@ -28,16 +27,26 @@ class ExtensionSettingsFrontend : public content::NotificationObserver {
explicit ExtensionSettingsFrontend(Profile* profile);
virtual ~ExtensionSettingsFrontend();
- typedef base::Callback<void(ExtensionSettingsBackend*)> BackendCallback;
+ typedef base::Callback<void(SyncableService*)> SyncableServiceCallback;
+ typedef base::Callback<void(ExtensionSettingsStorage*)> StorageCallback;
- // Runs |callback| on the FILE thread with the extension settings.
- void RunWithBackend(const BackendCallback& callback);
+ // Runs |callback| on the FILE thread with the SyncableService for
+ // |model_type|, either EXTENSION_SETTINGS or APP_SETTINGS.
+ void RunWithSyncableService(
+ syncable::ModelType model_type, const SyncableServiceCallback& callback);
- // Adds an observer to settings changes.
- void AddObserver(ExtensionSettingsObserver* observer);
+ // Runs |callback| on the FILE thread with the storage area for
+ // |extension_id|. If there is no extension with that ID, the storage area
+ // will be NULL.
+ void RunWithStorage(
+ const std::string& extension_id, const StorageCallback& callback);
- // Removes an observer to settings changes.
- void RemoveObserver(ExtensionSettingsObserver* observer);
+ // Deletes the settings for an extension on the FILE thread. Must be called
+ // from the UI thread.
akalin 2011/10/28 06:04:54 The comment re. UI thread is correct, but it also
not at google - send to devlin 2011/10/31 00:02:23 Done.
+ void DeleteStorageSoon(const std::string& extension_id);
+
+ // Gets the thread-safe observer list.
+ scoped_refptr<ExtensionSettingsObserverList> GetObservers();
// NotificationObserver implementation.
virtual void Observe(
@@ -70,7 +79,7 @@ class ExtensionSettingsFrontend : public content::NotificationObserver {
Profile* const profile_;
// List of observers to settings changes.
- scoped_refptr<ObserverListThreadSafe<ExtensionSettingsObserver> > observers_;
+ scoped_refptr<ExtensionSettingsObserverList> observers_;
// The default original and incognito mode profile observers.
scoped_ptr<DefaultObserver> original_profile_observer;

Powered by Google App Engine
This is Rietveld 408576698