OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/password_manager/core/browser/password_store.h" | 5 #include "components/password_manager/core/browser/password_store.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/debug/dump_without_crashing.h" | 8 #include "base/debug/dump_without_crashing.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 NotifyLoginsChanged(changes); | 323 NotifyLoginsChanged(changes); |
324 } | 324 } |
325 | 325 |
326 void PasswordStore::RemoveLoginsSyncedBetweenInternal(base::Time delete_begin, | 326 void PasswordStore::RemoveLoginsSyncedBetweenInternal(base::Time delete_begin, |
327 base::Time delete_end) { | 327 base::Time delete_end) { |
328 PasswordStoreChangeList changes = | 328 PasswordStoreChangeList changes = |
329 RemoveLoginsSyncedBetweenImpl(delete_begin, delete_end); | 329 RemoveLoginsSyncedBetweenImpl(delete_begin, delete_end); |
330 NotifyLoginsChanged(changes); | 330 NotifyLoginsChanged(changes); |
331 } | 331 } |
332 | 332 |
| 333 void PasswordStore::GetAutofillableLoginsImpl( |
| 334 scoped_ptr<GetLoginsRequest> request) { |
| 335 ScopedVector<PasswordForm> obtained_forms; |
| 336 if (!FillAutofillableLogins(&obtained_forms)) |
| 337 obtained_forms.clear(); |
| 338 request->NotifyConsumerWithResults(obtained_forms.Pass()); |
| 339 } |
| 340 |
| 341 void PasswordStore::GetBlacklistLoginsImpl( |
| 342 scoped_ptr<GetLoginsRequest> request) { |
| 343 ScopedVector<PasswordForm> obtained_forms; |
| 344 if (!FillBlacklistLogins(&obtained_forms)) |
| 345 obtained_forms.clear(); |
| 346 request->NotifyConsumerWithResults(obtained_forms.Pass()); |
| 347 } |
| 348 |
333 void PasswordStore::NotifySiteStats(const GURL& origin_domain, | 349 void PasswordStore::NotifySiteStats(const GURL& origin_domain, |
334 scoped_ptr<GetLoginsRequest> request) { | 350 scoped_ptr<GetLoginsRequest> request) { |
335 request->NotifyWithSiteStatistics(GetSiteStatsImpl(origin_domain)); | 351 request->NotifyWithSiteStatistics(GetSiteStatsImpl(origin_domain)); |
336 } | 352 } |
337 | 353 |
338 void PasswordStore::GetLoginsWithAffiliationsImpl( | 354 void PasswordStore::GetLoginsWithAffiliationsImpl( |
339 const PasswordForm& form, | 355 const PasswordForm& form, |
340 AuthorizationPromptPolicy prompt_policy, | 356 AuthorizationPromptPolicy prompt_policy, |
341 scoped_ptr<GetLoginsRequest> request, | 357 scoped_ptr<GetLoginsRequest> request, |
342 const std::vector<std::string>& additional_android_realms) { | 358 const std::vector<std::string>& additional_android_realms) { |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 syncable_service_.reset(new PasswordSyncableService(this)); | 516 syncable_service_.reset(new PasswordSyncableService(this)); |
501 syncable_service_->InjectStartSyncFlare(flare); | 517 syncable_service_->InjectStartSyncFlare(flare); |
502 } | 518 } |
503 | 519 |
504 void PasswordStore::DestroySyncableService() { | 520 void PasswordStore::DestroySyncableService() { |
505 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); | 521 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); |
506 syncable_service_.reset(); | 522 syncable_service_.reset(); |
507 } | 523 } |
508 | 524 |
509 } // namespace password_manager | 525 } // namespace password_manager |
OLD | NEW |