| 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/app_notification_manager.h" | 8 #include "chrome/browser/extensions/app_notification_manager.h" |
| 9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/browser/extensions/extension_system.h" | 10 #include "chrome/browser/extensions/extension_system.h" |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 new AutofillProfileDataTypeController(this, profile_, pss)); | 206 new AutofillProfileDataTypeController(this, profile_, pss)); |
| 207 } | 207 } |
| 208 | 208 |
| 209 // App notifications sync is enabled by default. Register unless explicitly | 209 // App notifications sync is enabled by default. Register unless explicitly |
| 210 // disabled. | 210 // disabled. |
| 211 if (!command_line_->HasSwitch(switches::kDisableSyncAppNotifications)) { | 211 if (!command_line_->HasSwitch(switches::kDisableSyncAppNotifications)) { |
| 212 pss->RegisterDataTypeController( | 212 pss->RegisterDataTypeController( |
| 213 new AppNotificationDataTypeController(this, profile_, pss)); | 213 new AppNotificationDataTypeController(this, profile_, pss)); |
| 214 } | 214 } |
| 215 | 215 |
| 216 // History delete directives sync is disabled by default. Register only if | 216 // Unless it is explicitly disabled, history delete directive sync is |
| 217 // explicitly enabled. | 217 // enabled whenever full history sync is enabled. |
| 218 if (command_line_->HasSwitch(switches::kEnableSyncHistoryDeleteDirectives)) { | 218 if (command_line_->HasSwitch(switches::kHistoryEnableFullHistorySync) && |
| 219 !command_line_->HasSwitch( |
| 220 switches::kDisableSyncHistoryDeleteDirectives)) { |
| 219 pss->RegisterDataTypeController( | 221 pss->RegisterDataTypeController( |
| 220 new UIDataTypeController( | 222 new UIDataTypeController( |
| 221 syncer::HISTORY_DELETE_DIRECTIVES, this, profile_, pss)); | 223 syncer::HISTORY_DELETE_DIRECTIVES, this, profile_, pss)); |
| 222 } | 224 } |
| 223 } | 225 } |
| 224 | 226 |
| 225 DataTypeManager* ProfileSyncComponentsFactoryImpl::CreateDataTypeManager( | 227 DataTypeManager* ProfileSyncComponentsFactoryImpl::CreateDataTypeManager( |
| 226 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& | 228 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& |
| 227 debug_info_listener, | 229 debug_info_listener, |
| 228 SyncBackendHost* backend, | 230 SyncBackendHost* backend, |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 ProfileSyncComponentsFactory::SyncComponents | 368 ProfileSyncComponentsFactory::SyncComponents |
| 367 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( | 369 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( |
| 368 ProfileSyncService* profile_sync_service, | 370 ProfileSyncService* profile_sync_service, |
| 369 DataTypeErrorHandler* error_handler) { | 371 DataTypeErrorHandler* error_handler) { |
| 370 SessionModelAssociator* model_associator = | 372 SessionModelAssociator* model_associator = |
| 371 new SessionModelAssociator(profile_sync_service, error_handler); | 373 new SessionModelAssociator(profile_sync_service, error_handler); |
| 372 SessionChangeProcessor* change_processor = | 374 SessionChangeProcessor* change_processor = |
| 373 new SessionChangeProcessor(error_handler, model_associator); | 375 new SessionChangeProcessor(error_handler, model_associator); |
| 374 return SyncComponents(model_associator, change_processor); | 376 return SyncComponents(model_associator, change_processor); |
| 375 } | 377 } |
| OLD | NEW |