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/password_manager/core/browser/password_store.h" | 54 #include "components/password_manager/core/browser/password_store.h" |
55 #include "components/search_engines/template_url_service.h" | 55 #include "components/search_engines/template_url_service.h" |
56 #include "components/signin/core/browser/signin_manager.h" | 56 #include "components/signin/core/browser/signin_manager.h" |
57 #include "components/sync_driver/data_type_manager_impl.h" | 57 #include "components/sync_driver/data_type_manager_impl.h" |
58 #include "components/sync_driver/data_type_manager_observer.h" | 58 #include "components/sync_driver/data_type_manager_observer.h" |
59 #include "components/sync_driver/generic_change_processor.h" | 59 #include "components/sync_driver/generic_change_processor.h" |
60 #include "components/sync_driver/proxy_data_type_controller.h" | 60 #include "components/sync_driver/proxy_data_type_controller.h" |
61 #include "components/sync_driver/shared_change_processor.h" | 61 #include "components/sync_driver/shared_change_processor.h" |
62 #include "components/sync_driver/ui_data_type_controller.h" | 62 #include "components/sync_driver/ui_data_type_controller.h" |
63 #include "content/public/browser/browser_thread.h" | 63 #include "content/public/browser/browser_thread.h" |
64 #include "extensions/browser/extension_system.h" | |
65 #include "google_apis/gaia/oauth2_token_service_request.h" | 64 #include "google_apis/gaia/oauth2_token_service_request.h" |
66 #include "net/url_request/url_request_context_getter.h" | 65 #include "net/url_request/url_request_context_getter.h" |
67 #include "sync/api/attachments/attachment_downloader.h" | 66 #include "sync/api/attachments/attachment_downloader.h" |
68 #include "sync/api/attachments/attachment_service.h" | 67 #include "sync/api/attachments/attachment_service.h" |
69 #include "sync/api/attachments/attachment_service_impl.h" | 68 #include "sync/api/attachments/attachment_service_impl.h" |
70 #include "sync/api/syncable_service.h" | 69 #include "sync/api/syncable_service.h" |
71 #include "sync/internal_api/public/attachments/attachment_uploader_impl.h" | 70 #include "sync/internal_api/public/attachments/attachment_uploader_impl.h" |
72 #include "sync/internal_api/public/attachments/fake_attachment_store.h" | 71 #include "sync/internal_api/public/attachments/fake_attachment_store.h" |
73 | 72 |
| 73 #if defined(ENABLE_APP_LIST) |
| 74 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" |
| 75 #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h" |
| 76 #include "ui/app_list/app_list_switches.h" |
| 77 #endif |
| 78 |
74 #if defined(ENABLE_EXTENSIONS) | 79 #if defined(ENABLE_EXTENSIONS) |
75 #include "chrome/browser/extensions/api/storage/settings_sync_util.h" | 80 #include "chrome/browser/extensions/api/storage/settings_sync_util.h" |
76 #include "chrome/browser/extensions/api/synced_notifications_private/synced_noti
fications_shim.h" | 81 #include "chrome/browser/extensions/api/synced_notifications_private/synced_noti
fications_shim.h" |
77 #include "chrome/browser/extensions/extension_sync_service.h" | 82 #include "chrome/browser/extensions/extension_sync_service.h" |
78 #endif | 83 #endif |
79 | 84 |
80 #if defined(ENABLE_APP_LIST) | |
81 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" | |
82 #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h" | |
83 #include "ui/app_list/app_list_switches.h" | |
84 #endif | |
85 | |
86 #if defined(ENABLE_MANAGED_USERS) | 85 #if defined(ENABLE_MANAGED_USERS) |
87 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" | 86 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" |
88 #include "chrome/browser/supervised_user/supervised_user_settings_service_factor
y.h" | 87 #include "chrome/browser/supervised_user/supervised_user_settings_service_factor
y.h" |
89 #include "chrome/browser/supervised_user/supervised_user_shared_settings_service
.h" | 88 #include "chrome/browser/supervised_user/supervised_user_shared_settings_service
.h" |
90 #include "chrome/browser/supervised_user/supervised_user_shared_settings_service
_factory.h" | 89 #include "chrome/browser/supervised_user/supervised_user_shared_settings_service
_factory.h" |
91 #include "chrome/browser/supervised_user/supervised_user_sync_data_type_controll
er.h" | 90 #include "chrome/browser/supervised_user/supervised_user_sync_data_type_controll
er.h" |
92 #include "chrome/browser/supervised_user/supervised_user_sync_service.h" | 91 #include "chrome/browser/supervised_user/supervised_user_sync_service.h" |
93 #include "chrome/browser/supervised_user/supervised_user_sync_service_factory.h" | 92 #include "chrome/browser/supervised_user/supervised_user_sync_service_factory.h" |
94 #endif | 93 #endif |
95 | 94 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 } // namespace | 147 } // namespace |
149 | 148 |
150 ProfileSyncComponentsFactoryImpl::ProfileSyncComponentsFactoryImpl( | 149 ProfileSyncComponentsFactoryImpl::ProfileSyncComponentsFactoryImpl( |
151 Profile* profile, | 150 Profile* profile, |
152 CommandLine* command_line, | 151 CommandLine* command_line, |
153 const GURL& sync_service_url, | 152 const GURL& sync_service_url, |
154 OAuth2TokenService* token_service, | 153 OAuth2TokenService* token_service, |
155 net::URLRequestContextGetter* url_request_context_getter) | 154 net::URLRequestContextGetter* url_request_context_getter) |
156 : profile_(profile), | 155 : profile_(profile), |
157 command_line_(command_line), | 156 command_line_(command_line), |
158 extension_system_(extensions::ExtensionSystem::Get(profile)), | |
159 web_data_service_(WebDataServiceFactory::GetAutofillWebDataForProfile( | 157 web_data_service_(WebDataServiceFactory::GetAutofillWebDataForProfile( |
160 profile_, Profile::EXPLICIT_ACCESS)), | 158 profile_, Profile::EXPLICIT_ACCESS)), |
161 sync_service_url_(sync_service_url), | 159 sync_service_url_(sync_service_url), |
162 token_service_(token_service), | 160 token_service_(token_service), |
163 url_request_context_getter_(url_request_context_getter), | 161 url_request_context_getter_(url_request_context_getter), |
164 weak_factory_(this) { | 162 weak_factory_(this) { |
165 DCHECK(token_service_); | 163 DCHECK(token_service_); |
166 DCHECK(url_request_context_getter_); | 164 DCHECK(url_request_context_getter_); |
167 } | 165 } |
168 | 166 |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 // Preference sync is enabled by default. Register unless explicitly | 342 // Preference sync is enabled by default. Register unless explicitly |
345 // disabled. | 343 // disabled. |
346 if (!disabled_types.Has(syncer::PREFERENCES)) { | 344 if (!disabled_types.Has(syncer::PREFERENCES)) { |
347 pss->RegisterDataTypeController( | 345 pss->RegisterDataTypeController( |
348 new UIDataTypeController( | 346 new UIDataTypeController( |
349 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 347 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
350 base::Bind(&ChromeReportUnrecoverableError), | 348 base::Bind(&ChromeReportUnrecoverableError), |
351 MakeDisableCallbackFor(syncer::PREFERENCES), | 349 MakeDisableCallbackFor(syncer::PREFERENCES), |
352 syncer::PREFERENCES, | 350 syncer::PREFERENCES, |
353 this)); | 351 this)); |
354 | |
355 } | 352 } |
356 | 353 |
357 if (!disabled_types.Has(syncer::PRIORITY_PREFERENCES)) { | 354 if (!disabled_types.Has(syncer::PRIORITY_PREFERENCES)) { |
358 pss->RegisterDataTypeController( | 355 pss->RegisterDataTypeController( |
359 new UIDataTypeController( | 356 new UIDataTypeController( |
360 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 357 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
361 base::Bind(&ChromeReportUnrecoverableError), | 358 base::Bind(&ChromeReportUnrecoverableError), |
362 MakeDisableCallbackFor(syncer::PRIORITY_PREFERENCES), | 359 MakeDisableCallbackFor(syncer::PRIORITY_PREFERENCES), |
363 syncer::PRIORITY_PREFERENCES, | 360 syncer::PRIORITY_PREFERENCES, |
364 this)); | 361 this)); |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 new TypedUrlModelAssociator(profile_sync_service, | 717 new TypedUrlModelAssociator(profile_sync_service, |
721 history_backend, | 718 history_backend, |
722 error_handler); | 719 error_handler); |
723 TypedUrlChangeProcessor* change_processor = | 720 TypedUrlChangeProcessor* change_processor = |
724 new TypedUrlChangeProcessor(profile_, | 721 new TypedUrlChangeProcessor(profile_, |
725 model_associator, | 722 model_associator, |
726 history_backend, | 723 history_backend, |
727 error_handler); | 724 error_handler); |
728 return SyncComponents(model_associator, change_processor); | 725 return SyncComponents(model_associator, change_processor); |
729 } | 726 } |
OLD | NEW |