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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(false), | 83 skip_zero_click(false), |
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 | 88 |
| 89 PasswordForm::PasswordForm(const PasswordForm& other) = default; |
| 90 |
89 PasswordForm::~PasswordForm() { | 91 PasswordForm::~PasswordForm() { |
90 } | 92 } |
91 | 93 |
92 bool PasswordForm::IsPossibleChangePasswordForm() const { | 94 bool PasswordForm::IsPossibleChangePasswordForm() const { |
93 return !new_password_element.empty() && | 95 return !new_password_element.empty() && |
94 layout != PasswordForm::Layout::LAYOUT_LOGIN_AND_SIGNUP; | 96 layout != PasswordForm::Layout::LAYOUT_LOGIN_AND_SIGNUP; |
95 } | 97 } |
96 | 98 |
97 bool PasswordForm::IsPossibleChangePasswordFormWithoutUsername() const { | 99 bool PasswordForm::IsPossibleChangePasswordFormWithoutUsername() const { |
98 return IsPossibleChangePasswordForm() && username_element.empty(); | 100 return IsPossibleChangePasswordForm() && username_element.empty(); |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 form_json, base::JSONWriter::OPTIONS_PRETTY_PRINT, &form_as_string); | 196 form_json, base::JSONWriter::OPTIONS_PRETTY_PRINT, &form_as_string); |
195 base::TrimWhitespaceASCII(form_as_string, base::TRIM_ALL, &form_as_string); | 197 base::TrimWhitespaceASCII(form_as_string, base::TRIM_ALL, &form_as_string); |
196 return os << "PasswordForm(" << form_as_string << ")"; | 198 return os << "PasswordForm(" << form_as_string << ")"; |
197 } | 199 } |
198 | 200 |
199 std::ostream& operator<<(std::ostream& os, PasswordForm* form) { | 201 std::ostream& operator<<(std::ostream& os, PasswordForm* form) { |
200 return os << "&" << *form; | 202 return os << "&" << *form; |
201 } | 203 } |
202 | 204 |
203 } // namespace autofill | 205 } // namespace autofill |
OLD | NEW |