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 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_PENDING_REQU
EST_TASK_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_PENDING_REQU
EST_TASK_H_ |
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_PENDING_REQU
EST_TASK_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_PENDING_REQU
EST_TASK_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "components/password_manager/core/browser/http_password_store_migrator.
h" | 15 #include "components/password_manager/core/browser/http_password_store_migrator.
h" |
16 #include "components/password_manager/core/browser/password_store.h" | 16 #include "components/password_manager/core/browser/password_store.h" |
17 #include "components/password_manager/core/browser/password_store_consumer.h" | 17 #include "components/password_manager/core/browser/password_store_consumer.h" |
| 18 #include "components/password_manager/core/common/credential_manager_types.h" |
18 #include "url/gurl.h" | 19 #include "url/gurl.h" |
19 | 20 |
20 namespace autofill { | 21 namespace autofill { |
21 struct PasswordForm; | 22 struct PasswordForm; |
22 } // namespace autofill | 23 } // namespace autofill |
23 | 24 |
24 namespace password_manager { | 25 namespace password_manager { |
25 | 26 |
26 struct CredentialInfo; | 27 struct CredentialInfo; |
27 class PasswordManagerClient; | 28 class PasswordManagerClient; |
(...skipping 25 matching lines...) Expand all Loading... |
53 }; | 54 }; |
54 | 55 |
55 // Retrieves credentials from the PasswordStore. | 56 // Retrieves credentials from the PasswordStore. |
56 class CredentialManagerPendingRequestTask | 57 class CredentialManagerPendingRequestTask |
57 : public PasswordStoreConsumer, | 58 : public PasswordStoreConsumer, |
58 public HttpPasswordStoreMigrator::Consumer { | 59 public HttpPasswordStoreMigrator::Consumer { |
59 public: | 60 public: |
60 CredentialManagerPendingRequestTask( | 61 CredentialManagerPendingRequestTask( |
61 CredentialManagerPendingRequestTaskDelegate* delegate, | 62 CredentialManagerPendingRequestTaskDelegate* delegate, |
62 const SendCredentialCallback& callback, | 63 const SendCredentialCallback& callback, |
63 bool request_zero_click_only, | 64 CredentialMediationRequirement mediation, |
64 bool include_passwords, | 65 bool include_passwords, |
65 const std::vector<GURL>& request_federations); | 66 const std::vector<GURL>& request_federations); |
66 ~CredentialManagerPendingRequestTask() override; | 67 ~CredentialManagerPendingRequestTask() override; |
67 | 68 |
68 SendCredentialCallback send_callback() const { return send_callback_; } | 69 SendCredentialCallback send_callback() const { return send_callback_; } |
69 const GURL& origin() const { return origin_; } | 70 const GURL& origin() const { return origin_; } |
70 | 71 |
71 // PasswordStoreConsumer: | 72 // PasswordStoreConsumer: |
72 void OnGetPasswordStoreResults( | 73 void OnGetPasswordStoreResults( |
73 std::vector<std::unique_ptr<autofill::PasswordForm>> results) override; | 74 std::vector<std::unique_ptr<autofill::PasswordForm>> results) override; |
74 | 75 |
75 private: | 76 private: |
76 // HttpPasswordStoreMigrator::Consumer: | 77 // HttpPasswordStoreMigrator::Consumer: |
77 void ProcessMigratedForms( | 78 void ProcessMigratedForms( |
78 std::vector<std::unique_ptr<autofill::PasswordForm>> forms) override; | 79 std::vector<std::unique_ptr<autofill::PasswordForm>> forms) override; |
79 | 80 |
80 void ProcessForms( | 81 void ProcessForms( |
81 std::vector<std::unique_ptr<autofill::PasswordForm>> results); | 82 std::vector<std::unique_ptr<autofill::PasswordForm>> results); |
82 | 83 |
83 CredentialManagerPendingRequestTaskDelegate* delegate_; // Weak; | 84 CredentialManagerPendingRequestTaskDelegate* delegate_; // Weak; |
84 SendCredentialCallback send_callback_; | 85 SendCredentialCallback send_callback_; |
85 const bool zero_click_only_; | 86 const CredentialMediationRequirement mediation_; |
86 const GURL origin_; | 87 const GURL origin_; |
87 const bool include_passwords_; | 88 const bool include_passwords_; |
88 std::set<std::string> federations_; | 89 std::set<std::string> federations_; |
89 | 90 |
90 std::unique_ptr<HttpPasswordStoreMigrator> http_migrator_; | 91 std::unique_ptr<HttpPasswordStoreMigrator> http_migrator_; |
91 | 92 |
92 DISALLOW_COPY_AND_ASSIGN(CredentialManagerPendingRequestTask); | 93 DISALLOW_COPY_AND_ASSIGN(CredentialManagerPendingRequestTask); |
93 }; | 94 }; |
94 | 95 |
95 } // namespace password_manager | 96 } // namespace password_manager |
96 | 97 |
97 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_PENDING_R
EQUEST_TASK_H_ | 98 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_PENDING_R
EQUEST_TASK_H_ |
OLD | NEW |