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/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "components/autofill/core/common/password_form.h" | 10 #include "components/autofill/core/common/password_form.h" |
11 | 11 |
12 namespace autofill { | 12 namespace autofill { |
13 | 13 |
14 PasswordForm::PasswordForm() | 14 PasswordForm::PasswordForm() |
15 : scheme(SCHEME_HTML), | 15 : scheme(SCHEME_HTML), |
16 username_marked_by_site(false), | 16 username_marked_by_site(false), |
17 password_autocomplete_set(true), | 17 password_autocomplete_set(true), |
18 ssl_valid(false), | 18 ssl_valid(false), |
19 preferred(false), | 19 preferred(false), |
20 blacklisted_by_user(false), | 20 blacklisted_by_user(false), |
21 type(TYPE_MANUAL), | 21 type(TYPE_MANUAL), |
22 times_used(0), | 22 times_used(0), |
23 generation_upload_status(NO_SIGNAL_SENT), | 23 generation_upload_status(NO_SIGNAL_SENT), |
24 skip_zero_click(false), | 24 skip_zero_click(false), |
25 layout(Layout::LAYOUT_OTHER) { | 25 layout(Layout::LAYOUT_OTHER), |
| 26 parsed_using_autofill_predictions(false) { |
26 } | 27 } |
27 | 28 |
28 PasswordForm::~PasswordForm() { | 29 PasswordForm::~PasswordForm() { |
29 } | 30 } |
30 | 31 |
31 bool PasswordForm::IsPublicSuffixMatch() const { | 32 bool PasswordForm::IsPublicSuffixMatch() const { |
32 return !original_signon_realm.empty(); | 33 return !original_signon_realm.empty(); |
33 } | 34 } |
34 | 35 |
35 bool PasswordForm::operator==(const PasswordForm& form) const { | 36 bool PasswordForm::operator==(const PasswordForm& form) const { |
(...skipping 18 matching lines...) Expand all Loading... |
54 date_synced == form.date_synced && | 55 date_synced == form.date_synced && |
55 blacklisted_by_user == form.blacklisted_by_user && | 56 blacklisted_by_user == form.blacklisted_by_user && |
56 type == form.type && | 57 type == form.type && |
57 times_used == form.times_used && | 58 times_used == form.times_used && |
58 form_data.SameFormAs(form.form_data) && | 59 form_data.SameFormAs(form.form_data) && |
59 generation_upload_status == form.generation_upload_status && | 60 generation_upload_status == form.generation_upload_status && |
60 display_name == form.display_name && | 61 display_name == form.display_name && |
61 avatar_url == form.avatar_url && | 62 avatar_url == form.avatar_url && |
62 federation_url == form.federation_url && | 63 federation_url == form.federation_url && |
63 skip_zero_click == form.skip_zero_click && | 64 skip_zero_click == form.skip_zero_click && |
64 layout == form.layout; | 65 layout == form.layout && |
| 66 parsed_using_autofill_predictions == |
| 67 form.parsed_using_autofill_predictions; |
65 } | 68 } |
66 | 69 |
67 bool PasswordForm::operator!=(const PasswordForm& form) const { | 70 bool PasswordForm::operator!=(const PasswordForm& form) const { |
68 return !operator==(form); | 71 return !operator==(form); |
69 } | 72 } |
70 | 73 |
71 std::ostream& operator<<(std::ostream& os, PasswordForm::Layout layout) { | 74 std::ostream& operator<<(std::ostream& os, PasswordForm::Layout layout) { |
72 switch (layout) { | 75 switch (layout) { |
73 case PasswordForm::Layout::LAYOUT_OTHER: | 76 case PasswordForm::Layout::LAYOUT_OTHER: |
74 os << "LAYOUT_OTHER"; | 77 os << "LAYOUT_OTHER"; |
(...skipping 30 matching lines...) Expand all Loading... |
105 << " date_created: " << form.date_created.ToDoubleT() | 108 << " date_created: " << form.date_created.ToDoubleT() |
106 << " date_synced: " << form.date_synced.ToDoubleT() | 109 << " date_synced: " << form.date_synced.ToDoubleT() |
107 << " type: " << form.type | 110 << " type: " << form.type |
108 << " times_used: " << form.times_used | 111 << " times_used: " << form.times_used |
109 << " form_data: " << form.form_data | 112 << " form_data: " << form.form_data |
110 << " generation_upload_status: " << form.generation_upload_status | 113 << " generation_upload_status: " << form.generation_upload_status |
111 << " display_name: " << base::UTF16ToUTF8(form.display_name) | 114 << " display_name: " << base::UTF16ToUTF8(form.display_name) |
112 << " avatar_url: " << form.avatar_url | 115 << " avatar_url: " << form.avatar_url |
113 << " federation_url: " << form.federation_url | 116 << " federation_url: " << form.federation_url |
114 << " skip_next_zero_click: " << form.skip_zero_click | 117 << " skip_next_zero_click: " << form.skip_zero_click |
115 << " layout: " << form.layout; | 118 << " layout: " << form.layout |
| 119 << " parsed_using_autofill_predictions: " |
| 120 << form.parsed_using_autofill_predictions; |
116 } | 121 } |
117 | 122 |
118 } // namespace autofill | 123 } // namespace autofill |
OLD | NEW |