| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/logging.h" | 6 #include "base/logging.h" |
| 7 #include "chrome/browser/defaults.h" | 7 #include "chrome/browser/defaults.h" |
| 8 #include "chrome/browser/profile.h" | 8 #include "chrome/browser/profile.h" |
| 9 #include "chrome/browser/sync/glue/app_data_type_controller.h" | 9 #include "chrome/browser/sync/glue/app_data_type_controller.h" |
| 10 #include "chrome/browser/sync/glue/autofill_change_processor.h" | 10 #include "chrome/browser/sync/glue/autofill_change_processor.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 new ThemeDataTypeController(this, profile_, pss)); | 128 new ThemeDataTypeController(this, profile_, pss)); |
| 129 } | 129 } |
| 130 | 130 |
| 131 // TypedUrl sync is disabled by default. Register only if | 131 // TypedUrl sync is disabled by default. Register only if |
| 132 // explicitly enabled. | 132 // explicitly enabled. |
| 133 if (command_line_->HasSwitch(switches::kEnableSyncTypedUrls)) { | 133 if (command_line_->HasSwitch(switches::kEnableSyncTypedUrls)) { |
| 134 pss->RegisterDataTypeController( | 134 pss->RegisterDataTypeController( |
| 135 new TypedUrlDataTypeController(this, profile_, pss)); | 135 new TypedUrlDataTypeController(this, profile_, pss)); |
| 136 } | 136 } |
| 137 | 137 |
| 138 // Session sync is enabled by default. Register unless explicitly | 138 // Session sync is disabled by default. Register only if explicitly |
| 139 // disabled. | 139 // enabled. |
| 140 if (!command_line_->HasSwitch(switches::kDisableSyncSessions)) { | 140 if (command_line_->HasSwitch(switches::kEnableSyncSessions)) { |
| 141 pss->RegisterDataTypeController( | 141 pss->RegisterDataTypeController( |
| 142 new SessionDataTypeController(this, pss)); | 142 new SessionDataTypeController(this, pss)); |
| 143 } | 143 } |
| 144 return pss; | 144 return pss; |
| 145 } | 145 } |
| 146 | 146 |
| 147 DataTypeManager* ProfileSyncFactoryImpl::CreateDataTypeManager( | 147 DataTypeManager* ProfileSyncFactoryImpl::CreateDataTypeManager( |
| 148 SyncBackendHost* backend, | 148 SyncBackendHost* backend, |
| 149 const DataTypeController::TypeMap& controllers) { | 149 const DataTypeController::TypeMap& controllers) { |
| 150 return new DataTypeManagerImpl(backend, controllers); | 150 return new DataTypeManagerImpl(backend, controllers); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 ProfileSyncFactoryImpl::CreateSessionSyncComponents( | 266 ProfileSyncFactoryImpl::CreateSessionSyncComponents( |
| 267 ProfileSyncService* profile_sync_service, | 267 ProfileSyncService* profile_sync_service, |
| 268 UnrecoverableErrorHandler* error_handler) { | 268 UnrecoverableErrorHandler* error_handler) { |
| 269 SessionModelAssociator* model_associator = | 269 SessionModelAssociator* model_associator = |
| 270 new SessionModelAssociator(profile_sync_service); | 270 new SessionModelAssociator(profile_sync_service); |
| 271 SessionChangeProcessor* change_processor = | 271 SessionChangeProcessor* change_processor = |
| 272 new SessionChangeProcessor(error_handler, model_associator); | 272 new SessionChangeProcessor(error_handler, model_associator); |
| 273 return SyncComponents(model_associator, change_processor); | 273 return SyncComponents(model_associator, change_processor); |
| 274 } | 274 } |
| 275 | 275 |
| OLD | NEW |