| 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 <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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 return WeakPtr<syncer::ModelTypeSyncBridge>(); | 544 return WeakPtr<syncer::ModelTypeSyncBridge>(); |
| 545 case syncer::AUTOFILL: | 545 case syncer::AUTOFILL: |
| 546 return autofill::AutocompleteSyncBridge::FromWebDataService( | 546 return autofill::AutocompleteSyncBridge::FromWebDataService( |
| 547 web_data_service_.get()); | 547 web_data_service_.get()); |
| 548 #if defined(OS_CHROMEOS) | 548 #if defined(OS_CHROMEOS) |
| 549 case syncer::PRINTERS: | 549 case syncer::PRINTERS: |
| 550 return chromeos::PrintersManagerFactory::GetForBrowserContext(profile_) | 550 return chromeos::PrintersManagerFactory::GetForBrowserContext(profile_) |
| 551 ->GetSyncBridge() | 551 ->GetSyncBridge() |
| 552 ->AsWeakPtr(); | 552 ->AsWeakPtr(); |
| 553 #endif // defined(OS_CHROMEOS) | 553 #endif // defined(OS_CHROMEOS) |
| 554 case syncer::TYPED_URLS: |
| 555 // TODO(gangwu):implement TypedURLSyncBridge and return real |
| 556 // TypedURLSyncBridge here. |
| 557 return base::WeakPtr<syncer::ModelTypeSyncBridge>(); |
| 554 default: | 558 default: |
| 555 NOTREACHED(); | 559 NOTREACHED(); |
| 556 return WeakPtr<syncer::ModelTypeSyncBridge>(); | 560 return WeakPtr<syncer::ModelTypeSyncBridge>(); |
| 557 } | 561 } |
| 558 } | 562 } |
| 559 | 563 |
| 560 scoped_refptr<syncer::ModelSafeWorker> | 564 scoped_refptr<syncer::ModelSafeWorker> |
| 561 ChromeSyncClient::CreateModelWorkerForGroup(syncer::ModelSafeGroup group) { | 565 ChromeSyncClient::CreateModelWorkerForGroup(syncer::ModelSafeGroup group) { |
| 562 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 566 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 563 switch (group) { | 567 switch (group) { |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 sync_service->RegisterDataTypeController( | 751 sync_service->RegisterDataTypeController( |
| 748 base::MakeUnique<SupervisedUserSyncDataTypeController>( | 752 base::MakeUnique<SupervisedUserSyncDataTypeController>( |
| 749 syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_)); | 753 syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_)); |
| 750 sync_service->RegisterDataTypeController( | 754 sync_service->RegisterDataTypeController( |
| 751 base::MakeUnique<SupervisedUserSyncDataTypeController>( | 755 base::MakeUnique<SupervisedUserSyncDataTypeController>( |
| 752 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); | 756 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); |
| 753 #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) | 757 #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) |
| 754 } | 758 } |
| 755 | 759 |
| 756 } // namespace browser_sync | 760 } // namespace browser_sync |
| OLD | NEW |