Chromium Code Reviews| 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; |