Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: components/browser_sync/browser/profile_sync_components_factory_impl.cc

Issue 2017963002: [Sync] Remove DeviceInfoModelTypeController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | components/sync_driver.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 11 matching lines...) Expand all
22 #include "components/history/core/browser/history_delete_directives_data_type_co ntroller.h" 22 #include "components/history/core/browser/history_delete_directives_data_type_co ntroller.h"
23 #include "components/history/core/browser/typed_url_data_type_controller.h" 23 #include "components/history/core/browser/typed_url_data_type_controller.h"
24 #include "components/password_manager/core/browser/password_store.h" 24 #include "components/password_manager/core/browser/password_store.h"
25 #include "components/password_manager/sync/browser/password_data_type_controller .h" 25 #include "components/password_manager/sync/browser/password_data_type_controller .h"
26 #include "components/prefs/pref_service.h" 26 #include "components/prefs/pref_service.h"
27 #include "components/sync_bookmarks/bookmark_change_processor.h" 27 #include "components/sync_bookmarks/bookmark_change_processor.h"
28 #include "components/sync_bookmarks/bookmark_data_type_controller.h" 28 #include "components/sync_bookmarks/bookmark_data_type_controller.h"
29 #include "components/sync_bookmarks/bookmark_model_associator.h" 29 #include "components/sync_bookmarks/bookmark_model_associator.h"
30 #include "components/sync_driver/data_type_manager_impl.h" 30 #include "components/sync_driver/data_type_manager_impl.h"
31 #include "components/sync_driver/device_info_data_type_controller.h" 31 #include "components/sync_driver/device_info_data_type_controller.h"
32 #include "components/sync_driver/device_info_model_type_controller.h"
33 #include "components/sync_driver/glue/chrome_report_unrecoverable_error.h" 32 #include "components/sync_driver/glue/chrome_report_unrecoverable_error.h"
34 #include "components/sync_driver/glue/sync_backend_host.h" 33 #include "components/sync_driver/glue/sync_backend_host.h"
35 #include "components/sync_driver/glue/sync_backend_host_impl.h" 34 #include "components/sync_driver/glue/sync_backend_host_impl.h"
36 #include "components/sync_driver/local_device_info_provider_impl.h" 35 #include "components/sync_driver/local_device_info_provider_impl.h"
37 #include "components/sync_driver/proxy_data_type_controller.h" 36 #include "components/sync_driver/proxy_data_type_controller.h"
38 #include "components/sync_driver/sync_client.h" 37 #include "components/sync_driver/sync_client.h"
39 #include "components/sync_driver/sync_driver_switches.h" 38 #include "components/sync_driver/sync_driver_switches.h"
40 #include "components/sync_driver/ui_data_type_controller.h" 39 #include "components/sync_driver/ui_data_type_controller.h"
40 #include "components/sync_driver/ui_model_type_controller.h"
41 #include "components/sync_sessions/session_data_type_controller.h" 41 #include "components/sync_sessions/session_data_type_controller.h"
42 #include "google_apis/gaia/oauth2_token_service.h" 42 #include "google_apis/gaia/oauth2_token_service.h"
43 #include "google_apis/gaia/oauth2_token_service_request.h" 43 #include "google_apis/gaia/oauth2_token_service_request.h"
44 #include "net/url_request/url_request_context_getter.h" 44 #include "net/url_request/url_request_context_getter.h"
45 #include "sync/internal_api/public/attachments/attachment_downloader.h" 45 #include "sync/internal_api/public/attachments/attachment_downloader.h"
46 #include "sync/internal_api/public/attachments/attachment_service.h" 46 #include "sync/internal_api/public/attachments/attachment_service.h"
47 #include "sync/internal_api/public/attachments/attachment_service_impl.h" 47 #include "sync/internal_api/public/attachments/attachment_service_impl.h"
48 #include "sync/internal_api/public/attachments/attachment_uploader_impl.h" 48 #include "sync/internal_api/public/attachments/attachment_uploader_impl.h"
49 49
50 using bookmarks::BookmarkModel; 50 using bookmarks::BookmarkModel;
51 using browser_sync::AutofillDataTypeController; 51 using browser_sync::AutofillDataTypeController;
52 using browser_sync::AutofillProfileDataTypeController; 52 using browser_sync::AutofillProfileDataTypeController;
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 syncer::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::UIModelTypeController;
71 71
72 namespace { 72 namespace {
73 73
74 syncer::ModelTypeSet GetDisabledTypesFromCommandLine( 74 syncer::ModelTypeSet GetDisabledTypesFromCommandLine(
75 const base::CommandLine& command_line) { 75 const base::CommandLine& command_line) {
76 syncer::ModelTypeSet disabled_types; 76 syncer::ModelTypeSet disabled_types;
77 std::string disabled_types_str = 77 std::string disabled_types_str =
78 command_line.GetSwitchValueASCII(switches::kDisableSyncTypes); 78 command_line.GetSwitchValueASCII(switches::kDisableSyncTypes);
79 79
80 disabled_types = syncer::ModelTypeSetFromString(disabled_types_str); 80 disabled_types = syncer::ModelTypeSetFromString(disabled_types_str);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 void ProfileSyncComponentsFactoryImpl::RegisterCommonDataTypes( 138 void ProfileSyncComponentsFactoryImpl::RegisterCommonDataTypes(
139 sync_driver::SyncService* sync_service, 139 sync_driver::SyncService* sync_service,
140 syncer::ModelTypeSet disabled_types, 140 syncer::ModelTypeSet disabled_types,
141 syncer::ModelTypeSet enabled_types) { 141 syncer::ModelTypeSet enabled_types) {
142 base::Closure error_callback = 142 base::Closure error_callback =
143 base::Bind(&ChromeReportUnrecoverableError, channel_); 143 base::Bind(&ChromeReportUnrecoverableError, channel_);
144 144
145 // TODO(stanisc): can DEVICE_INFO be one of disabled datatypes? 145 // TODO(stanisc): can DEVICE_INFO be one of disabled datatypes?
146 if (channel_ == version_info::Channel::UNKNOWN && 146 if (channel_ == version_info::Channel::UNKNOWN &&
147 command_line_.HasSwitch(switches::kSyncEnableUSSDeviceInfo)) { 147 command_line_.HasSwitch(switches::kSyncEnableUSSDeviceInfo)) {
148 sync_service->RegisterDataTypeController(new DeviceInfoModelTypeController( 148 sync_service->RegisterDataTypeController(new UIModelTypeController(
149 ui_thread_, error_callback, sync_client_)); 149 ui_thread_, error_callback, syncer::DEVICE_INFO, sync_client_));
150 } else { 150 } else {
151 sync_service->RegisterDataTypeController(new DeviceInfoDataTypeController( 151 sync_service->RegisterDataTypeController(new DeviceInfoDataTypeController(
152 ui_thread_, error_callback, sync_client_, 152 ui_thread_, error_callback, sync_client_,
153 sync_service->GetLocalDeviceInfoProvider())); 153 sync_service->GetLocalDeviceInfoProvider()));
154 } 154 }
155 155
156 // Autofill sync is enabled by default. Register unless explicitly 156 // Autofill sync is enabled by default. Register unless explicitly
157 // disabled. 157 // disabled.
158 if (!disabled_types.Has(syncer::AUTOFILL)) { 158 if (!disabled_types.Has(syncer::AUTOFILL)) {
159 sync_service->RegisterDataTypeController( 159 sync_service->RegisterDataTypeController(
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 #else 383 #else
384 const bool kExpectMobileBookmarksFolder = false; 384 const bool kExpectMobileBookmarksFolder = false;
385 #endif 385 #endif
386 BookmarkModelAssociator* model_associator = new BookmarkModelAssociator( 386 BookmarkModelAssociator* model_associator = new BookmarkModelAssociator(
387 bookmark_model, sync_service->GetSyncClient(), user_share, error_handler, 387 bookmark_model, sync_service->GetSyncClient(), user_share, error_handler,
388 kExpectMobileBookmarksFolder); 388 kExpectMobileBookmarksFolder);
389 BookmarkChangeProcessor* change_processor = new BookmarkChangeProcessor( 389 BookmarkChangeProcessor* change_processor = new BookmarkChangeProcessor(
390 sync_service->GetSyncClient(), model_associator, error_handler); 390 sync_service->GetSyncClient(), model_associator, error_handler);
391 return SyncComponents(model_associator, change_processor); 391 return SyncComponents(model_associator, change_processor);
392 } 392 }
OLDNEW
« no previous file with comments | « no previous file | components/sync_driver.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698