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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 new TypedUrlDataTypeController(this, profile_, pss)); | 147 new TypedUrlDataTypeController(this, profile_, pss)); |
148 } | 148 } |
149 | 149 |
150 // Search Engine sync is enabled by default. Register only if explicitly | 150 // Search Engine sync is enabled by default. Register only if explicitly |
151 // disabled. | 151 // disabled. |
152 if (!command_line_->HasSwitch(switches::kDisableSyncSearchEngines)) { | 152 if (!command_line_->HasSwitch(switches::kDisableSyncSearchEngines)) { |
153 pss->RegisterDataTypeController( | 153 pss->RegisterDataTypeController( |
154 new SearchEngineDataTypeController(this, profile_, pss)); | 154 new SearchEngineDataTypeController(this, profile_, pss)); |
155 } | 155 } |
156 | 156 |
157 // Session sync is disabled by default, but has some logic to automatically | 157 // Session sync is enabled by default. Register unless explicitly disabled. |
158 // enable. Register only if explicitly enabled and not explicitly disabled. | 158 // TODO(dubroy): Once this change is permanent, clean up the logic for |
159 if (command_line_->HasSwitch(switches::kEnableSyncTabs) && | 159 // explicitly enabling tab sync (http://crbug.com/118570). |
160 !command_line_->HasSwitch(switches::kDisableSyncTabs)) { | 160 if (!command_line_->HasSwitch(switches::kDisableSyncTabs)) { |
161 pss->RegisterDataTypeController( | 161 pss->RegisterDataTypeController( |
162 new SessionDataTypeController(this, profile_, pss)); | 162 new SessionDataTypeController(this, profile_, pss)); |
163 } | 163 } |
164 | 164 |
165 // Extension setting sync is enabled by default. Register unless explicitly | 165 // Extension setting sync is enabled by default. Register unless explicitly |
166 // disabled. | 166 // disabled. |
167 if (!command_line_->HasSwitch(switches::kDisableSyncExtensionSettings)) { | 167 if (!command_line_->HasSwitch(switches::kDisableSyncExtensionSettings)) { |
168 pss->RegisterDataTypeController( | 168 pss->RegisterDataTypeController( |
169 new ExtensionSettingDataTypeController( | 169 new ExtensionSettingDataTypeController( |
170 syncable::EXTENSION_SETTINGS, this, profile_, pss)); | 170 syncable::EXTENSION_SETTINGS, this, profile_, pss)); |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 ProfileSyncComponentsFactory::SyncComponents | 328 ProfileSyncComponentsFactory::SyncComponents |
329 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( | 329 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( |
330 ProfileSyncService* profile_sync_service, | 330 ProfileSyncService* profile_sync_service, |
331 DataTypeErrorHandler* error_handler) { | 331 DataTypeErrorHandler* error_handler) { |
332 SessionModelAssociator* model_associator = | 332 SessionModelAssociator* model_associator = |
333 new SessionModelAssociator(profile_sync_service); | 333 new SessionModelAssociator(profile_sync_service); |
334 SessionChangeProcessor* change_processor = | 334 SessionChangeProcessor* change_processor = |
335 new SessionChangeProcessor(error_handler, model_associator); | 335 new SessionChangeProcessor(error_handler, model_associator); |
336 return SyncComponents(model_associator, change_processor); | 336 return SyncComponents(model_associator, change_processor); |
337 } | 337 } |
OLD | NEW |