| 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 |
| 268 // Returns true if this match was found using public suffix matching. | 271 // Returns true if this match was found using public suffix matching. |
| 269 bool IsPublicSuffixMatch() const; | 272 bool IsPublicSuffixMatch() const; |
| 270 | 273 |
| 271 // Equality operators for testing. | 274 // Equality operators for testing. |
| 272 bool operator==(const PasswordForm& form) const; | 275 bool operator==(const PasswordForm& form) const; |
| 273 bool operator!=(const PasswordForm& form) const; | 276 bool operator!=(const PasswordForm& form) const; |
| 274 | 277 |
| 275 PasswordForm(); | 278 PasswordForm(); |
| 276 ~PasswordForm(); | 279 ~PasswordForm(); |
| 277 }; | 280 }; |
| 278 | 281 |
| 279 // Map username to PasswordForm* for convenience. See password_form_manager.h. | 282 // Map username to PasswordForm* for convenience. See password_form_manager.h. |
| 280 typedef std::map<base::string16, PasswordForm*> PasswordFormMap; | 283 typedef std::map<base::string16, PasswordForm*> PasswordFormMap; |
| 281 | 284 |
| 282 typedef std::map<base::string16, const PasswordForm*> ConstPasswordFormMap; | 285 typedef std::map<base::string16, const PasswordForm*> ConstPasswordFormMap; |
| 283 | 286 |
| 284 // For testing. | 287 // For testing. |
| 285 std::ostream& operator<<(std::ostream& os, PasswordForm::Layout layout); | 288 std::ostream& operator<<(std::ostream& os, PasswordForm::Layout layout); |
| 286 std::ostream& operator<<(std::ostream& os, const autofill::PasswordForm& form); | 289 std::ostream& operator<<(std::ostream& os, const autofill::PasswordForm& form); |
| 287 std::ostream& operator<<(std::ostream& os, autofill::PasswordForm* form); | 290 std::ostream& operator<<(std::ostream& os, autofill::PasswordForm* form); |
| 288 | 291 |
| 289 } // namespace autofill | 292 } // namespace autofill |
| 290 | 293 |
| 291 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ | 294 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ |
| OLD | NEW |