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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 return PrefServiceSyncable::FromProfile(profile_)->GetSyncableService( | 369 return PrefServiceSyncable::FromProfile(profile_)->GetSyncableService( |
370 syncer::PRIORITY_PREFERENCES)->AsWeakPtr(); | 370 syncer::PRIORITY_PREFERENCES)->AsWeakPtr(); |
371 case syncer::AUTOFILL: | 371 case syncer::AUTOFILL: |
372 case syncer::AUTOFILL_PROFILE: { | 372 case syncer::AUTOFILL_PROFILE: { |
373 if (!web_data_service_.get()) | 373 if (!web_data_service_.get()) |
374 return base::WeakPtr<syncer::SyncableService>(); | 374 return base::WeakPtr<syncer::SyncableService>(); |
375 if (type == syncer::AUTOFILL) { | 375 if (type == syncer::AUTOFILL) { |
376 return AutocompleteSyncableService::FromWebDataService( | 376 return AutocompleteSyncableService::FromWebDataService( |
377 web_data_service_.get())->AsWeakPtr(); | 377 web_data_service_.get())->AsWeakPtr(); |
378 } else { | 378 } else { |
379 return AutofillProfileSyncableService::FromWebDataService( | 379 return autofill::AutofillProfileSyncableService::FromWebDataService( |
380 web_data_service_.get())->AsWeakPtr(); | 380 web_data_service_.get())->AsWeakPtr(); |
381 } | 381 } |
382 } | 382 } |
383 case syncer::APPS: | 383 case syncer::APPS: |
384 case syncer::EXTENSIONS: | 384 case syncer::EXTENSIONS: |
385 return ExtensionSyncService::Get(profile_)->AsWeakPtr(); | 385 return ExtensionSyncService::Get(profile_)->AsWeakPtr(); |
386 case syncer::SEARCH_ENGINES: | 386 case syncer::SEARCH_ENGINES: |
387 return TemplateURLServiceFactory::GetForProfile(profile_)->AsWeakPtr(); | 387 return TemplateURLServiceFactory::GetForProfile(profile_)->AsWeakPtr(); |
388 case syncer::APP_SETTINGS: | 388 case syncer::APP_SETTINGS: |
389 case syncer::EXTENSION_SETTINGS: | 389 case syncer::EXTENSION_SETTINGS: |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 ProfileSyncComponentsFactory::SyncComponents | 520 ProfileSyncComponentsFactory::SyncComponents |
521 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( | 521 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( |
522 ProfileSyncService* profile_sync_service, | 522 ProfileSyncService* profile_sync_service, |
523 DataTypeErrorHandler* error_handler) { | 523 DataTypeErrorHandler* error_handler) { |
524 SessionModelAssociator* model_associator = | 524 SessionModelAssociator* model_associator = |
525 new SessionModelAssociator(profile_sync_service, error_handler); | 525 new SessionModelAssociator(profile_sync_service, error_handler); |
526 SessionChangeProcessor* change_processor = | 526 SessionChangeProcessor* change_processor = |
527 new SessionChangeProcessor(error_handler, model_associator); | 527 new SessionChangeProcessor(error_handler, model_associator); |
528 return SyncComponents(model_associator, change_processor); | 528 return SyncComponents(model_associator, change_processor); |
529 } | 529 } |
OLD | NEW |