Chromium Code Reviews| 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 "chrome/browser/sync/profile_sync_components_factory_impl.h" | 5 #include "chrome/browser/sync/profile_sync_components_factory_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/browser/sync/glue/autofill_data_type_controller.h" | 12 #include "chrome/browser/sync/glue/autofill_data_type_controller.h" |
| 13 #include "chrome/browser/sync/glue/autofill_profile_data_type_controller.h" | 13 #include "chrome/browser/sync/glue/autofill_profile_data_type_controller.h" |
| 14 #include "chrome/browser/sync/glue/history_delete_directives_data_type_controlle r.h" | 14 #include "chrome/browser/sync/glue/history_delete_directives_data_type_controlle r.h" |
| 15 #include "chrome/browser/sync/glue/local_device_info_provider_impl.h" | |
| 16 #include "chrome/browser/sync/glue/password_data_type_controller.h" | 15 #include "chrome/browser/sync/glue/password_data_type_controller.h" |
| 17 #include "chrome/browser/sync/glue/search_engine_data_type_controller.h" | 16 #include "chrome/browser/sync/glue/search_engine_data_type_controller.h" |
| 18 #include "chrome/browser/sync/glue/sync_backend_host.h" | 17 #include "chrome/browser/sync/glue/sync_backend_host.h" |
| 19 #include "chrome/browser/sync/glue/sync_backend_host_impl.h" | 18 #include "chrome/browser/sync/glue/sync_backend_host_impl.h" |
| 20 #include "chrome/browser/sync/glue/theme_data_type_controller.h" | 19 #include "chrome/browser/sync/glue/theme_data_type_controller.h" |
| 21 #include "chrome/browser/sync/glue/typed_url_change_processor.h" | 20 #include "chrome/browser/sync/glue/typed_url_change_processor.h" |
| 22 #include "chrome/browser/sync/glue/typed_url_data_type_controller.h" | 21 #include "chrome/browser/sync/glue/typed_url_data_type_controller.h" |
| 23 #include "chrome/browser/sync/profile_sync_service.h" | 22 #include "chrome/browser/sync/profile_sync_service.h" |
| 24 #include "chrome/browser/sync/sessions/session_data_type_controller.h" | 23 #include "chrome/browser/sync/sessions/session_data_type_controller.h" |
| 25 #include "chrome/common/channel_info.h" | 24 #include "chrome/common/channel_info.h" |
| 26 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
| 27 #include "chrome/common/pref_names.h" | 26 #include "chrome/common/pref_names.h" |
| 28 #include "components/autofill/core/browser/autofill_wallet_data_type_controller. h" | 27 #include "components/autofill/core/browser/autofill_wallet_data_type_controller. h" |
| 29 #include "components/autofill/core/common/autofill_pref_names.h" | 28 #include "components/autofill/core/common/autofill_pref_names.h" |
| 30 #include "components/autofill/core/common/autofill_switches.h" | 29 #include "components/autofill/core/common/autofill_switches.h" |
| 31 #include "components/dom_distiller/core/dom_distiller_features.h" | 30 #include "components/dom_distiller/core/dom_distiller_features.h" |
| 32 #include "components/sync_bookmarks/bookmark_change_processor.h" | 31 #include "components/sync_bookmarks/bookmark_change_processor.h" |
| 33 #include "components/sync_bookmarks/bookmark_data_type_controller.h" | 32 #include "components/sync_bookmarks/bookmark_data_type_controller.h" |
| 34 #include "components/sync_bookmarks/bookmark_model_associator.h" | 33 #include "components/sync_bookmarks/bookmark_model_associator.h" |
| 35 #include "components/sync_driver/data_type_manager_impl.h" | 34 #include "components/sync_driver/data_type_manager_impl.h" |
| 36 #include "components/sync_driver/device_info_data_type_controller.h" | 35 #include "components/sync_driver/device_info_data_type_controller.h" |
| 37 #include "components/sync_driver/glue/chrome_report_unrecoverable_error.h" | 36 #include "components/sync_driver/glue/chrome_report_unrecoverable_error.h" |
| 38 #include "components/sync_driver/glue/typed_url_model_associator.h" | 37 #include "components/sync_driver/glue/typed_url_model_associator.h" |
| 38 #include "components/sync_driver/local_device_info_provider_impl.h" | |
| 39 #include "components/sync_driver/proxy_data_type_controller.h" | 39 #include "components/sync_driver/proxy_data_type_controller.h" |
| 40 #include "components/sync_driver/sync_client.h" | 40 #include "components/sync_driver/sync_client.h" |
| 41 #include "components/sync_driver/ui_data_type_controller.h" | 41 #include "components/sync_driver/ui_data_type_controller.h" |
| 42 #include "content/public/browser/browser_thread.h" | 42 #include "content/public/browser/browser_thread.h" |
| 43 #include "google_apis/gaia/oauth2_token_service.h" | 43 #include "google_apis/gaia/oauth2_token_service.h" |
| 44 #include "google_apis/gaia/oauth2_token_service_request.h" | 44 #include "google_apis/gaia/oauth2_token_service_request.h" |
| 45 #include "net/url_request/url_request_context_getter.h" | 45 #include "net/url_request/url_request_context_getter.h" |
| 46 #include "sync/internal_api/public/attachments/attachment_downloader.h" | 46 #include "sync/internal_api/public/attachments/attachment_downloader.h" |
| 47 #include "sync/internal_api/public/attachments/attachment_service.h" | 47 #include "sync/internal_api/public/attachments/attachment_service.h" |
| 48 #include "sync/internal_api/public/attachments/attachment_service_impl.h" | 48 #include "sync/internal_api/public/attachments/attachment_service_impl.h" |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 414 const base::FilePath& sync_folder) { | 414 const base::FilePath& sync_folder) { |
| 415 return new browser_sync::SyncBackendHostImpl( | 415 return new browser_sync::SyncBackendHostImpl( |
| 416 name, profile_, | 416 name, profile_, |
| 417 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 417 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
| 418 invalidator, sync_prefs, sync_folder); | 418 invalidator, sync_prefs, sync_folder); |
| 419 } | 419 } |
| 420 | 420 |
| 421 scoped_ptr<sync_driver::LocalDeviceInfoProvider> | 421 scoped_ptr<sync_driver::LocalDeviceInfoProvider> |
| 422 ProfileSyncComponentsFactoryImpl::CreateLocalDeviceInfoProvider() { | 422 ProfileSyncComponentsFactoryImpl::CreateLocalDeviceInfoProvider() { |
| 423 return scoped_ptr<sync_driver::LocalDeviceInfoProvider>( | 423 return scoped_ptr<sync_driver::LocalDeviceInfoProvider>( |
| 424 new browser_sync::LocalDeviceInfoProviderImpl()); | 424 new browser_sync::LocalDeviceInfoProviderImpl( |
| 425 chrome::GetChannel(), chrome::GetVersionString())); | |
|
Avi (use Gerrit)
2015/10/10 03:52:51
Why don't you also pass in the is_tablet boolean h
Nicolas Zea
2015/10/12 17:44:02
Mainly from assuming we're going to eventually use
| |
| 425 } | 426 } |
| 426 | 427 |
| 427 class TokenServiceProvider | 428 class TokenServiceProvider |
| 428 : public OAuth2TokenServiceRequest::TokenServiceProvider { | 429 : public OAuth2TokenServiceRequest::TokenServiceProvider { |
| 429 public: | 430 public: |
| 430 TokenServiceProvider( | 431 TokenServiceProvider( |
| 431 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 432 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
| 432 OAuth2TokenService* token_service); | 433 OAuth2TokenService* token_service); |
| 433 | 434 |
| 434 // OAuth2TokenServiceRequest::TokenServiceProvider implementation. | 435 // OAuth2TokenServiceRequest::TokenServiceProvider implementation. |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 548 new TypedUrlModelAssociator(sync_service, | 549 new TypedUrlModelAssociator(sync_service, |
| 549 history_backend, | 550 history_backend, |
| 550 error_handler); | 551 error_handler); |
| 551 TypedUrlChangeProcessor* change_processor = | 552 TypedUrlChangeProcessor* change_processor = |
| 552 new TypedUrlChangeProcessor(profile_, | 553 new TypedUrlChangeProcessor(profile_, |
| 553 model_associator, | 554 model_associator, |
| 554 history_backend, | 555 history_backend, |
| 555 error_handler); | 556 error_handler); |
| 556 return SyncComponents(model_associator, change_processor); | 557 return SyncComponents(model_associator, change_processor); |
| 557 } | 558 } |
| OLD | NEW |