Chromium Code Reviews| 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/extensions/app_notification_manager.h" | 7 #include "chrome/browser/extensions/app_notification_manager.h" |
| 8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
| 9 #include "chrome/browser/extensions/settings/settings_frontend.h" | 9 #include "chrome/browser/extensions/settings/settings_frontend.h" |
| 10 #include "chrome/browser/prefs/pref_model_associator.h" | 10 #include "chrome/browser/prefs/pref_model_associator.h" |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 146 } | 146 } |
| 147 | 147 |
| 148 // Search Engine sync is enabled by default. Register only if explicitly | 148 // Search Engine sync is enabled by default. Register only if explicitly |
| 149 // disabled. | 149 // disabled. |
| 150 if (!command_line_->HasSwitch(switches::kDisableSyncSearchEngines)) { | 150 if (!command_line_->HasSwitch(switches::kDisableSyncSearchEngines)) { |
| 151 pss->RegisterDataTypeController( | 151 pss->RegisterDataTypeController( |
| 152 new SearchEngineDataTypeController(this, profile_, pss)); | 152 new SearchEngineDataTypeController(this, profile_, pss)); |
| 153 } | 153 } |
| 154 | 154 |
| 155 // Session sync is disabled by default, but has some logic to automatically | 155 // Session sync is disabled by default, but has some logic to automatically |
| 156 // enable. Register only if explicitly enabled and not explicitly disabled. | 156 // enable. Register only if explicitly enabled and not explicitly disabled. |
|
Nicolas Zea
2012/03/15 17:58:52
Update comment (enabled by default now).
Patrick Dubroy
2012/03/16 09:01:28
Done.
| |
| 157 if (command_line_->HasSwitch(switches::kEnableSyncTabs) && | 157 if (!command_line_->HasSwitch(switches::kDisableSyncTabs)) { |
| 158 !command_line_->HasSwitch(switches::kDisableSyncTabs)) { | |
| 159 pss->RegisterDataTypeController( | 158 pss->RegisterDataTypeController( |
| 160 new SessionDataTypeController(this, profile_, pss)); | 159 new SessionDataTypeController(this, profile_, pss)); |
| 161 } | 160 } |
| 162 | 161 |
| 163 // Extension setting sync is enabled by default. Register unless explicitly | 162 // Extension setting sync is enabled by default. Register unless explicitly |
| 164 // disabled. | 163 // disabled. |
| 165 if (!command_line_->HasSwitch(switches::kDisableSyncExtensionSettings)) { | 164 if (!command_line_->HasSwitch(switches::kDisableSyncExtensionSettings)) { |
| 166 pss->RegisterDataTypeController( | 165 pss->RegisterDataTypeController( |
| 167 new ExtensionSettingDataTypeController( | 166 new ExtensionSettingDataTypeController( |
| 168 syncable::EXTENSION_SETTINGS, this, profile_, pss)); | 167 syncable::EXTENSION_SETTINGS, this, profile_, pss)); |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 324 ProfileSyncComponentsFactory::SyncComponents | 323 ProfileSyncComponentsFactory::SyncComponents |
| 325 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( | 324 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( |
| 326 ProfileSyncService* profile_sync_service, | 325 ProfileSyncService* profile_sync_service, |
| 327 DataTypeErrorHandler* error_handler) { | 326 DataTypeErrorHandler* error_handler) { |
| 328 SessionModelAssociator* model_associator = | 327 SessionModelAssociator* model_associator = |
| 329 new SessionModelAssociator(profile_sync_service); | 328 new SessionModelAssociator(profile_sync_service); |
| 330 SessionChangeProcessor* change_processor = | 329 SessionChangeProcessor* change_processor = |
| 331 new SessionChangeProcessor(error_handler, model_associator); | 330 new SessionChangeProcessor(error_handler, model_associator); |
| 332 return SyncComponents(model_associator, change_processor); | 331 return SyncComponents(model_associator, change_processor); |
| 333 } | 332 } |
| OLD | NEW |