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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 // 'navigator.credentials.request()' without user interaction. | 258 // 'navigator.credentials.request()' without user interaction. |
259 // Once user selects this credential the flag is reseted. | 259 // Once user selects this credential the flag is reseted. |
260 bool skip_zero_click; | 260 bool skip_zero_click; |
261 | 261 |
262 // The layout as determined during parsing. Default value is LAYOUT_OTHER. | 262 // The layout as determined during parsing. Default value is LAYOUT_OTHER. |
263 Layout layout; | 263 Layout layout; |
264 | 264 |
265 // If true, this form was parsed using Autofill predictions. | 265 // If true, this form was parsed using Autofill predictions. |
266 bool was_parsed_using_autofill_predictions; | 266 bool was_parsed_using_autofill_predictions; |
267 | 267 |
268 // TODO(vabr): Remove |is_alive| once http://crbug.com/486931 is fixed. | |
269 bool is_alive; // Set on construction, reset on destruction. | |
270 | |
271 // Returns true if this match was found using public suffix matching. | 268 // Returns true if this match was found using public suffix matching. |
272 bool IsPublicSuffixMatch() const; | 269 bool IsPublicSuffixMatch() const; |
273 | 270 |
274 // Equality operators for testing. | 271 // Equality operators for testing. |
275 bool operator==(const PasswordForm& form) const; | 272 bool operator==(const PasswordForm& form) const; |
276 bool operator!=(const PasswordForm& form) const; | 273 bool operator!=(const PasswordForm& form) const; |
277 | 274 |
278 PasswordForm(); | 275 PasswordForm(); |
279 ~PasswordForm(); | 276 ~PasswordForm(); |
280 }; | 277 }; |
281 | 278 |
282 // Map username to PasswordForm* for convenience. See password_form_manager.h. | 279 // Map username to PasswordForm* for convenience. See password_form_manager.h. |
283 typedef std::map<base::string16, PasswordForm*> PasswordFormMap; | 280 typedef std::map<base::string16, PasswordForm*> PasswordFormMap; |
284 | 281 |
285 typedef std::map<base::string16, const PasswordForm*> ConstPasswordFormMap; | 282 typedef std::map<base::string16, const PasswordForm*> ConstPasswordFormMap; |
286 | 283 |
287 // For testing. | 284 // For testing. |
288 std::ostream& operator<<(std::ostream& os, PasswordForm::Layout layout); | 285 std::ostream& operator<<(std::ostream& os, PasswordForm::Layout layout); |
289 std::ostream& operator<<(std::ostream& os, const autofill::PasswordForm& form); | 286 std::ostream& operator<<(std::ostream& os, const autofill::PasswordForm& form); |
290 std::ostream& operator<<(std::ostream& os, autofill::PasswordForm* form); | 287 std::ostream& operator<<(std::ostream& os, autofill::PasswordForm* form); |
291 | 288 |
292 } // namespace autofill | 289 } // namespace autofill |
293 | 290 |
294 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ | 291 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ |
OLD | NEW |