OLD | NEW |
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 Loading... |
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: |
| 440 // Reading List is only supported on iOS at the moment. |
| 441 NOTREACHED(); |
| 442 return base::WeakPtr<syncer::ModelTypeSyncBridge>(); |
439 default: | 443 default: |
440 NOTREACHED(); | 444 NOTREACHED(); |
441 return base::WeakPtr<syncer::ModelTypeSyncBridge>(); | 445 return base::WeakPtr<syncer::ModelTypeSyncBridge>(); |
442 } | 446 } |
443 } | 447 } |
444 | 448 |
445 scoped_refptr<syncer::ModelSafeWorker> | 449 scoped_refptr<syncer::ModelSafeWorker> |
446 ChromeSyncClient::CreateModelWorkerForGroup(syncer::ModelSafeGroup group) { | 450 ChromeSyncClient::CreateModelWorkerForGroup(syncer::ModelSafeGroup group) { |
447 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 451 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
448 switch (group) { | 452 switch (group) { |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 sync_service->RegisterDataTypeController( | 632 sync_service->RegisterDataTypeController( |
629 base::MakeUnique<SupervisedUserSyncDataTypeController>( | 633 base::MakeUnique<SupervisedUserSyncDataTypeController>( |
630 syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_)); | 634 syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_)); |
631 sync_service->RegisterDataTypeController( | 635 sync_service->RegisterDataTypeController( |
632 base::MakeUnique<SupervisedUserSyncDataTypeController>( | 636 base::MakeUnique<SupervisedUserSyncDataTypeController>( |
633 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); | 637 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); |
634 #endif | 638 #endif |
635 } | 639 } |
636 | 640 |
637 } // namespace browser_sync | 641 } // namespace browser_sync |
OLD | NEW |