| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/extensions/extension_service.h" | 6 #include "chrome/browser/extensions/extension_service.h" |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/sync/api/syncable_service.h" | 8 #include "chrome/browser/sync/api/syncable_service.h" |
| 9 #include "chrome/browser/sync/glue/app_change_processor.h" | 9 #include "chrome/browser/sync/glue/app_change_processor.h" |
| 10 #include "chrome/browser/sync/glue/app_data_type_controller.h" | 10 #include "chrome/browser/sync/glue/app_data_type_controller.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 140 |
| 141 // Theme sync is enabled by default. Register unless explicitly disabled. | 141 // Theme sync is enabled by default. Register unless explicitly disabled. |
| 142 if (!command_line_->HasSwitch(switches::kDisableSyncThemes)) { | 142 if (!command_line_->HasSwitch(switches::kDisableSyncThemes)) { |
| 143 pss->RegisterDataTypeController( | 143 pss->RegisterDataTypeController( |
| 144 new ThemeDataTypeController(this, profile_, pss)); | 144 new ThemeDataTypeController(this, profile_, pss)); |
| 145 } | 145 } |
| 146 | 146 |
| 147 // TypedUrl sync is disabled by default. Register only if | 147 // TypedUrl sync is disabled by default. Register only if |
| 148 // explicitly enabled, and if saving history is not disabled. | 148 // explicitly enabled, and if saving history is not disabled. |
| 149 if (!profile_->GetPrefs()->GetBoolean(prefs::kSavingBrowserHistoryDisabled) && | 149 if (!profile_->GetPrefs()->GetBoolean(prefs::kSavingBrowserHistoryDisabled) && |
| 150 command_line_->HasSwitch(switches::kEnableSyncTypedUrls)) { | 150 !command_line_->HasSwitch(switches::kDisableSyncTypedUrls)) { |
| 151 pss->RegisterDataTypeController( | 151 pss->RegisterDataTypeController( |
| 152 new TypedUrlDataTypeController(this, profile_)); | 152 new TypedUrlDataTypeController(this, profile_)); |
| 153 } | 153 } |
| 154 | 154 |
| 155 // Session sync is disabled by default. Register only if explicitly | 155 // Session sync is disabled by default. Register only if explicitly |
| 156 // enabled. | 156 // enabled. |
| 157 if (command_line_->HasSwitch(switches::kEnableSyncSessions)) { | 157 if (command_line_->HasSwitch(switches::kEnableSyncSessions)) { |
| 158 pss->RegisterDataTypeController( | 158 pss->RegisterDataTypeController( |
| 159 new SessionDataTypeController(this, profile_, pss)); | 159 new SessionDataTypeController(this, profile_, pss)); |
| 160 } | 160 } |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 ProfileSyncFactory::SyncComponents | 317 ProfileSyncFactory::SyncComponents |
| 318 ProfileSyncFactoryImpl::CreateSessionSyncComponents( | 318 ProfileSyncFactoryImpl::CreateSessionSyncComponents( |
| 319 ProfileSyncService* profile_sync_service, | 319 ProfileSyncService* profile_sync_service, |
| 320 UnrecoverableErrorHandler* error_handler) { | 320 UnrecoverableErrorHandler* error_handler) { |
| 321 SessionModelAssociator* model_associator = | 321 SessionModelAssociator* model_associator = |
| 322 new SessionModelAssociator(profile_sync_service); | 322 new SessionModelAssociator(profile_sync_service); |
| 323 SessionChangeProcessor* change_processor = | 323 SessionChangeProcessor* change_processor = |
| 324 new SessionChangeProcessor(error_handler, model_associator); | 324 new SessionChangeProcessor(error_handler, model_associator); |
| 325 return SyncComponents(model_associator, change_processor); | 325 return SyncComponents(model_associator, change_processor); |
| 326 } | 326 } |
| OLD | NEW |