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 "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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 return ios::FaviconServiceFactory::GetForBrowserState( | 195 return ios::FaviconServiceFactory::GetForBrowserState( |
196 browser_state_, ServiceAccessType::EXPLICIT_ACCESS); | 196 browser_state_, ServiceAccessType::EXPLICIT_ACCESS); |
197 } | 197 } |
198 | 198 |
199 history::HistoryService* IOSChromeSyncClient::GetHistoryService() { | 199 history::HistoryService* IOSChromeSyncClient::GetHistoryService() { |
200 DCHECK_CURRENTLY_ON(web::WebThread::UI); | 200 DCHECK_CURRENTLY_ON(web::WebThread::UI); |
201 return ios::HistoryServiceFactory::GetForBrowserState( | 201 return ios::HistoryServiceFactory::GetForBrowserState( |
202 browser_state_, ServiceAccessType::EXPLICIT_ACCESS); | 202 browser_state_, ServiceAccessType::EXPLICIT_ACCESS); |
203 } | 203 } |
204 | 204 |
| 205 bool IOSChromeSyncClient::HasPasswordStore() { |
| 206 DCHECK_CURRENTLY_ON(web::WebThread::UI); |
| 207 return password_store_ != nullptr; |
| 208 } |
| 209 |
205 autofill::PersonalDataManager* IOSChromeSyncClient::GetPersonalDataManager() { | 210 autofill::PersonalDataManager* IOSChromeSyncClient::GetPersonalDataManager() { |
206 DCHECK_CURRENTLY_ON(web::WebThread::UI); | 211 DCHECK_CURRENTLY_ON(web::WebThread::UI); |
207 return autofill::PersonalDataManagerFactory::GetForBrowserState( | 212 return autofill::PersonalDataManagerFactory::GetForBrowserState( |
208 browser_state_); | 213 browser_state_); |
209 } | 214 } |
210 | 215 |
211 base::Closure IOSChromeSyncClient::GetPasswordStateChangedCallback() { | 216 base::Closure IOSChromeSyncClient::GetPasswordStateChangedCallback() { |
212 return base::Bind( | 217 return base::Bind( |
213 &IOSChromePasswordStoreFactory::OnPasswordsSyncedStatePotentiallyChanged, | 218 &IOSChromePasswordStoreFactory::OnPasswordsSyncedStatePotentiallyChanged, |
214 base::Unretained(browser_state_)); | 219 base::Unretained(browser_state_)); |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 IOSChromeProfileSyncServiceFactory::GetForBrowserState(browser_state); | 417 IOSChromeProfileSyncServiceFactory::GetForBrowserState(browser_state); |
413 if (profile_sync_service != nullptr) { | 418 if (profile_sync_service != nullptr) { |
414 const syncer::DeviceInfoTracker* tracker = | 419 const syncer::DeviceInfoTracker* tracker = |
415 profile_sync_service->GetDeviceInfoTracker(); | 420 profile_sync_service->GetDeviceInfoTracker(); |
416 if (tracker != nullptr) { | 421 if (tracker != nullptr) { |
417 trackers->push_back(tracker); | 422 trackers->push_back(tracker); |
418 } | 423 } |
419 } | 424 } |
420 } | 425 } |
421 } | 426 } |
OLD | NEW |