| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "build/build_config.h" | 6 #include "build/build_config.h" |
| 7 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 7 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 8 #include "chrome/browser/extensions/api/storage/settings_frontend.h" | 8 #include "chrome/browser/extensions/api/storage/settings_frontend.h" |
| 9 #include "chrome/browser/extensions/app_notification_manager.h" | 9 #include "chrome/browser/extensions/app_notification_manager.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "chrome/browser/sync/glue/autofill_data_type_controller.h" | 23 #include "chrome/browser/sync/glue/autofill_data_type_controller.h" |
| 24 #include "chrome/browser/sync/glue/autofill_profile_data_type_controller.h" | 24 #include "chrome/browser/sync/glue/autofill_profile_data_type_controller.h" |
| 25 #include "chrome/browser/sync/glue/bookmark_change_processor.h" | 25 #include "chrome/browser/sync/glue/bookmark_change_processor.h" |
| 26 #include "chrome/browser/sync/glue/bookmark_data_type_controller.h" | 26 #include "chrome/browser/sync/glue/bookmark_data_type_controller.h" |
| 27 #include "chrome/browser/sync/glue/bookmark_model_associator.h" | 27 #include "chrome/browser/sync/glue/bookmark_model_associator.h" |
| 28 #include "chrome/browser/sync/glue/data_type_manager_impl.h" | 28 #include "chrome/browser/sync/glue/data_type_manager_impl.h" |
| 29 #include "chrome/browser/sync/glue/data_type_manager_observer.h" | 29 #include "chrome/browser/sync/glue/data_type_manager_observer.h" |
| 30 #include "chrome/browser/sync/glue/extension_data_type_controller.h" | 30 #include "chrome/browser/sync/glue/extension_data_type_controller.h" |
| 31 #include "chrome/browser/sync/glue/extension_setting_data_type_controller.h" | 31 #include "chrome/browser/sync/glue/extension_setting_data_type_controller.h" |
| 32 #include "chrome/browser/sync/glue/generic_change_processor.h" | 32 #include "chrome/browser/sync/glue/generic_change_processor.h" |
| 33 #include "chrome/browser/sync/glue/virtual_data_type_controller.h" |
| 33 #include "chrome/browser/sync/glue/password_change_processor.h" | 34 #include "chrome/browser/sync/glue/password_change_processor.h" |
| 34 #include "chrome/browser/sync/glue/password_data_type_controller.h" | 35 #include "chrome/browser/sync/glue/password_data_type_controller.h" |
| 35 #include "chrome/browser/sync/glue/password_model_associator.h" | 36 #include "chrome/browser/sync/glue/password_model_associator.h" |
| 36 #include "chrome/browser/sync/glue/search_engine_data_type_controller.h" | 37 #include "chrome/browser/sync/glue/search_engine_data_type_controller.h" |
| 37 #include "chrome/browser/sync/glue/session_change_processor.h" | 38 #include "chrome/browser/sync/glue/session_change_processor.h" |
| 38 #include "chrome/browser/sync/glue/session_data_type_controller.h" | 39 #include "chrome/browser/sync/glue/session_data_type_controller.h" |
| 39 #include "chrome/browser/sync/glue/session_model_associator.h" | 40 #include "chrome/browser/sync/glue/session_model_associator.h" |
| 40 #include "chrome/browser/sync/glue/shared_change_processor.h" | 41 #include "chrome/browser/sync/glue/shared_change_processor.h" |
| 41 #include "chrome/browser/sync/glue/sync_backend_host.h" | 42 #include "chrome/browser/sync/glue/sync_backend_host.h" |
| 42 #include "chrome/browser/sync/glue/theme_data_type_controller.h" | 43 #include "chrome/browser/sync/glue/theme_data_type_controller.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 64 using browser_sync::BookmarkChangeProcessor; | 65 using browser_sync::BookmarkChangeProcessor; |
| 65 using browser_sync::BookmarkDataTypeController; | 66 using browser_sync::BookmarkDataTypeController; |
| 66 using browser_sync::BookmarkModelAssociator; | 67 using browser_sync::BookmarkModelAssociator; |
| 67 using browser_sync::DataTypeController; | 68 using browser_sync::DataTypeController; |
| 68 using browser_sync::DataTypeManager; | 69 using browser_sync::DataTypeManager; |
| 69 using browser_sync::DataTypeManagerImpl; | 70 using browser_sync::DataTypeManagerImpl; |
| 70 using browser_sync::DataTypeManagerObserver; | 71 using browser_sync::DataTypeManagerObserver; |
| 71 using browser_sync::ExtensionDataTypeController; | 72 using browser_sync::ExtensionDataTypeController; |
| 72 using browser_sync::ExtensionSettingDataTypeController; | 73 using browser_sync::ExtensionSettingDataTypeController; |
| 73 using browser_sync::GenericChangeProcessor; | 74 using browser_sync::GenericChangeProcessor; |
| 75 using browser_sync::VirtualDataTypeController; |
| 74 using browser_sync::PasswordChangeProcessor; | 76 using browser_sync::PasswordChangeProcessor; |
| 75 using browser_sync::PasswordDataTypeController; | 77 using browser_sync::PasswordDataTypeController; |
| 76 using browser_sync::PasswordModelAssociator; | 78 using browser_sync::PasswordModelAssociator; |
| 77 using browser_sync::SearchEngineDataTypeController; | 79 using browser_sync::SearchEngineDataTypeController; |
| 78 using browser_sync::SessionChangeProcessor; | 80 using browser_sync::SessionChangeProcessor; |
| 79 using browser_sync::SessionDataTypeController; | 81 using browser_sync::SessionDataTypeController; |
| 80 using browser_sync::SessionModelAssociator; | 82 using browser_sync::SessionModelAssociator; |
| 81 using browser_sync::SharedChangeProcessor; | 83 using browser_sync::SharedChangeProcessor; |
| 82 using browser_sync::SyncBackendHost; | 84 using browser_sync::SyncBackendHost; |
| 83 using browser_sync::ThemeDataTypeController; | 85 using browser_sync::ThemeDataTypeController; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // or if saving history is disabled. | 124 // or if saving history is disabled. |
| 123 if (!profile_->GetPrefs()->GetBoolean(prefs::kSavingBrowserHistoryDisabled) && | 125 if (!profile_->GetPrefs()->GetBoolean(prefs::kSavingBrowserHistoryDisabled) && |
| 124 !command_line_->HasSwitch(switches::kDisableSyncTypedUrls)) { | 126 !command_line_->HasSwitch(switches::kDisableSyncTypedUrls)) { |
| 125 pss->RegisterDataTypeController( | 127 pss->RegisterDataTypeController( |
| 126 new TypedUrlDataTypeController(this, profile_, pss)); | 128 new TypedUrlDataTypeController(this, profile_, pss)); |
| 127 } | 129 } |
| 128 | 130 |
| 129 // Session sync is enabled by default. Register unless explicitly disabled. | 131 // Session sync is enabled by default. Register unless explicitly disabled. |
| 130 if (!command_line_->HasSwitch(switches::kDisableSyncTabs)) { | 132 if (!command_line_->HasSwitch(switches::kDisableSyncTabs)) { |
| 131 pss->RegisterDataTypeController( | 133 pss->RegisterDataTypeController( |
| 134 new VirtualDataTypeController(syncer::TABS)); |
| 135 pss->RegisterDataTypeController( |
| 132 new SessionDataTypeController(this, profile_, pss)); | 136 new SessionDataTypeController(this, profile_, pss)); |
| 133 } | 137 } |
| 134 } | 138 } |
| 135 | 139 |
| 136 void ProfileSyncComponentsFactoryImpl::RegisterDesktopDataTypes( | 140 void ProfileSyncComponentsFactoryImpl::RegisterDesktopDataTypes( |
| 137 ProfileSyncService* pss) { | 141 ProfileSyncService* pss) { |
| 138 // App sync is enabled by default. Register unless explicitly | 142 // App sync is enabled by default. Register unless explicitly |
| 139 // disabled. | 143 // disabled. |
| 140 if (!command_line_->HasSwitch(switches::kDisableSyncApps)) { | 144 if (!command_line_->HasSwitch(switches::kDisableSyncApps)) { |
| 141 pss->RegisterDataTypeController( | 145 pss->RegisterDataTypeController( |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 ProfileSyncComponentsFactory::SyncComponents | 373 ProfileSyncComponentsFactory::SyncComponents |
| 370 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( | 374 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( |
| 371 ProfileSyncService* profile_sync_service, | 375 ProfileSyncService* profile_sync_service, |
| 372 DataTypeErrorHandler* error_handler) { | 376 DataTypeErrorHandler* error_handler) { |
| 373 SessionModelAssociator* model_associator = | 377 SessionModelAssociator* model_associator = |
| 374 new SessionModelAssociator(profile_sync_service, error_handler); | 378 new SessionModelAssociator(profile_sync_service, error_handler); |
| 375 SessionChangeProcessor* change_processor = | 379 SessionChangeProcessor* change_processor = |
| 376 new SessionChangeProcessor(error_handler, model_associator); | 380 new SessionChangeProcessor(error_handler, model_associator); |
| 377 return SyncComponents(model_associator, change_processor); | 381 return SyncComponents(model_associator, change_processor); |
| 378 } | 382 } |
| OLD | NEW |