| 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 "components/password_manager/core/browser/affiliated_match_helper.h" | 5 #include "components/password_manager/core/browser/affiliated_match_helper.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/barrier_closure.h" | 9 #include "base/barrier_closure.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
| 13 #include "base/thread_task_runner_handle.h" | 13 #include "base/threading/thread_task_runner_handle.h" |
| 14 #include "components/autofill/core/common/password_form.h" | 14 #include "components/autofill/core/common/password_form.h" |
| 15 #include "components/password_manager/core/browser/affiliation_service.h" | 15 #include "components/password_manager/core/browser/affiliation_service.h" |
| 16 | 16 |
| 17 namespace password_manager { | 17 namespace password_manager { |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 // Returns whether or not |form| represents a credential for an Android | 21 // Returns whether or not |form| represents a credential for an Android |
| 22 // application, and if so, returns the |facet_uri| of that application. | 22 // application, and if so, returns the |facet_uri| of that application. |
| 23 bool IsAndroidApplicationCredential(const autofill::PasswordForm& form, | 23 bool IsAndroidApplicationCredential(const autofill::PasswordForm& form, |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 void AffiliatedMatchHelper::OnGetPasswordStoreResults( | 219 void AffiliatedMatchHelper::OnGetPasswordStoreResults( |
| 220 ScopedVector<autofill::PasswordForm> results) { | 220 ScopedVector<autofill::PasswordForm> results) { |
| 221 for (autofill::PasswordForm* form : results) { | 221 for (autofill::PasswordForm* form : results) { |
| 222 FacetURI facet_uri; | 222 FacetURI facet_uri; |
| 223 if (IsAndroidApplicationCredential(*form, &facet_uri)) | 223 if (IsAndroidApplicationCredential(*form, &facet_uri)) |
| 224 affiliation_service_->Prefetch(facet_uri, base::Time::Max()); | 224 affiliation_service_->Prefetch(facet_uri, base::Time::Max()); |
| 225 } | 225 } |
| 226 } | 226 } |
| 227 | 227 |
| 228 } // namespace password_manager | 228 } // namespace password_manager |
| OLD | NEW |