Chromium Code Reviews| 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 269 // TODO(vabr): Remove |is_alive| once http://crbug.com/486931 is fixed. | 269 // TODO(vabr): Remove |is_alive| once http://crbug.com/486931 is fixed. |
| 270 bool is_alive; // Set on construction, reset on destruction. | 270 bool is_alive; // Set on construction, reset on destruction. |
| 271 | 271 |
| 272 // Returns true if this match was found using public suffix matching. | 272 // Returns true if this match was found using public suffix matching. |
| 273 bool IsPublicSuffixMatch() const; | 273 bool IsPublicSuffixMatch() const; |
| 274 | 274 |
| 275 // Return true if we consider this form to be a change password form. | 275 // Return true if we consider this form to be a change password form. |
| 276 // We use only client heuristics, so it could include signup forms. | 276 // We use only client heuristics, so it could include signup forms. |
| 277 bool IsPossibleChangePasswordForm() const; | 277 bool IsPossibleChangePasswordForm() const; |
| 278 | 278 |
| 279 // Return true if we consider this form to be a change password form | |
| 280 // without username field. | |
|
vabr (Chromium)
2015/07/24 08:24:29
nit: It might be worth copying the sentence about
dvadym
2015/07/24 16:42:40
Done.
| |
| 281 bool IsPossibleChangePasswordFormWithoutUsername() const; | |
| 282 | |
| 279 // Equality operators for testing. | 283 // Equality operators for testing. |
| 280 bool operator==(const PasswordForm& form) const; | 284 bool operator==(const PasswordForm& form) const; |
| 281 bool operator!=(const PasswordForm& form) const; | 285 bool operator!=(const PasswordForm& form) const; |
| 282 | 286 |
| 283 PasswordForm(); | 287 PasswordForm(); |
| 284 ~PasswordForm(); | 288 ~PasswordForm(); |
| 285 }; | 289 }; |
| 286 | 290 |
| 287 // Map username to PasswordForm* for convenience. See password_form_manager.h. | 291 // Map username to PasswordForm* for convenience. See password_form_manager.h. |
| 288 typedef base::ScopedPtrMap<base::string16, scoped_ptr<PasswordForm>> | 292 typedef base::ScopedPtrMap<base::string16, scoped_ptr<PasswordForm>> |
| 289 PasswordFormMap; | 293 PasswordFormMap; |
| 290 | 294 |
| 291 // Like PasswordFormMap, but with weak (not owned) pointers. | 295 // Like PasswordFormMap, but with weak (not owned) pointers. |
| 292 typedef std::map<base::string16, const PasswordForm*> ConstPasswordFormMap; | 296 typedef std::map<base::string16, const PasswordForm*> ConstPasswordFormMap; |
| 293 | 297 |
| 294 // For testing. | 298 // For testing. |
| 295 std::ostream& operator<<(std::ostream& os, PasswordForm::Layout layout); | 299 std::ostream& operator<<(std::ostream& os, PasswordForm::Layout layout); |
| 296 std::ostream& operator<<(std::ostream& os, const autofill::PasswordForm& form); | 300 std::ostream& operator<<(std::ostream& os, const autofill::PasswordForm& form); |
| 297 std::ostream& operator<<(std::ostream& os, autofill::PasswordForm* form); | 301 std::ostream& operator<<(std::ostream& os, autofill::PasswordForm* form); |
| 298 | 302 |
| 299 } // namespace autofill | 303 } // namespace autofill |
| 300 | 304 |
| 301 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ | 305 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ |
| OLD | NEW |