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

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

Issue 2740363002: [Sync] Fix EnableDisableSingleClientTest (Closed)
Patch Set: fix Created 3 years, 9 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 <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 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 #if defined(OS_CHROMEOS) 672 #if defined(OS_CHROMEOS)
673 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 673 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
674 switches::kEnableWifiCredentialSync) && 674 switches::kEnableWifiCredentialSync) &&
675 !disabled_types.Has(syncer::WIFI_CREDENTIALS)) { 675 !disabled_types.Has(syncer::WIFI_CREDENTIALS)) {
676 sync_service->RegisterDataTypeController( 676 sync_service->RegisterDataTypeController(
677 base::MakeUnique<AsyncDirectoryTypeController>( 677 base::MakeUnique<AsyncDirectoryTypeController>(
678 syncer::WIFI_CREDENTIALS, error_callback, this, syncer::GROUP_UI, 678 syncer::WIFI_CREDENTIALS, error_callback, this, syncer::GROUP_UI,
679 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI))); 679 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI)));
680 } 680 }
681 681
682 // TODO(lgcheng): Add switch for this.
skym 2017/03/16 23:27:19 Why didn't you add the switch back here, Gang? I t
Gang Wu 2017/03/17 19:23:22 Done.
683 sync_service->RegisterDataTypeController( 682 sync_service->RegisterDataTypeController(
684 base::MakeUnique<ArcPackageSyncDataTypeController>( 683 base::MakeUnique<ArcPackageSyncDataTypeController>(
685 syncer::ARC_PACKAGE, error_callback, this, profile_)); 684 syncer::ARC_PACKAGE, error_callback, this, profile_));
686 #endif 685 #endif
687 } 686 }
688 687
689 void ChromeSyncClient::RegisterAndroidDataTypes( 688 void ChromeSyncClient::RegisterAndroidDataTypes(
690 syncer::SyncService* sync_service, 689 syncer::SyncService* sync_service,
691 syncer::ModelTypeSet disabled_types, 690 syncer::ModelTypeSet disabled_types,
692 syncer::ModelTypeSet enabled_types) { 691 syncer::ModelTypeSet enabled_types) {
693 base::Closure error_callback = 692 base::Closure error_callback =
694 base::Bind(&syncer::ReportUnrecoverableError, chrome::GetChannel()); 693 base::Bind(&syncer::ReportUnrecoverableError, chrome::GetChannel());
695 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) 694 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
696 sync_service->RegisterDataTypeController( 695 sync_service->RegisterDataTypeController(
697 base::MakeUnique<SupervisedUserSyncDataTypeController>( 696 base::MakeUnique<SupervisedUserSyncDataTypeController>(
698 syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_)); 697 syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_));
699 sync_service->RegisterDataTypeController( 698 sync_service->RegisterDataTypeController(
700 base::MakeUnique<SupervisedUserSyncDataTypeController>( 699 base::MakeUnique<SupervisedUserSyncDataTypeController>(
701 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); 700 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_));
702 #endif 701 #endif
703 } 702 }
704 703
705 } // namespace browser_sync 704 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698