| 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 #include <ostream> | 5 #include <ostream> |
| 6 #include <sstream> | 6 #include <sstream> |
| 7 | 7 |
| 8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 ssl_valid(false), | 77 ssl_valid(false), |
| 78 preferred(false), | 78 preferred(false), |
| 79 blacklisted_by_user(false), | 79 blacklisted_by_user(false), |
| 80 type(TYPE_MANUAL), | 80 type(TYPE_MANUAL), |
| 81 times_used(0), | 81 times_used(0), |
| 82 generation_upload_status(NO_SIGNAL_SENT), | 82 generation_upload_status(NO_SIGNAL_SENT), |
| 83 skip_zero_click(true), | 83 skip_zero_click(true), |
| 84 layout(Layout::LAYOUT_OTHER), | 84 layout(Layout::LAYOUT_OTHER), |
| 85 was_parsed_using_autofill_predictions(false), | 85 was_parsed_using_autofill_predictions(false), |
| 86 is_public_suffix_match(false), | 86 is_public_suffix_match(false), |
| 87 is_affiliation_based_match(false) {} | 87 is_affiliation_based_match(false), |
| 88 does_look_like_signup_form(false) {} |
| 88 | 89 |
| 89 PasswordForm::PasswordForm(const PasswordForm& other) = default; | 90 PasswordForm::PasswordForm(const PasswordForm& other) = default; |
| 90 | 91 |
| 91 PasswordForm::~PasswordForm() { | 92 PasswordForm::~PasswordForm() { |
| 92 } | 93 } |
| 93 | 94 |
| 94 bool PasswordForm::IsPossibleChangePasswordForm() const { | 95 bool PasswordForm::IsPossibleChangePasswordForm() const { |
| 95 return !new_password_element.empty() && | 96 return !new_password_element.empty() && |
| 96 layout != PasswordForm::Layout::LAYOUT_LOGIN_AND_SIGNUP; | 97 layout != PasswordForm::Layout::LAYOUT_LOGIN_AND_SIGNUP; |
| 97 } | 98 } |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 form_json, base::JSONWriter::OPTIONS_PRETTY_PRINT, &form_as_string); | 200 form_json, base::JSONWriter::OPTIONS_PRETTY_PRINT, &form_as_string); |
| 200 base::TrimWhitespaceASCII(form_as_string, base::TRIM_ALL, &form_as_string); | 201 base::TrimWhitespaceASCII(form_as_string, base::TRIM_ALL, &form_as_string); |
| 201 return os << "PasswordForm(" << form_as_string << ")"; | 202 return os << "PasswordForm(" << form_as_string << ")"; |
| 202 } | 203 } |
| 203 | 204 |
| 204 std::ostream& operator<<(std::ostream& os, PasswordForm* form) { | 205 std::ostream& operator<<(std::ostream& os, PasswordForm* form) { |
| 205 return os << "&" << *form; | 206 return os << "&" << *form; |
| 206 } | 207 } |
| 207 | 208 |
| 208 } // namespace autofill | 209 } // namespace autofill |
| OLD | NEW |