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

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

Issue 9414020: [Sync] Switch Extension Settings DTC to use ProfilesyncComponentsFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DCHECK Created 8 years, 10 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.h
diff --git a/chrome/browser/extensions/settings/settings_frontend.h b/chrome/browser/extensions/settings/settings_frontend.h
index c651bb2805b490e26325be19018e7887150cae04..bb181e4125527761c68a53d2d6f7c67cd81d01e6 100644
--- a/chrome/browser/extensions/settings/settings_frontend.h
+++ b/chrome/browser/extensions/settings/settings_frontend.h
@@ -27,7 +27,8 @@ class SettingsStorage;
// The component of extension settings which runs on the UI thread, as opposed
// to SettingsBackend which lives on the FILE thread.
-// All public methods must be called on the UI thread.
+// All public methods, must be called on the UI thread, with the exception of
+// GetBackendForSync(), which must be called on the FILE thread.
class SettingsFrontend {
public:
// Creates with the default factory. Ownership of |profile| not taken.
@@ -45,10 +46,9 @@ class SettingsFrontend {
typedef base::Callback<void(SyncableService*)> SyncableServiceCallback;
typedef base::Callback<void(SettingsStorage*)> StorageCallback;
- // 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);
+ // Must only be called from the FILE thread. |type| should be either
+ // APP_SETTINGS or EXTENSION_SETTINGS.
+ SyncableService* GetBackendForSync(syncable::ModelType type) const;
// Runs |callback| on the FILE thread with the storage area for
// |extension_id|. If there is no extension with that ID, the storage area
@@ -87,8 +87,7 @@ class SettingsFrontend {
// Ref-counted container for each SettingsBackend object. There are 4: an
// apps and an extensions Backend for the LOCAL namespace, and likewise for
// the SYNC namespace. They only differ in what directory the database for
- // each exists in (and the Backends in the SYNC namespace happen to be
- // returned from RunWithSyncableService).
+ // each exists in.
class BackendWrapper;
struct BackendWrappers {
BackendWrappers();
« no previous file with comments | « chrome/browser/extensions/settings/settings_apitest.cc ('k') | chrome/browser/extensions/settings/settings_frontend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698