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

Unified Diff: chrome/browser/sync/chrome_sync_client.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: chrome/browser/sync/chrome_sync_client.h
diff --git a/chrome/browser/sync/chrome_sync_client.h b/chrome/browser/sync/chrome_sync_client.h
index 7d16e8a62293e8032993ba729913ef483a4926b7..f43249e6b61172c1a4ffbe8d52b77ac3b23a1c86 100644
--- a/chrome/browser/sync/chrome_sync_client.h
+++ b/chrome/browser/sync/chrome_sync_client.h
@@ -21,9 +21,7 @@ namespace browser_sync {
class ChromeSyncClient : public sync_driver::SyncClient {
public:
- ChromeSyncClient(
- Profile* profile,
- scoped_ptr<sync_driver::SyncApiComponentFactory> component_factory);
+ explicit ChromeSyncClient(Profile* profile);
~ChromeSyncClient() override;
// SyncClient implementation.
@@ -37,6 +35,8 @@ class ChromeSyncClient : public sync_driver::SyncClient {
sync_driver::ClearBrowsingDataCallback GetClearBrowsingDataCallback()
override;
base::Closure GetPasswordStateChangedCallback() override;
+ sync_driver::SyncApiComponentFactory::RegisterDataTypesMethod
+ GetRegisterPlatformTypesCallback() override;
autofill::PersonalDataManager* GetPersonalDataManager() override;
invalidation::InvalidationService* GetInvalidationService() override;
scoped_refptr<autofill::AutofillWebDataService> GetWebDataService() override;
@@ -50,15 +50,29 @@ class ChromeSyncClient : public sync_driver::SyncClient {
syncer::WorkerLoopDestructionObserver* observer) override;
sync_driver::SyncApiComponentFactory* GetSyncApiComponentFactory() override;
- // Helper for testing rollback.
+ // Helpers for overriding getters in tests.
void SetBrowsingDataRemoverObserverForTesting(
BrowsingDataRemover::Observer* observer);
+ void SetSyncApiComponentFactoryForTesting(
+ scoped_ptr<sync_driver::SyncApiComponentFactory> component_factory);
private:
- Profile* const profile_;
+ // Register data types which are enabled on desktop platforms only.
+ // |disabled_types| and |enabled_types| correspond only to those types
+ // being explicitly disabled/enabled by the command line.
+ void RegisterDesktopDataTypes(syncer::ModelTypeSet disabled_types,
+ syncer::ModelTypeSet enabled_types);
+
+ // Register data types which are enabled on Android platforms only.
+ // |disabled_types| and |enabled_types| correspond only to those types
+ // being explicitly disabled/enabled by the command line.
+ void RegisterAndroidDataTypes(syncer::ModelTypeSet disabled_types,
+ syncer::ModelTypeSet enabled_types);
void ClearBrowsingData(base::Time start, base::Time end);
+ Profile* const profile_;
+
// The sync api component factory in use by this client.
scoped_ptr<sync_driver::SyncApiComponentFactory> component_factory_;
@@ -81,6 +95,8 @@ class ChromeSyncClient : public sync_driver::SyncClient {
// Used in integration tests.
BrowsingDataRemover::Observer* browsing_data_remover_observer_;
+ base::WeakPtrFactory<ChromeSyncClient> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(ChromeSyncClient);
};
« no previous file with comments | « chrome/browser/extensions/api/sessions/sessions_apitest.cc ('k') | chrome/browser/sync/chrome_sync_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698