| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 #include "chrome/common/chrome_version_info.h" | 61 #include "chrome/common/chrome_version_info.h" |
| 62 #include "chrome/common/pref_names.h" | 62 #include "chrome/common/pref_names.h" |
| 63 #include "components/autofill/core/browser/webdata/autofill_profile_syncable_ser
vice.h" | 63 #include "components/autofill/core/browser/webdata/autofill_profile_syncable_ser
vice.h" |
| 64 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 64 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
| 65 #include "components/dom_distiller/core/dom_distiller_service.h" | 65 #include "components/dom_distiller/core/dom_distiller_service.h" |
| 66 #include "components/password_manager/core/browser/password_store.h" | 66 #include "components/password_manager/core/browser/password_store.h" |
| 67 #include "components/sync_driver/data_type_manager_observer.h" | 67 #include "components/sync_driver/data_type_manager_observer.h" |
| 68 #include "components/sync_driver/proxy_data_type_controller.h" | 68 #include "components/sync_driver/proxy_data_type_controller.h" |
| 69 #include "content/public/browser/browser_thread.h" | 69 #include "content/public/browser/browser_thread.h" |
| 70 #include "extensions/browser/extension_system.h" | 70 #include "extensions/browser/extension_system.h" |
| 71 #include "sync/api/attachments/attachment_service.h" |
| 72 #include "sync/api/attachments/fake_attachment_service.h" |
| 73 #include "sync/api/attachments/fake_attachment_store.h" |
| 71 #include "sync/api/syncable_service.h" | 74 #include "sync/api/syncable_service.h" |
| 72 | 75 |
| 73 #if defined(ENABLE_MANAGED_USERS) | 76 #if defined(ENABLE_MANAGED_USERS) |
| 74 #include "chrome/browser/managed_mode/managed_user_settings_service.h" | 77 #include "chrome/browser/managed_mode/managed_user_settings_service.h" |
| 75 #include "chrome/browser/managed_mode/managed_user_settings_service_factory.h" | 78 #include "chrome/browser/managed_mode/managed_user_settings_service_factory.h" |
| 76 #include "chrome/browser/managed_mode/managed_user_shared_settings_service.h" | 79 #include "chrome/browser/managed_mode/managed_user_shared_settings_service.h" |
| 77 #include "chrome/browser/managed_mode/managed_user_shared_settings_service_facto
ry.h" | 80 #include "chrome/browser/managed_mode/managed_user_shared_settings_service_facto
ry.h" |
| 78 #include "chrome/browser/managed_mode/managed_user_sync_service.h" | 81 #include "chrome/browser/managed_mode/managed_user_sync_service.h" |
| 79 #include "chrome/browser/managed_mode/managed_user_sync_service_factory.h" | 82 #include "chrome/browser/managed_mode/managed_user_sync_service_factory.h" |
| 80 #endif | 83 #endif |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 return new browser_sync::SyncBackendHostImpl(name, profile, sync_prefs); | 425 return new browser_sync::SyncBackendHostImpl(name, profile, sync_prefs); |
| 423 } | 426 } |
| 424 | 427 |
| 425 browser_sync::GenericChangeProcessor* | 428 browser_sync::GenericChangeProcessor* |
| 426 ProfileSyncComponentsFactoryImpl::CreateGenericChangeProcessor( | 429 ProfileSyncComponentsFactoryImpl::CreateGenericChangeProcessor( |
| 427 ProfileSyncService* profile_sync_service, | 430 ProfileSyncService* profile_sync_service, |
| 428 browser_sync::DataTypeErrorHandler* error_handler, | 431 browser_sync::DataTypeErrorHandler* error_handler, |
| 429 const base::WeakPtr<syncer::SyncableService>& local_service, | 432 const base::WeakPtr<syncer::SyncableService>& local_service, |
| 430 const base::WeakPtr<syncer::SyncMergeResult>& merge_result) { | 433 const base::WeakPtr<syncer::SyncMergeResult>& merge_result) { |
| 431 syncer::UserShare* user_share = profile_sync_service->GetUserShare(); | 434 syncer::UserShare* user_share = profile_sync_service->GetUserShare(); |
| 435 // TODO(maniscalco): Construct a real AttachmentService with a real |
| 436 // AttachmentStore instead of this fake stuff. |
| 437 scoped_ptr<syncer::AttachmentStore> attachment_store( |
| 438 new syncer::FakeAttachmentStore( |
| 439 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); |
| 440 scoped_ptr<syncer::AttachmentService> attachment_service( |
| 441 new syncer::FakeAttachmentService(attachment_store.Pass())); |
| 432 return new GenericChangeProcessor(error_handler, | 442 return new GenericChangeProcessor(error_handler, |
| 433 local_service, | 443 local_service, |
| 434 merge_result, | 444 merge_result, |
| 435 user_share); | 445 user_share, |
| 446 attachment_service.Pass()); |
| 436 } | 447 } |
| 437 | 448 |
| 438 browser_sync::SharedChangeProcessor* ProfileSyncComponentsFactoryImpl:: | 449 browser_sync::SharedChangeProcessor* ProfileSyncComponentsFactoryImpl:: |
| 439 CreateSharedChangeProcessor() { | 450 CreateSharedChangeProcessor() { |
| 440 return new SharedChangeProcessor(); | 451 return new SharedChangeProcessor(); |
| 441 } | 452 } |
| 442 | 453 |
| 443 base::WeakPtr<syncer::SyncableService> ProfileSyncComponentsFactoryImpl:: | 454 base::WeakPtr<syncer::SyncableService> ProfileSyncComponentsFactoryImpl:: |
| 444 GetSyncableServiceForType(syncer::ModelType type) { | 455 GetSyncableServiceForType(syncer::ModelType type) { |
| 445 if (!profile_) { // For tests. | 456 if (!profile_) { // For tests. |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 ProfileSyncComponentsFactory::SyncComponents | 619 ProfileSyncComponentsFactory::SyncComponents |
| 609 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( | 620 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( |
| 610 ProfileSyncService* profile_sync_service, | 621 ProfileSyncService* profile_sync_service, |
| 611 DataTypeErrorHandler* error_handler) { | 622 DataTypeErrorHandler* error_handler) { |
| 612 SessionModelAssociator* model_associator = | 623 SessionModelAssociator* model_associator = |
| 613 new SessionModelAssociator(profile_sync_service, error_handler); | 624 new SessionModelAssociator(profile_sync_service, error_handler); |
| 614 SessionChangeProcessor* change_processor = | 625 SessionChangeProcessor* change_processor = |
| 615 new SessionChangeProcessor(error_handler, model_associator); | 626 new SessionChangeProcessor(error_handler, model_associator); |
| 616 return SyncComponents(model_associator, change_processor); | 627 return SyncComponents(model_associator, change_processor); |
| 617 } | 628 } |
| OLD | NEW |