| 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/extension_system.h" | 9 #include "chrome/browser/extensions/extension_system.h" |
| 10 #include "chrome/browser/extensions/extension_system_factory.h" | 10 #include "chrome/browser/extensions/extension_system_factory.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 #endif | 144 #endif |
| 145 | 145 |
| 146 // TypedUrl sync is enabled by default. Register unless explicitly disabled, | 146 // TypedUrl sync is enabled by default. Register unless explicitly disabled, |
| 147 // or if saving history is disabled. | 147 // or if saving history is disabled. |
| 148 if (!profile_->GetPrefs()->GetBoolean(prefs::kSavingBrowserHistoryDisabled) && | 148 if (!profile_->GetPrefs()->GetBoolean(prefs::kSavingBrowserHistoryDisabled) && |
| 149 !command_line_->HasSwitch(switches::kDisableSyncTypedUrls)) { | 149 !command_line_->HasSwitch(switches::kDisableSyncTypedUrls)) { |
| 150 pss->RegisterDataTypeController( | 150 pss->RegisterDataTypeController( |
| 151 new TypedUrlDataTypeController(this, profile_, pss)); | 151 new TypedUrlDataTypeController(this, profile_, pss)); |
| 152 } | 152 } |
| 153 | 153 |
| 154 // Search Engine sync is enabled by default. Register only if explicitly | 154 // Search Engine sync is temporarily disabled by default. Register only if |
| 155 // disabled. | 155 // explicitly enabled. |
| 156 if (!command_line_->HasSwitch(switches::kDisableSyncSearchEngines)) { | 156 if (command_line_->HasSwitch(switches::kEnableSyncSearchEngines)) { |
| 157 pss->RegisterDataTypeController( | 157 pss->RegisterDataTypeController( |
| 158 new SearchEngineDataTypeController(this, profile_, pss)); | 158 new SearchEngineDataTypeController(this, profile_, pss)); |
| 159 } | 159 } |
| 160 | 160 |
| 161 // Session sync is enabled by default. Register unless explicitly disabled. | 161 // Session sync is enabled by default. Register unless explicitly disabled. |
| 162 // TODO(dubroy): Once this change is permanent, clean up the logic for | 162 // TODO(dubroy): Once this change is permanent, clean up the logic for |
| 163 // explicitly enabling tab sync (http://crbug.com/118570). | 163 // explicitly enabling tab sync (http://crbug.com/118570). |
| 164 if (!command_line_->HasSwitch(switches::kDisableSyncTabs)) { | 164 if (!command_line_->HasSwitch(switches::kDisableSyncTabs)) { |
| 165 pss->RegisterDataTypeController( | 165 pss->RegisterDataTypeController( |
| 166 new SessionDataTypeController(this, profile_, pss)); | 166 new SessionDataTypeController(this, profile_, pss)); |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 ProfileSyncComponentsFactory::SyncComponents | 334 ProfileSyncComponentsFactory::SyncComponents |
| 335 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( | 335 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( |
| 336 ProfileSyncService* profile_sync_service, | 336 ProfileSyncService* profile_sync_service, |
| 337 DataTypeErrorHandler* error_handler) { | 337 DataTypeErrorHandler* error_handler) { |
| 338 SessionModelAssociator* model_associator = | 338 SessionModelAssociator* model_associator = |
| 339 new SessionModelAssociator(profile_sync_service, error_handler); | 339 new SessionModelAssociator(profile_sync_service, error_handler); |
| 340 SessionChangeProcessor* change_processor = | 340 SessionChangeProcessor* change_processor = |
| 341 new SessionChangeProcessor(error_handler, model_associator); | 341 new SessionChangeProcessor(error_handler, model_associator); |
| 342 return SyncComponents(model_associator, change_processor); | 342 return SyncComponents(model_associator, change_processor); |
| 343 } | 343 } |
| OLD | NEW |