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

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

Issue 2511723002: Enable RL sync by default on iOS (Closed)
Patch Set: add guard Created 4 years, 1 month 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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 } 429 }
430 } 430 }
431 431
432 base::WeakPtr<syncer::ModelTypeSyncBridge> 432 base::WeakPtr<syncer::ModelTypeSyncBridge>
433 ChromeSyncClient::GetSyncBridgeForModelType(syncer::ModelType type) { 433 ChromeSyncClient::GetSyncBridgeForModelType(syncer::ModelType type) {
434 switch (type) { 434 switch (type) {
435 case syncer::DEVICE_INFO: 435 case syncer::DEVICE_INFO:
436 return ProfileSyncServiceFactory::GetForProfile(profile_) 436 return ProfileSyncServiceFactory::GetForProfile(profile_)
437 ->GetDeviceInfoSyncBridge() 437 ->GetDeviceInfoSyncBridge()
438 ->AsWeakPtr(); 438 ->AsWeakPtr();
439 case syncer::READING_LIST:
pavely 2016/11/20 02:31:58 You can add NOTREACHED() as well as this function
Olivier 2016/11/20 10:32:33 Done.
440 // Reading List is only supported on iOS at the moment.
441 return base::WeakPtr<syncer::ModelTypeSyncBridge>();
439 default: 442 default:
440 NOTREACHED(); 443 NOTREACHED();
441 return base::WeakPtr<syncer::ModelTypeSyncBridge>(); 444 return base::WeakPtr<syncer::ModelTypeSyncBridge>();
442 } 445 }
443 } 446 }
444 447
445 scoped_refptr<syncer::ModelSafeWorker> 448 scoped_refptr<syncer::ModelSafeWorker>
446 ChromeSyncClient::CreateModelWorkerForGroup(syncer::ModelSafeGroup group) { 449 ChromeSyncClient::CreateModelWorkerForGroup(syncer::ModelSafeGroup group) {
447 DCHECK_CURRENTLY_ON(BrowserThread::UI); 450 DCHECK_CURRENTLY_ON(BrowserThread::UI);
448 switch (group) { 451 switch (group) {
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 sync_service->RegisterDataTypeController( 631 sync_service->RegisterDataTypeController(
629 base::MakeUnique<SupervisedUserSyncDataTypeController>( 632 base::MakeUnique<SupervisedUserSyncDataTypeController>(
630 syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_)); 633 syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_));
631 sync_service->RegisterDataTypeController( 634 sync_service->RegisterDataTypeController(
632 base::MakeUnique<SupervisedUserSyncDataTypeController>( 635 base::MakeUnique<SupervisedUserSyncDataTypeController>(
633 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); 636 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_));
634 #endif 637 #endif
635 } 638 }
636 639
637 } // namespace browser_sync 640 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698