| 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/bookmarks/bookmark_model_factory.h" | 7 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 8 #include "chrome/browser/extensions/api/storage/settings_frontend.h" | 8 #include "chrome/browser/extensions/api/storage/settings_frontend.h" |
| 9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/browser/extensions/extension_system.h" | 10 #include "chrome/browser/extensions/extension_system.h" |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 } | 297 } |
| 298 switch (type) { | 298 switch (type) { |
| 299 case syncer::PREFERENCES: | 299 case syncer::PREFERENCES: |
| 300 return PrefServiceSyncable::FromProfile( | 300 return PrefServiceSyncable::FromProfile( |
| 301 profile_)->GetSyncableService()->AsWeakPtr(); | 301 profile_)->GetSyncableService()->AsWeakPtr(); |
| 302 case syncer::AUTOFILL: | 302 case syncer::AUTOFILL: |
| 303 case syncer::AUTOFILL_PROFILE: { | 303 case syncer::AUTOFILL_PROFILE: { |
| 304 if (!web_data_service_.get()) | 304 if (!web_data_service_.get()) |
| 305 return base::WeakPtr<syncer::SyncableService>(); | 305 return base::WeakPtr<syncer::SyncableService>(); |
| 306 if (type == syncer::AUTOFILL) { | 306 if (type == syncer::AUTOFILL) { |
| 307 return web_data_service_->GetAutocompleteSyncableService()->AsWeakPtr(); | 307 return AutocompleteSyncableService::FromWebData( |
| 308 web_data_service_)->AsWeakPtr(); |
| 308 } else { | 309 } else { |
| 309 return web_data_service_-> | 310 return web_data_service_-> |
| 310 GetAutofillProfileSyncableService()->AsWeakPtr(); | 311 GetAutofillProfileSyncableService()->AsWeakPtr(); |
| 311 } | 312 } |
| 312 } | 313 } |
| 313 case syncer::APPS: | 314 case syncer::APPS: |
| 314 case syncer::EXTENSIONS: | 315 case syncer::EXTENSIONS: |
| 315 return extension_system_->extension_service()->AsWeakPtr(); | 316 return extension_system_->extension_service()->AsWeakPtr(); |
| 316 case syncer::SEARCH_ENGINES: | 317 case syncer::SEARCH_ENGINES: |
| 317 return TemplateURLServiceFactory::GetForProfile(profile_)->AsWeakPtr(); | 318 return TemplateURLServiceFactory::GetForProfile(profile_)->AsWeakPtr(); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 ProfileSyncComponentsFactory::SyncComponents | 419 ProfileSyncComponentsFactory::SyncComponents |
| 419 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( | 420 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( |
| 420 ProfileSyncService* profile_sync_service, | 421 ProfileSyncService* profile_sync_service, |
| 421 DataTypeErrorHandler* error_handler) { | 422 DataTypeErrorHandler* error_handler) { |
| 422 SessionModelAssociator* model_associator = | 423 SessionModelAssociator* model_associator = |
| 423 new SessionModelAssociator(profile_sync_service, error_handler); | 424 new SessionModelAssociator(profile_sync_service, error_handler); |
| 424 SessionChangeProcessor* change_processor = | 425 SessionChangeProcessor* change_processor = |
| 425 new SessionChangeProcessor(error_handler, model_associator); | 426 new SessionChangeProcessor(error_handler, model_associator); |
| 426 return SyncComponents(model_associator, change_processor); | 427 return SyncComponents(model_associator, change_processor); |
| 427 } | 428 } |
| OLD | NEW |