| 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 return FaviconServiceFactory::GetForProfile( | 243 return FaviconServiceFactory::GetForProfile( |
| 244 profile_, ServiceAccessType::IMPLICIT_ACCESS); | 244 profile_, ServiceAccessType::IMPLICIT_ACCESS); |
| 245 } | 245 } |
| 246 | 246 |
| 247 history::HistoryService* ChromeSyncClient::GetHistoryService() { | 247 history::HistoryService* ChromeSyncClient::GetHistoryService() { |
| 248 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 248 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 249 return HistoryServiceFactory::GetForProfile( | 249 return HistoryServiceFactory::GetForProfile( |
| 250 profile_, ServiceAccessType::EXPLICIT_ACCESS); | 250 profile_, ServiceAccessType::EXPLICIT_ACCESS); |
| 251 } | 251 } |
| 252 | 252 |
| 253 bool ChromeSyncClient::HasPasswordStore() { |
| 254 return password_store_ != nullptr; |
| 255 } |
| 256 |
| 253 autofill::PersonalDataManager* ChromeSyncClient::GetPersonalDataManager() { | 257 autofill::PersonalDataManager* ChromeSyncClient::GetPersonalDataManager() { |
| 254 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 258 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 255 return autofill::PersonalDataManagerFactory::GetForProfile(profile_); | 259 return autofill::PersonalDataManagerFactory::GetForProfile(profile_); |
| 256 } | 260 } |
| 257 | 261 |
| 258 base::Closure ChromeSyncClient::GetPasswordStateChangedCallback() { | 262 base::Closure ChromeSyncClient::GetPasswordStateChangedCallback() { |
| 259 return base::Bind( | 263 return base::Bind( |
| 260 &PasswordStoreFactory::OnPasswordsSyncedStatePotentiallyChanged, | 264 &PasswordStoreFactory::OnPasswordsSyncedStatePotentiallyChanged, |
| 261 base::Unretained(profile_)); | 265 base::Unretained(profile_)); |
| 262 } | 266 } |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 sync_service->RegisterDataTypeController( | 644 sync_service->RegisterDataTypeController( |
| 641 base::MakeUnique<SupervisedUserSyncDataTypeController>( | 645 base::MakeUnique<SupervisedUserSyncDataTypeController>( |
| 642 syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_)); | 646 syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_)); |
| 643 sync_service->RegisterDataTypeController( | 647 sync_service->RegisterDataTypeController( |
| 644 base::MakeUnique<SupervisedUserSyncDataTypeController>( | 648 base::MakeUnique<SupervisedUserSyncDataTypeController>( |
| 645 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); | 649 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); |
| 646 #endif | 650 #endif |
| 647 } | 651 } |
| 648 | 652 |
| 649 } // namespace browser_sync | 653 } // namespace browser_sync |
| OLD | NEW |