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 fields are used by Credential Management Javascript API. That is, the | |
210 // fields are set by site. When parsing an HTML form, this is not used. | |
Mike West
2014/08/22 09:53:13
Nit: I'd suggest a slight rewording for clarity. H
vasilii
2014/08/22 12:52:32
Done.
| |
211 // | |
212 // User friendly name to show in the UI. | |
213 base::string16 display_name; | |
214 | |
215 // The URL of the user's avatar to display in the UI. | |
216 GURL avatar_url; | |
217 | |
218 // The URL of identity provider used for federated login. | |
219 GURL federation_url; | |
220 | |
221 // If true, Chrome will sign the user in automatically using the credentials. | |
222 bool is_zero_click; | |
223 | |
209 // Returns true if this match was found using public suffix matching. | 224 // Returns true if this match was found using public suffix matching. |
210 bool IsPublicSuffixMatch() const; | 225 bool IsPublicSuffixMatch() const; |
211 | 226 |
212 // Equality operators for testing. | 227 // Equality operators for testing. |
213 bool operator==(const PasswordForm& form) const; | 228 bool operator==(const PasswordForm& form) const; |
214 bool operator!=(const PasswordForm& form) const; | 229 bool operator!=(const PasswordForm& form) const; |
215 | 230 |
216 PasswordForm(); | 231 PasswordForm(); |
217 ~PasswordForm(); | 232 ~PasswordForm(); |
218 }; | 233 }; |
219 | 234 |
220 // Map username to PasswordForm* for convenience. See password_form_manager.h. | 235 // Map username to PasswordForm* for convenience. See password_form_manager.h. |
221 typedef std::map<base::string16, PasswordForm*> PasswordFormMap; | 236 typedef std::map<base::string16, PasswordForm*> PasswordFormMap; |
222 | 237 |
223 typedef std::map<base::string16, const PasswordForm*> ConstPasswordFormMap; | 238 typedef std::map<base::string16, const PasswordForm*> ConstPasswordFormMap; |
224 | 239 |
225 // For testing. | 240 // For testing. |
226 std::ostream& operator<<(std::ostream& os, | 241 std::ostream& operator<<(std::ostream& os, |
227 const autofill::PasswordForm& form); | 242 const autofill::PasswordForm& form); |
228 | 243 |
229 } // namespace autofill | 244 } // namespace autofill |
230 | 245 |
231 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ | 246 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ |
OLD | NEW |