| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/chrome_sync_client.h" | 5 #include "chrome/browser/sync/chrome_sync_client.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 #include "components/browser_sync/profile_sync_components_factory_impl.h" | 47 #include "components/browser_sync/profile_sync_components_factory_impl.h" |
| 48 #include "components/browser_sync/profile_sync_service.h" | 48 #include "components/browser_sync/profile_sync_service.h" |
| 49 #include "components/dom_distiller/core/dom_distiller_service.h" | 49 #include "components/dom_distiller/core/dom_distiller_service.h" |
| 50 #include "components/history/core/browser/history_model_worker.h" | 50 #include "components/history/core/browser/history_model_worker.h" |
| 51 #include "components/history/core/browser/history_service.h" | 51 #include "components/history/core/browser/history_service.h" |
| 52 #include "components/invalidation/impl/profile_invalidation_provider.h" | 52 #include "components/invalidation/impl/profile_invalidation_provider.h" |
| 53 #include "components/password_manager/core/browser/password_store.h" | 53 #include "components/password_manager/core/browser/password_store.h" |
| 54 #include "components/password_manager/sync/browser/password_model_worker.h" | 54 #include "components/password_manager/sync/browser/password_model_worker.h" |
| 55 #include "components/search_engines/search_engine_data_type_controller.h" | 55 #include "components/search_engines/search_engine_data_type_controller.h" |
| 56 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 56 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
| 57 #include "components/spellcheck/spellcheck_build_features.h" |
| 57 #include "components/sync/base/report_unrecoverable_error.h" | 58 #include "components/sync/base/report_unrecoverable_error.h" |
| 58 #include "components/sync/driver/glue/browser_thread_model_worker.h" | 59 #include "components/sync/driver/glue/browser_thread_model_worker.h" |
| 59 #include "components/sync/driver/glue/ui_model_worker.h" | 60 #include "components/sync/driver/glue/ui_model_worker.h" |
| 60 #include "components/sync/driver/sync_api_component_factory.h" | 61 #include "components/sync/driver/sync_api_component_factory.h" |
| 61 #include "components/sync/driver/sync_util.h" | 62 #include "components/sync/driver/sync_util.h" |
| 62 #include "components/sync/driver/ui_data_type_controller.h" | 63 #include "components/sync/driver/ui_data_type_controller.h" |
| 63 #include "components/sync/engine/passive_model_worker.h" | 64 #include "components/sync/engine/passive_model_worker.h" |
| 64 #include "components/sync_preferences/pref_service_syncable.h" | 65 #include "components/sync_preferences/pref_service_syncable.h" |
| 65 #include "components/sync_sessions/sync_sessions_client.h" | 66 #include "components/sync_sessions/sync_sessions_client.h" |
| 66 #include "content/public/browser/browser_thread.h" | 67 #include "content/public/browser/browser_thread.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 86 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h" | 87 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h" |
| 87 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service_fac
tory.h" | 88 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service_fac
tory.h" |
| 88 #include "chrome/browser/supervised_user/supervised_user_service.h" | 89 #include "chrome/browser/supervised_user/supervised_user_service.h" |
| 89 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" | 90 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" |
| 90 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" | 91 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" |
| 91 #include "chrome/browser/supervised_user/supervised_user_settings_service_factor
y.h" | 92 #include "chrome/browser/supervised_user/supervised_user_settings_service_factor
y.h" |
| 92 #include "chrome/browser/supervised_user/supervised_user_sync_data_type_controll
er.h" | 93 #include "chrome/browser/supervised_user/supervised_user_sync_data_type_controll
er.h" |
| 93 #include "chrome/browser/supervised_user/supervised_user_whitelist_service.h" | 94 #include "chrome/browser/supervised_user/supervised_user_whitelist_service.h" |
| 94 #endif | 95 #endif |
| 95 | 96 |
| 96 #if defined(ENABLE_SPELLCHECK) | 97 #if BUILDFLAG(ENABLE_SPELLCHECK) |
| 97 #include "chrome/browser/spellchecker/spellcheck_factory.h" | 98 #include "chrome/browser/spellchecker/spellcheck_factory.h" |
| 98 #include "chrome/browser/spellchecker/spellcheck_service.h" | 99 #include "chrome/browser/spellchecker/spellcheck_service.h" |
| 99 #endif | 100 #endif |
| 100 | 101 |
| 101 #if BUILDFLAG(ANDROID_JAVA_UI) | 102 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 102 #include "chrome/browser/sync/glue/synced_window_delegates_getter_android.h" | 103 #include "chrome/browser/sync/glue/synced_window_delegates_getter_android.h" |
| 103 #endif | 104 #endif |
| 104 | 105 |
| 105 #if defined(OS_CHROMEOS) | 106 #if defined(OS_CHROMEOS) |
| 106 #include "chrome/browser/ui/app_list/arc/arc_package_sync_data_type_controller.h
" | 107 #include "chrome/browser/ui/app_list/arc/arc_package_sync_data_type_controller.h
" |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 // We request history service with explicit access here because this | 359 // We request history service with explicit access here because this |
| 359 // codepath is executed on backend thread while HistoryServiceFactory | 360 // codepath is executed on backend thread while HistoryServiceFactory |
| 360 // checks preference value in implicit mode and PrefService expectes calls | 361 // checks preference value in implicit mode and PrefService expectes calls |
| 361 // only from UI thread. | 362 // only from UI thread. |
| 362 history::HistoryService* history = HistoryServiceFactory::GetForProfile( | 363 history::HistoryService* history = HistoryServiceFactory::GetForProfile( |
| 363 profile_, ServiceAccessType::EXPLICIT_ACCESS); | 364 profile_, ServiceAccessType::EXPLICIT_ACCESS); |
| 364 if (!history) | 365 if (!history) |
| 365 return base::WeakPtr<history::TypedUrlSyncableService>(); | 366 return base::WeakPtr<history::TypedUrlSyncableService>(); |
| 366 return history->GetTypedUrlSyncableService()->AsWeakPtr(); | 367 return history->GetTypedUrlSyncableService()->AsWeakPtr(); |
| 367 } | 368 } |
| 368 #if defined(ENABLE_SPELLCHECK) | 369 #if BUILDFLAG(ENABLE_SPELLCHECK) |
| 369 case syncer::DICTIONARY: | 370 case syncer::DICTIONARY: |
| 370 return SpellcheckServiceFactory::GetForContext(profile_)-> | 371 return SpellcheckServiceFactory::GetForContext(profile_)-> |
| 371 GetCustomDictionary()->AsWeakPtr(); | 372 GetCustomDictionary()->AsWeakPtr(); |
| 372 #endif | 373 #endif |
| 373 case syncer::FAVICON_IMAGES: | 374 case syncer::FAVICON_IMAGES: |
| 374 case syncer::FAVICON_TRACKING: { | 375 case syncer::FAVICON_TRACKING: { |
| 375 sync_sessions::FaviconCache* favicons = | 376 sync_sessions::FaviconCache* favicons = |
| 376 ProfileSyncServiceFactory::GetForProfile(profile_)->GetFaviconCache(); | 377 ProfileSyncServiceFactory::GetForProfile(profile_)->GetFaviconCache(); |
| 377 return favicons ? favicons->AsWeakPtr() | 378 return favicons ? favicons->AsWeakPtr() |
| 378 : base::WeakPtr<syncer::SyncableService>(); | 379 : base::WeakPtr<syncer::SyncableService>(); |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 sync_service->RegisterDataTypeController( | 628 sync_service->RegisterDataTypeController( |
| 628 base::MakeUnique<SupervisedUserSyncDataTypeController>( | 629 base::MakeUnique<SupervisedUserSyncDataTypeController>( |
| 629 syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_)); | 630 syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_)); |
| 630 sync_service->RegisterDataTypeController( | 631 sync_service->RegisterDataTypeController( |
| 631 base::MakeUnique<SupervisedUserSyncDataTypeController>( | 632 base::MakeUnique<SupervisedUserSyncDataTypeController>( |
| 632 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); | 633 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); |
| 633 #endif | 634 #endif |
| 634 } | 635 } |
| 635 | 636 |
| 636 } // namespace browser_sync | 637 } // namespace browser_sync |
| OLD | NEW |