| 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/about_flags.h" | 7 #include "chrome/browser/about_flags.h" |
| 8 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 8 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 9 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" | 9 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 #if defined(ENABLE_MANAGED_USERS) | 222 #if defined(ENABLE_MANAGED_USERS) |
| 223 if (profile_->IsManaged()) { | 223 if (profile_->IsManaged()) { |
| 224 pss->RegisterDataTypeController( | 224 pss->RegisterDataTypeController( |
| 225 new UIDataTypeController( | 225 new UIDataTypeController( |
| 226 syncer::MANAGED_USER_SETTINGS, this, profile_, pss)); | 226 syncer::MANAGED_USER_SETTINGS, this, profile_, pss)); |
| 227 } else { | 227 } else { |
| 228 pss->RegisterDataTypeController( | 228 pss->RegisterDataTypeController( |
| 229 new UIDataTypeController( | 229 new UIDataTypeController( |
| 230 syncer::MANAGED_USERS, this, profile_, pss)); | 230 syncer::MANAGED_USERS, this, profile_, pss)); |
| 231 } | 231 } |
| 232 pss->RegisterDataTypeController( | 232 // TODO(bauerb): Enable once the Sync server has been updated to know about |
| 233 new UIDataTypeController( | 233 // this data type. |
| 234 syncer::MANAGED_USER_SHARED_SETTINGS, this, profile_, pss)); | 234 // pss->RegisterDataTypeController( |
| 235 // new UIDataTypeController( |
| 236 // syncer::MANAGED_USER_SHARED_SETTINGS, this, profile_, pss)); |
| 235 #endif | 237 #endif |
| 236 } | 238 } |
| 237 | 239 |
| 238 void ProfileSyncComponentsFactoryImpl::RegisterDesktopDataTypes( | 240 void ProfileSyncComponentsFactoryImpl::RegisterDesktopDataTypes( |
| 239 ProfileSyncService* pss) { | 241 ProfileSyncService* pss) { |
| 240 // App sync is enabled by default. Register unless explicitly | 242 // App sync is enabled by default. Register unless explicitly |
| 241 // disabled. | 243 // disabled. |
| 242 if (!command_line_->HasSwitch(switches::kDisableSyncApps)) { | 244 if (!command_line_->HasSwitch(switches::kDisableSyncApps)) { |
| 243 pss->RegisterDataTypeController( | 245 pss->RegisterDataTypeController( |
| 244 new ExtensionDataTypeController(syncer::APPS, this, profile_, pss)); | 246 new ExtensionDataTypeController(syncer::APPS, this, profile_, pss)); |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 ProfileSyncComponentsFactory::SyncComponents | 530 ProfileSyncComponentsFactory::SyncComponents |
| 529 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( | 531 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( |
| 530 ProfileSyncService* profile_sync_service, | 532 ProfileSyncService* profile_sync_service, |
| 531 DataTypeErrorHandler* error_handler) { | 533 DataTypeErrorHandler* error_handler) { |
| 532 SessionModelAssociator* model_associator = | 534 SessionModelAssociator* model_associator = |
| 533 new SessionModelAssociator(profile_sync_service, error_handler); | 535 new SessionModelAssociator(profile_sync_service, error_handler); |
| 534 SessionChangeProcessor* change_processor = | 536 SessionChangeProcessor* change_processor = |
| 535 new SessionChangeProcessor(error_handler, model_associator); | 537 new SessionChangeProcessor(error_handler, model_associator); |
| 536 return SyncComponents(model_associator, change_processor); | 538 return SyncComponents(model_associator, change_processor); |
| 537 } | 539 } |
| OLD | NEW |