| 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/bookmarks/enhanced_bookmarks_features.h" | 8 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" |
| 9 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" | 9 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" |
| 10 #include "chrome/browser/history/history_service.h" | 10 #include "chrome/browser/history/history_service.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 #include "components/signin/core/browser/signin_manager.h" | 54 #include "components/signin/core/browser/signin_manager.h" |
| 55 #include "components/sync_driver/data_type_manager_impl.h" | 55 #include "components/sync_driver/data_type_manager_impl.h" |
| 56 #include "components/sync_driver/data_type_manager_observer.h" | 56 #include "components/sync_driver/data_type_manager_observer.h" |
| 57 #include "components/sync_driver/generic_change_processor.h" | 57 #include "components/sync_driver/generic_change_processor.h" |
| 58 #include "components/sync_driver/proxy_data_type_controller.h" | 58 #include "components/sync_driver/proxy_data_type_controller.h" |
| 59 #include "content/public/browser/browser_thread.h" | 59 #include "content/public/browser/browser_thread.h" |
| 60 #include "extensions/browser/extension_system.h" | 60 #include "extensions/browser/extension_system.h" |
| 61 #include "sync/api/attachments/attachment_service.h" | 61 #include "sync/api/attachments/attachment_service.h" |
| 62 #include "sync/api/attachments/attachment_service_impl.h" | 62 #include "sync/api/attachments/attachment_service_impl.h" |
| 63 #include "sync/api/syncable_service.h" | 63 #include "sync/api/syncable_service.h" |
| 64 #include "sync/internal_api/public/attachments/fake_attachment_downloader.h" |
| 64 #include "sync/internal_api/public/attachments/fake_attachment_store.h" | 65 #include "sync/internal_api/public/attachments/fake_attachment_store.h" |
| 65 #include "sync/internal_api/public/attachments/fake_attachment_uploader.h" | 66 #include "sync/internal_api/public/attachments/fake_attachment_uploader.h" |
| 66 | 67 |
| 67 #if defined(ENABLE_EXTENSIONS) | 68 #if defined(ENABLE_EXTENSIONS) |
| 68 #include "chrome/browser/extensions/api/storage/settings_sync_util.h" | 69 #include "chrome/browser/extensions/api/storage/settings_sync_util.h" |
| 69 #include "chrome/browser/extensions/extension_sync_service.h" | 70 #include "chrome/browser/extensions/extension_sync_service.h" |
| 70 #endif | 71 #endif |
| 71 | 72 |
| 72 #if defined(ENABLE_APP_LIST) | 73 #if defined(ENABLE_APP_LIST) |
| 73 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" | 74 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 // Bookmarks | 563 // Bookmarks |
| 563 // Typed URLs | 564 // Typed URLs |
| 564 NOTREACHED(); | 565 NOTREACHED(); |
| 565 return base::WeakPtr<syncer::SyncableService>(); | 566 return base::WeakPtr<syncer::SyncableService>(); |
| 566 } | 567 } |
| 567 } | 568 } |
| 568 | 569 |
| 569 scoped_ptr<syncer::AttachmentService> | 570 scoped_ptr<syncer::AttachmentService> |
| 570 ProfileSyncComponentsFactoryImpl::CreateAttachmentService( | 571 ProfileSyncComponentsFactoryImpl::CreateAttachmentService( |
| 571 syncer::AttachmentService::Delegate* delegate) { | 572 syncer::AttachmentService::Delegate* delegate) { |
| 572 // TODO(maniscalco): Use a shared (one per profile) thread-safe instance of | 573 // TODO(maniscalco): Use a shared (one per profile) thread-safe instances of |
| 573 // AttachmentUpload instead of creating a new one per AttachmentService (bug | 574 // AttachmentUploader and AttachmentDownloader instead of creating a new one |
| 574 // 369536). | 575 // per AttachmentService (bug 369536). |
| 575 scoped_ptr<syncer::AttachmentUploader> attachment_uploader( | 576 scoped_ptr<syncer::AttachmentUploader> attachment_uploader( |
| 576 new syncer::FakeAttachmentUploader); | 577 new syncer::FakeAttachmentUploader); |
| 578 scoped_ptr<syncer::AttachmentDownloader> attachment_downloader( |
| 579 new syncer::FakeAttachmentDownloader()); |
| 577 | 580 |
| 578 scoped_ptr<syncer::AttachmentStore> attachment_store( | 581 scoped_ptr<syncer::AttachmentStore> attachment_store( |
| 579 new syncer::FakeAttachmentStore( | 582 new syncer::FakeAttachmentStore( |
| 580 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); | 583 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); |
| 581 | 584 |
| 582 scoped_ptr<syncer::AttachmentService> attachment_service( | 585 scoped_ptr<syncer::AttachmentService> attachment_service( |
| 583 new syncer::AttachmentServiceImpl( | 586 new syncer::AttachmentServiceImpl(attachment_store.Pass(), |
| 584 attachment_store.Pass(), attachment_uploader.Pass(), delegate)); | 587 attachment_uploader.Pass(), |
| 588 attachment_downloader.Pass(), |
| 589 delegate)); |
| 585 | 590 |
| 586 return attachment_service.Pass(); | 591 return attachment_service.Pass(); |
| 587 } | 592 } |
| 588 | 593 |
| 589 ProfileSyncComponentsFactory::SyncComponents | 594 ProfileSyncComponentsFactory::SyncComponents |
| 590 ProfileSyncComponentsFactoryImpl::CreateBookmarkSyncComponents( | 595 ProfileSyncComponentsFactoryImpl::CreateBookmarkSyncComponents( |
| 591 ProfileSyncService* profile_sync_service, | 596 ProfileSyncService* profile_sync_service, |
| 592 DataTypeErrorHandler* error_handler) { | 597 DataTypeErrorHandler* error_handler) { |
| 593 BookmarkModel* bookmark_model = | 598 BookmarkModel* bookmark_model = |
| 594 BookmarkModelFactory::GetForProfile(profile_sync_service->profile()); | 599 BookmarkModelFactory::GetForProfile(profile_sync_service->profile()); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 621 new TypedUrlModelAssociator(profile_sync_service, | 626 new TypedUrlModelAssociator(profile_sync_service, |
| 622 history_backend, | 627 history_backend, |
| 623 error_handler); | 628 error_handler); |
| 624 TypedUrlChangeProcessor* change_processor = | 629 TypedUrlChangeProcessor* change_processor = |
| 625 new TypedUrlChangeProcessor(profile_, | 630 new TypedUrlChangeProcessor(profile_, |
| 626 model_associator, | 631 model_associator, |
| 627 history_backend, | 632 history_backend, |
| 628 error_handler); | 633 error_handler); |
| 629 return SyncComponents(model_associator, change_processor); | 634 return SyncComponents(model_associator, change_processor); |
| 630 } | 635 } |
| OLD | NEW |