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 "components/browser_sync/browser/profile_sync_components_factory_impl.h
" | 5 #include "components/browser_sync/browser/profile_sync_components_factory_impl.h
" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 using browser_sync::BookmarkChangeProcessor; | 53 using browser_sync::BookmarkChangeProcessor; |
54 using browser_sync::BookmarkDataTypeController; | 54 using browser_sync::BookmarkDataTypeController; |
55 using browser_sync::BookmarkModelAssociator; | 55 using browser_sync::BookmarkModelAssociator; |
56 using browser_sync::ChromeReportUnrecoverableError; | 56 using browser_sync::ChromeReportUnrecoverableError; |
57 using browser_sync::HistoryDeleteDirectivesDataTypeController; | 57 using browser_sync::HistoryDeleteDirectivesDataTypeController; |
58 using browser_sync::PasswordDataTypeController; | 58 using browser_sync::PasswordDataTypeController; |
59 using browser_sync::SessionDataTypeController; | 59 using browser_sync::SessionDataTypeController; |
60 using browser_sync::SyncBackendHost; | 60 using browser_sync::SyncBackendHost; |
61 using browser_sync::TypedUrlDataTypeController; | 61 using browser_sync::TypedUrlDataTypeController; |
62 using sync_driver::DataTypeController; | 62 using sync_driver::DataTypeController; |
63 using sync_driver::DataTypeErrorHandler; | 63 using syncer::DataTypeErrorHandler; |
64 using sync_driver::DataTypeManager; | 64 using sync_driver::DataTypeManager; |
65 using sync_driver::DataTypeManagerImpl; | 65 using sync_driver::DataTypeManagerImpl; |
66 using sync_driver::DataTypeManagerObserver; | 66 using sync_driver::DataTypeManagerObserver; |
67 using sync_driver::DeviceInfoDataTypeController; | 67 using sync_driver::DeviceInfoDataTypeController; |
68 using sync_driver::ProxyDataTypeController; | 68 using sync_driver::ProxyDataTypeController; |
69 using sync_driver::UIDataTypeController; | 69 using sync_driver::UIDataTypeController; |
70 using sync_driver_v2::DeviceInfoModelTypeController; | 70 using sync_driver_v2::DeviceInfoModelTypeController; |
71 | 71 |
72 namespace { | 72 namespace { |
73 | 73 |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 new syncer::AttachmentServiceImpl( | 367 new syncer::AttachmentServiceImpl( |
368 std::move(attachment_store), std::move(attachment_uploader), | 368 std::move(attachment_store), std::move(attachment_uploader), |
369 std::move(attachment_downloader), delegate, initial_backoff_delay, | 369 std::move(attachment_downloader), delegate, initial_backoff_delay, |
370 max_backoff_delay)); | 370 max_backoff_delay)); |
371 return attachment_service; | 371 return attachment_service; |
372 } | 372 } |
373 | 373 |
374 sync_driver::SyncApiComponentFactory::SyncComponents | 374 sync_driver::SyncApiComponentFactory::SyncComponents |
375 ProfileSyncComponentsFactoryImpl::CreateBookmarkSyncComponents( | 375 ProfileSyncComponentsFactoryImpl::CreateBookmarkSyncComponents( |
376 sync_driver::SyncService* sync_service, | 376 sync_driver::SyncService* sync_service, |
377 sync_driver::DataTypeErrorHandler* error_handler) { | 377 syncer::DataTypeErrorHandler* error_handler) { |
378 BookmarkModel* bookmark_model = | 378 BookmarkModel* bookmark_model = |
379 sync_service->GetSyncClient()->GetBookmarkModel(); | 379 sync_service->GetSyncClient()->GetBookmarkModel(); |
380 syncer::UserShare* user_share = sync_service->GetUserShare(); | 380 syncer::UserShare* user_share = sync_service->GetUserShare(); |
381 // TODO(akalin): We may want to propagate this switch up eventually. | 381 // TODO(akalin): We may want to propagate this switch up eventually. |
382 #if defined(OS_ANDROID) || defined(OS_IOS) | 382 #if defined(OS_ANDROID) || defined(OS_IOS) |
383 const bool kExpectMobileBookmarksFolder = true; | 383 const bool kExpectMobileBookmarksFolder = true; |
384 #else | 384 #else |
385 const bool kExpectMobileBookmarksFolder = false; | 385 const bool kExpectMobileBookmarksFolder = false; |
386 #endif | 386 #endif |
387 BookmarkModelAssociator* model_associator = new BookmarkModelAssociator( | 387 BookmarkModelAssociator* model_associator = new BookmarkModelAssociator( |
388 bookmark_model, sync_service->GetSyncClient(), user_share, error_handler, | 388 bookmark_model, sync_service->GetSyncClient(), user_share, error_handler, |
389 kExpectMobileBookmarksFolder); | 389 kExpectMobileBookmarksFolder); |
390 BookmarkChangeProcessor* change_processor = new BookmarkChangeProcessor( | 390 BookmarkChangeProcessor* change_processor = new BookmarkChangeProcessor( |
391 sync_service->GetSyncClient(), model_associator, error_handler); | 391 sync_service->GetSyncClient(), model_associator, error_handler); |
392 return SyncComponents(model_associator, change_processor); | 392 return SyncComponents(model_associator, change_processor); |
393 } | 393 } |
OLD | NEW |