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

Side by Side Diff: chrome/browser/sync/chrome_sync_client.cc

Issue 2395533003: [Sync] Move some things from driver to base. (Closed)
Patch Set: Rebase. Created 4 years, 2 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
OLDNEW
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
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/sync/base/report_unrecoverable_error.h"
57 #include "components/sync/driver/glue/browser_thread_model_worker.h" 58 #include "components/sync/driver/glue/browser_thread_model_worker.h"
58 #include "components/sync/driver/glue/chrome_report_unrecoverable_error.h"
59 #include "components/sync/driver/glue/ui_model_worker.h" 59 #include "components/sync/driver/glue/ui_model_worker.h"
60 #include "components/sync/driver/sync_api_component_factory.h" 60 #include "components/sync/driver/sync_api_component_factory.h"
61 #include "components/sync/driver/sync_util.h" 61 #include "components/sync/driver/sync_util.h"
62 #include "components/sync/driver/ui_data_type_controller.h" 62 #include "components/sync/driver/ui_data_type_controller.h"
63 #include "components/sync/engine/passive_model_worker.h" 63 #include "components/sync/engine/passive_model_worker.h"
64 #include "components/sync_sessions/sync_sessions_client.h" 64 #include "components/sync_sessions/sync_sessions_client.h"
65 #include "components/syncable_prefs/pref_service_syncable.h" 65 #include "components/syncable_prefs/pref_service_syncable.h"
66 #include "content/public/browser/browser_thread.h" 66 #include "content/public/browser/browser_thread.h"
67 #include "ui/base/device_form_factor.h" 67 #include "ui/base/device_form_factor.h"
68 68
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 } 506 }
507 } 507 }
508 } 508 }
509 } 509 }
510 510
511 void ChromeSyncClient::RegisterDesktopDataTypes( 511 void ChromeSyncClient::RegisterDesktopDataTypes(
512 syncer::SyncService* sync_service, 512 syncer::SyncService* sync_service,
513 syncer::ModelTypeSet disabled_types, 513 syncer::ModelTypeSet disabled_types,
514 syncer::ModelTypeSet enabled_types) { 514 syncer::ModelTypeSet enabled_types) {
515 base::Closure error_callback = 515 base::Closure error_callback =
516 base::Bind(&syncer::ChromeReportUnrecoverableError, chrome::GetChannel()); 516 base::Bind(&syncer::ReportUnrecoverableError, chrome::GetChannel());
517 517
518 #if defined(ENABLE_EXTENSIONS) 518 #if defined(ENABLE_EXTENSIONS)
519 // App sync is enabled by default. Register unless explicitly 519 // App sync is enabled by default. Register unless explicitly
520 // disabled. 520 // disabled.
521 if (!disabled_types.Has(syncer::APPS)) { 521 if (!disabled_types.Has(syncer::APPS)) {
522 sync_service->RegisterDataTypeController( 522 sync_service->RegisterDataTypeController(
523 base::MakeUnique<ExtensionDataTypeController>( 523 base::MakeUnique<ExtensionDataTypeController>(
524 syncer::APPS, error_callback, this, profile_)); 524 syncer::APPS, error_callback, this, profile_));
525 } 525 }
526 526
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 base::MakeUnique<ArcPackageSyncDataTypeController>( 615 base::MakeUnique<ArcPackageSyncDataTypeController>(
616 syncer::ARC_PACKAGE, error_callback, this, profile_)); 616 syncer::ARC_PACKAGE, error_callback, this, profile_));
617 #endif 617 #endif
618 } 618 }
619 619
620 void ChromeSyncClient::RegisterAndroidDataTypes( 620 void ChromeSyncClient::RegisterAndroidDataTypes(
621 syncer::SyncService* sync_service, 621 syncer::SyncService* sync_service,
622 syncer::ModelTypeSet disabled_types, 622 syncer::ModelTypeSet disabled_types,
623 syncer::ModelTypeSet enabled_types) { 623 syncer::ModelTypeSet enabled_types) {
624 base::Closure error_callback = 624 base::Closure error_callback =
625 base::Bind(&syncer::ChromeReportUnrecoverableError, chrome::GetChannel()); 625 base::Bind(&syncer::ReportUnrecoverableError, chrome::GetChannel());
626 #if defined(ENABLE_SUPERVISED_USERS) 626 #if defined(ENABLE_SUPERVISED_USERS)
627 sync_service->RegisterDataTypeController( 627 sync_service->RegisterDataTypeController(
628 base::MakeUnique<SupervisedUserSyncDataTypeController>( 628 base::MakeUnique<SupervisedUserSyncDataTypeController>(
629 syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_)); 629 syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_));
630 sync_service->RegisterDataTypeController( 630 sync_service->RegisterDataTypeController(
631 base::MakeUnique<SupervisedUserSyncDataTypeController>( 631 base::MakeUnique<SupervisedUserSyncDataTypeController>(
632 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); 632 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_));
633 #endif 633 #endif
634 } 634 }
635 635
636 } // namespace browser_sync 636 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | chrome/browser/sync/profile_sync_service_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698