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 | 6 |
7 #include "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "components/autofill/core/common/password_form.h" | 9 #include "components/autofill/core/common/password_form.h" |
10 | 10 |
11 namespace autofill { | 11 namespace autofill { |
12 | 12 |
13 PasswordForm::PasswordForm() | 13 PasswordForm::PasswordForm() |
14 : scheme(SCHEME_HTML), | 14 : scheme(SCHEME_HTML), |
15 password_autocomplete_set(true), | 15 password_autocomplete_set(true), |
16 ssl_valid(false), | 16 ssl_valid(false), |
17 preferred(false), | 17 preferred(false), |
18 blacklisted_by_user(false), | 18 blacklisted_by_user(false), |
19 type(TYPE_MANUAL), | 19 type(TYPE_MANUAL), |
20 times_used(0), | 20 times_used(0), |
21 use_additional_authentication(false) { | 21 use_additional_authentication(false), |
| 22 is_zero_click(false) { |
22 } | 23 } |
23 | 24 |
24 PasswordForm::~PasswordForm() { | 25 PasswordForm::~PasswordForm() { |
25 } | 26 } |
26 | 27 |
27 bool PasswordForm::IsPublicSuffixMatch() const { | 28 bool PasswordForm::IsPublicSuffixMatch() const { |
28 return !original_signon_realm.empty(); | 29 return !original_signon_realm.empty(); |
29 } | 30 } |
30 | 31 |
31 bool PasswordForm::operator==(const PasswordForm& form) const { | 32 bool PasswordForm::operator==(const PasswordForm& form) const { |
(...skipping 10 matching lines...) Expand all Loading... |
42 new_password_element == form.new_password_element && | 43 new_password_element == form.new_password_element && |
43 new_password_value == form.new_password_value && | 44 new_password_value == form.new_password_value && |
44 ssl_valid == form.ssl_valid && | 45 ssl_valid == form.ssl_valid && |
45 preferred == form.preferred && | 46 preferred == form.preferred && |
46 date_created == form.date_created && | 47 date_created == form.date_created && |
47 date_synced == form.date_synced && | 48 date_synced == form.date_synced && |
48 blacklisted_by_user == form.blacklisted_by_user && | 49 blacklisted_by_user == form.blacklisted_by_user && |
49 type == form.type && | 50 type == form.type && |
50 times_used == form.times_used && | 51 times_used == form.times_used && |
51 use_additional_authentication == form.use_additional_authentication && | 52 use_additional_authentication == form.use_additional_authentication && |
52 form_data == form.form_data; | 53 form_data == form.form_data && |
| 54 display_name == form.display_name && |
| 55 avatar_url == form.avatar_url && |
| 56 federation_url == form.federation_url && |
| 57 is_zero_click == form.is_zero_click; |
53 } | 58 } |
54 | 59 |
55 bool PasswordForm::operator!=(const PasswordForm& form) const { | 60 bool PasswordForm::operator!=(const PasswordForm& form) const { |
56 return !operator==(form); | 61 return !operator==(form); |
57 } | 62 } |
58 | 63 |
59 std::ostream& operator<<(std::ostream& os, const PasswordForm& form) { | 64 std::ostream& operator<<(std::ostream& os, const PasswordForm& form) { |
60 return os << "scheme: " << form.scheme | 65 return os << "scheme: " << form.scheme |
61 << " signon_realm: " << form.signon_realm | 66 << " signon_realm: " << form.signon_realm |
62 << " origin: " << form.origin | 67 << " origin: " << form.origin |
(...skipping 10 matching lines...) Expand all Loading... |
73 << " autocomplete_set:" << form.password_autocomplete_set | 78 << " autocomplete_set:" << form.password_autocomplete_set |
74 << " blacklisted: " << form.blacklisted_by_user | 79 << " blacklisted: " << form.blacklisted_by_user |
75 << " preferred: " << form.preferred | 80 << " preferred: " << form.preferred |
76 << " ssl_valid: " << form.ssl_valid | 81 << " ssl_valid: " << form.ssl_valid |
77 << " date_created: " << form.date_created.ToDoubleT() | 82 << " date_created: " << form.date_created.ToDoubleT() |
78 << " date_synced: " << form.date_synced.ToDoubleT() | 83 << " date_synced: " << form.date_synced.ToDoubleT() |
79 << " type: " << form.type | 84 << " type: " << form.type |
80 << " times_used: " << form.times_used | 85 << " times_used: " << form.times_used |
81 << " use additional authentication: " | 86 << " use additional authentication: " |
82 << form.use_additional_authentication | 87 << form.use_additional_authentication |
83 << " form_data: " << form.form_data; | 88 << " form_data: " << form.form_data |
| 89 << " display_name: " << base::UTF16ToUTF8(form.display_name) |
| 90 << " avatar_url: " << form.avatar_url |
| 91 << " federation_url: " << form.federation_url |
| 92 << " is_zero_click: " << form.is_zero_click; |
84 } | 93 } |
85 | 94 |
86 } // namespace autofill | 95 } // namespace autofill |
OLD | NEW |