OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ |
6 #define COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ | 6 #define COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 // Default to false. | 199 // Default to false. |
200 bool use_additional_authentication; | 200 bool use_additional_authentication; |
201 | 201 |
202 // Autofill representation of this form. Used to communicate with the | 202 // Autofill representation of this form. Used to communicate with the |
203 // Autofill servers if necessary. Currently this is only used to help | 203 // Autofill servers if necessary. Currently this is only used to help |
204 // determine forms where we can trigger password generation. | 204 // determine forms where we can trigger password generation. |
205 // | 205 // |
206 // When parsing an HTML form, this is normally set. | 206 // When parsing an HTML form, this is normally set. |
207 FormData form_data; | 207 FormData form_data; |
208 | 208 |
| 209 // These following fields are set by a website using the Credential Manager |
| 210 // API. They will be empty and remain unused for sites which do not use that |
| 211 // API. |
| 212 // |
| 213 // User friendly name to show in the UI. |
| 214 base::string16 display_name; |
| 215 |
| 216 // The URL of the user's avatar to display in the UI. |
| 217 GURL avatar_url; |
| 218 |
| 219 // The URL of identity provider used for federated login. |
| 220 GURL federation_url; |
| 221 |
| 222 // If true, Chrome will sign the user in automatically using the credentials. |
| 223 bool is_zero_click; |
| 224 |
209 // Returns true if this match was found using public suffix matching. | 225 // Returns true if this match was found using public suffix matching. |
210 bool IsPublicSuffixMatch() const; | 226 bool IsPublicSuffixMatch() const; |
211 | 227 |
212 // Equality operators for testing. | 228 // Equality operators for testing. |
213 bool operator==(const PasswordForm& form) const; | 229 bool operator==(const PasswordForm& form) const; |
214 bool operator!=(const PasswordForm& form) const; | 230 bool operator!=(const PasswordForm& form) const; |
215 | 231 |
216 PasswordForm(); | 232 PasswordForm(); |
217 ~PasswordForm(); | 233 ~PasswordForm(); |
218 }; | 234 }; |
219 | 235 |
220 // Map username to PasswordForm* for convenience. See password_form_manager.h. | 236 // Map username to PasswordForm* for convenience. See password_form_manager.h. |
221 typedef std::map<base::string16, PasswordForm*> PasswordFormMap; | 237 typedef std::map<base::string16, PasswordForm*> PasswordFormMap; |
222 | 238 |
223 typedef std::map<base::string16, const PasswordForm*> ConstPasswordFormMap; | 239 typedef std::map<base::string16, const PasswordForm*> ConstPasswordFormMap; |
224 | 240 |
225 // For testing. | 241 // For testing. |
226 std::ostream& operator<<(std::ostream& os, | 242 std::ostream& operator<<(std::ostream& os, |
227 const autofill::PasswordForm& form); | 243 const autofill::PasswordForm& form); |
228 | 244 |
229 } // namespace autofill | 245 } // namespace autofill |
230 | 246 |
231 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ | 247 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ |
OLD | NEW |