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

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

Issue 2247523002: arc: Fix ArcPackageSyncableService initialization issue. ArcPackageSyncableService should not be st… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2824
Patch Set: Created 4 years, 4 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 | chrome/browser/sync/test/integration/migration_test.cc » ('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 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 <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 13 matching lines...) Expand all
24 #include "chrome/browser/profiles/profile_manager.h" 24 #include "chrome/browser/profiles/profile_manager.h"
25 #include "chrome/browser/search_engines/template_url_service_factory.h" 25 #include "chrome/browser/search_engines/template_url_service_factory.h"
26 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 26 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
27 #include "chrome/browser/sync/glue/sync_start_util.h" 27 #include "chrome/browser/sync/glue/sync_start_util.h"
28 #include "chrome/browser/sync/glue/theme_data_type_controller.h" 28 #include "chrome/browser/sync/glue/theme_data_type_controller.h"
29 #include "chrome/browser/sync/profile_sync_service_factory.h" 29 #include "chrome/browser/sync/profile_sync_service_factory.h"
30 #include "chrome/browser/sync/sessions/notification_service_sessions_router.h" 30 #include "chrome/browser/sync/sessions/notification_service_sessions_router.h"
31 #include "chrome/browser/themes/theme_service.h" 31 #include "chrome/browser/themes/theme_service.h"
32 #include "chrome/browser/themes/theme_service_factory.h" 32 #include "chrome/browser/themes/theme_service_factory.h"
33 #include "chrome/browser/themes/theme_syncable_service.h" 33 #include "chrome/browser/themes/theme_syncable_service.h"
34 #include "chrome/browser/ui/app_list/arc/arc_package_sync_data_type_controller.h "
34 #include "chrome/browser/ui/sync/browser_synced_window_delegates_getter.h" 35 #include "chrome/browser/ui/sync/browser_synced_window_delegates_getter.h"
35 #include "chrome/browser/undo/bookmark_undo_service_factory.h" 36 #include "chrome/browser/undo/bookmark_undo_service_factory.h"
36 #include "chrome/browser/web_data_service_factory.h" 37 #include "chrome/browser/web_data_service_factory.h"
37 #include "chrome/common/channel_info.h" 38 #include "chrome/common/channel_info.h"
38 #include "chrome/common/features.h" 39 #include "chrome/common/features.h"
39 #include "chrome/common/pref_names.h" 40 #include "chrome/common/pref_names.h"
40 #include "chrome/common/url_constants.h" 41 #include "chrome/common/url_constants.h"
41 #include "components/autofill/core/browser/webdata/autocomplete_syncable_service .h" 42 #include "components/autofill/core/browser/webdata/autocomplete_syncable_service .h"
42 #include "components/autofill/core/browser/webdata/autofill_profile_syncable_ser vice.h" 43 #include "components/autofill/core/browser/webdata/autofill_profile_syncable_ser vice.h"
43 #include "components/autofill/core/browser/webdata/autofill_wallet_metadata_sync able_service.h" 44 #include "components/autofill/core/browser/webdata/autofill_wallet_metadata_sync able_service.h"
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 #endif 604 #endif
604 605
605 #if defined(OS_CHROMEOS) 606 #if defined(OS_CHROMEOS)
606 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 607 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
607 switches::kEnableWifiCredentialSync) && 608 switches::kEnableWifiCredentialSync) &&
608 !disabled_types.Has(syncer::WIFI_CREDENTIALS)) { 609 !disabled_types.Has(syncer::WIFI_CREDENTIALS)) {
609 sync_service->RegisterDataTypeController(new UIDataTypeController( 610 sync_service->RegisterDataTypeController(new UIDataTypeController(
610 ui_thread, error_callback, syncer::WIFI_CREDENTIALS, this)); 611 ui_thread, error_callback, syncer::WIFI_CREDENTIALS, this));
611 } 612 }
612 // TODO (lgcheng@) Add switch for this. 613 // TODO (lgcheng@) Add switch for this.
613 sync_service->RegisterDataTypeController(new UIDataTypeController( 614 sync_service->RegisterDataTypeController(new ArcPackageSyncDataTypeController(
614 ui_thread, error_callback, syncer::ARC_PACKAGE, this)); 615 syncer::ARC_PACKAGE, error_callback, this, profile_));
615 #endif 616 #endif
616 } 617 }
617 618
618 void ChromeSyncClient::RegisterAndroidDataTypes( 619 void ChromeSyncClient::RegisterAndroidDataTypes(
619 sync_driver::SyncService* sync_service, 620 sync_driver::SyncService* sync_service,
620 syncer::ModelTypeSet disabled_types, 621 syncer::ModelTypeSet disabled_types,
621 syncer::ModelTypeSet enabled_types) { 622 syncer::ModelTypeSet enabled_types) {
622 base::Closure error_callback = 623 base::Closure error_callback =
623 base::Bind(&ChromeReportUnrecoverableError, chrome::GetChannel()); 624 base::Bind(&ChromeReportUnrecoverableError, chrome::GetChannel());
624 #if defined(ENABLE_SUPERVISED_USERS) 625 #if defined(ENABLE_SUPERVISED_USERS)
625 sync_service->RegisterDataTypeController( 626 sync_service->RegisterDataTypeController(
626 new SupervisedUserSyncDataTypeController(syncer::SUPERVISED_USER_SETTINGS, 627 new SupervisedUserSyncDataTypeController(syncer::SUPERVISED_USER_SETTINGS,
627 error_callback, this, profile_)); 628 error_callback, this, profile_));
628 sync_service->RegisterDataTypeController( 629 sync_service->RegisterDataTypeController(
629 new SupervisedUserSyncDataTypeController( 630 new SupervisedUserSyncDataTypeController(
630 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); 631 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_));
631 #endif 632 #endif
632 } 633 }
633 634
634 } // namespace browser_sync 635 } // namespace browser_sync
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/test/integration/migration_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698