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

Unified Diff: components/sync_driver/sync_api_component_factory.h

Issue 1421003007: [Sync] Componentize ProfileSyncComponentsFactoryImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix sessions api test Created 5 years, 1 month 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: components/sync_driver/sync_api_component_factory.h
diff --git a/components/sync_driver/sync_api_component_factory.h b/components/sync_driver/sync_api_component_factory.h
index 937fd73c6333c6fc2e5e0d82d313b7de93b823f5..d64bba157b7cf149618b60fbb5fb0eaf23665025 100644
--- a/components/sync_driver/sync_api_component_factory.h
+++ b/components/sync_driver/sync_api_component_factory.h
@@ -57,6 +57,13 @@ class SyncService;
class SyncApiComponentFactory {
public:
virtual ~SyncApiComponentFactory() {}
+ // Callback to allow platform-specific datatypes to register themselves as
+ // data type controllers.
+ // |disabled_types| and |enabled_types| control the disable/enable state of
+ // types that are on or off by default (respectively).
+ typedef base::Callback<void(syncer::ModelTypeSet disabled_types,
+ syncer::ModelTypeSet enabled_types)>
+ RegisterDataTypesMethod;
// The various factory methods for the data type model associators
// and change processors all return this struct. This is needed
@@ -80,7 +87,8 @@ class SyncApiComponentFactory {
};
// Creates and registers enabled datatypes with the provided SyncClient.
- virtual void RegisterDataTypes(sync_driver::SyncClient* sync_client) = 0;
+ virtual void RegisterDataTypes(
+ const RegisterDataTypesMethod& register_platform_types_method) = 0;
// Instantiates a new DataTypeManager with a SyncBackendHost, a list of data
// type controllers and a DataTypeManagerObserver. The return pointer is
@@ -96,7 +104,6 @@ class SyncApiComponentFactory {
// Creating this in the factory helps us mock it out in testing.
virtual browser_sync::SyncBackendHost* CreateSyncBackendHost(
const std::string& name,
- SyncClient* sync_client,
invalidation::InvalidationService* invalidator,
const base::WeakPtr<sync_driver::SyncPrefs>& sync_prefs,
const base::FilePath& sync_folder) = 0;
« no previous file with comments | « components/sync_driver/shared_change_processor_unittest.cc ('k') | components/sync_driver/sync_api_component_factory_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698