Index: chrome/browser/sync/profile_sync_components_factory_impl.cc |
diff --git a/chrome/browser/sync/profile_sync_components_factory_impl.cc b/chrome/browser/sync/profile_sync_components_factory_impl.cc |
index 77cff331a9f566bd210614d01f82fbfa4190a743..92d0eaa8909cbe12fb85b426e31a4b9b454e4682 100644 |
--- a/chrome/browser/sync/profile_sync_components_factory_impl.cc |
+++ b/chrome/browser/sync/profile_sync_components_factory_impl.cc |
@@ -99,6 +99,38 @@ ProfileSyncComponentsFactoryImpl::~ProfileSyncComponentsFactoryImpl() { |
void ProfileSyncComponentsFactoryImpl::RegisterDataTypes( |
ProfileSyncService* pss) { |
+ RegisterCommonDataTypes(pss); |
+#if !defined(OS_ANDROID) |
+ RegisterDesktopDataTypes(pss); |
+#endif |
+} |
+ |
+void ProfileSyncComponentsFactoryImpl::RegisterCommonDataTypes( |
+ ProfileSyncService* pss) { |
+ // Bookmark sync is enabled by default. Register unless explicitly |
+ // disabled. |
+ if (!command_line_->HasSwitch(switches::kDisableSyncBookmarks)) { |
+ pss->RegisterDataTypeController( |
+ new BookmarkDataTypeController(this, profile_, pss)); |
+ } |
+ |
+ // TypedUrl sync is enabled by default. Register unless explicitly disabled, |
+ // or if saving history is disabled. |
+ if (!profile_->GetPrefs()->GetBoolean(prefs::kSavingBrowserHistoryDisabled) && |
+ !command_line_->HasSwitch(switches::kDisableSyncTypedUrls)) { |
+ pss->RegisterDataTypeController( |
+ new TypedUrlDataTypeController(this, profile_, pss)); |
+ } |
+ |
+ // Session sync is enabled by default. Register unless explicitly disabled. |
+ if (!command_line_->HasSwitch(switches::kDisableSyncTabs)) { |
+ pss->RegisterDataTypeController( |
+ new SessionDataTypeController(this, profile_, pss)); |
+ } |
+} |
+ |
+void ProfileSyncComponentsFactoryImpl::RegisterDesktopDataTypes( |
+ ProfileSyncService* pss) { |
// App sync is enabled by default. Register unless explicitly |
// disabled. |
if (!command_line_->HasSwitch(switches::kDisableSyncApps)) { |
@@ -113,13 +145,6 @@ void ProfileSyncComponentsFactoryImpl::RegisterDataTypes( |
new AutofillDataTypeController(this, profile_, pss)); |
} |
- // Bookmark sync is enabled by default. Register unless explicitly |
- // disabled. |
- if (!command_line_->HasSwitch(switches::kDisableSyncBookmarks)) { |
- pss->RegisterDataTypeController( |
- new BookmarkDataTypeController(this, profile_, pss)); |
- } |
- |
// Extension sync is enabled by default. Register unless explicitly |
// disabled. |
if (!command_line_->HasSwitch(switches::kDisableSyncExtensions)) { |
@@ -150,14 +175,6 @@ void ProfileSyncComponentsFactoryImpl::RegisterDataTypes( |
} |
#endif |
- // TypedUrl sync is enabled by default. Register unless explicitly disabled, |
- // or if saving history is disabled. |
- if (!profile_->GetPrefs()->GetBoolean(prefs::kSavingBrowserHistoryDisabled) && |
- !command_line_->HasSwitch(switches::kDisableSyncTypedUrls)) { |
- pss->RegisterDataTypeController( |
- new TypedUrlDataTypeController(this, profile_, pss)); |
- } |
- |
// Search Engine sync is enabled by default. Register only if explicitly |
// disabled. |
if (!command_line_->HasSwitch(switches::kDisableSyncSearchEngines)) { |
@@ -165,12 +182,6 @@ void ProfileSyncComponentsFactoryImpl::RegisterDataTypes( |
new SearchEngineDataTypeController(this, profile_, pss)); |
} |
- // Session sync is enabled by default. Register unless explicitly disabled. |
- if (!command_line_->HasSwitch(switches::kDisableSyncTabs)) { |
- pss->RegisterDataTypeController( |
- new SessionDataTypeController(this, profile_, pss)); |
- } |
- |
// Extension setting sync is enabled by default. Register unless explicitly |
// disabled. |
if (!command_line_->HasSwitch(switches::kDisableSyncExtensionSettings)) { |