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

Side by Side Diff: ios/chrome/browser/sync/ios_chrome_sync_client.mm

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 "ios/chrome/browser/sync/ios_chrome_sync_client.h" 5 #include "ios/chrome/browser/sync/ios_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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 331
332 base::WeakPtr<syncer::ModelTypeSyncBridge> 332 base::WeakPtr<syncer::ModelTypeSyncBridge>
333 IOSChromeSyncClient::GetSyncBridgeForModelType(syncer::ModelType type) { 333 IOSChromeSyncClient::GetSyncBridgeForModelType(syncer::ModelType type) {
334 switch (type) { 334 switch (type) {
335 case syncer::DEVICE_INFO: 335 case syncer::DEVICE_INFO:
336 return IOSChromeProfileSyncServiceFactory::GetForBrowserState( 336 return IOSChromeProfileSyncServiceFactory::GetForBrowserState(
337 browser_state_) 337 browser_state_)
338 ->GetDeviceInfoSyncBridge() 338 ->GetDeviceInfoSyncBridge()
339 ->AsWeakPtr(); 339 ->AsWeakPtr();
340 case syncer::READING_LIST: { 340 case syncer::READING_LIST: {
341 ReadingListModel* reading_list_model = 341 if (ReadingListModelFactory::IsReadingListEnabled()) {
pavely 2016/11/20 02:31:58 It is an issue when GetSyncBridgeForModelType retu
Olivier 2016/11/20 10:32:33 Problem is that ReadingListService is in ios/chrom
342 ReadingListModelFactory::GetForBrowserState(browser_state_); 342 ReadingListModel* reading_list_model =
343 if (reading_list_model) 343 ReadingListModelFactory::GetForBrowserState(browser_state_);
344 return reading_list_model->GetModelTypeSyncBridge()->AsWeakPtr(); 344 if (reading_list_model)
345 return reading_list_model->GetModelTypeSyncBridge()->AsWeakPtr();
346 }
345 return base::WeakPtr<syncer::ModelTypeSyncBridge>(); 347 return base::WeakPtr<syncer::ModelTypeSyncBridge>();
346 } 348 }
347 default: 349 default:
348 NOTREACHED(); 350 NOTREACHED();
349 return base::WeakPtr<syncer::ModelTypeSyncBridge>(); 351 return base::WeakPtr<syncer::ModelTypeSyncBridge>();
350 } 352 }
351 } 353 }
352 354
353 scoped_refptr<syncer::ModelSafeWorker> 355 scoped_refptr<syncer::ModelSafeWorker>
354 IOSChromeSyncClient::CreateModelWorkerForGroup(syncer::ModelSafeGroup group) { 356 IOSChromeSyncClient::CreateModelWorkerForGroup(syncer::ModelSafeGroup group) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 IOSChromeProfileSyncServiceFactory::GetForBrowserState(browser_state); 410 IOSChromeProfileSyncServiceFactory::GetForBrowserState(browser_state);
409 if (profile_sync_service != nullptr) { 411 if (profile_sync_service != nullptr) {
410 const syncer::DeviceInfoTracker* tracker = 412 const syncer::DeviceInfoTracker* tracker =
411 profile_sync_service->GetDeviceInfoTracker(); 413 profile_sync_service->GetDeviceInfoTracker();
412 if (tracker != nullptr) { 414 if (tracker != nullptr) {
413 trackers->push_back(tracker); 415 trackers->push_back(tracker);
414 } 416 }
415 } 417 }
416 } 418 }
417 } 419 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698