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 "components/autofill/core/common/form_field_data.h" | 5 #include "components/autofill/core/common/form_field_data.h" |
6 | 6 |
7 #include "base/pickle.h" | 7 #include "base/pickle.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 | 10 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 default: { | 144 default: { |
145 LOG(ERROR) << "Unknown FormFieldData pickle version " << version; | 145 LOG(ERROR) << "Unknown FormFieldData pickle version " << version; |
146 return false; | 146 return false; |
147 } | 147 } |
148 } | 148 } |
149 return true; | 149 return true; |
150 } | 150 } |
151 | 151 |
152 std::ostream& operator<<(std::ostream& os, const FormFieldData& field) { | 152 std::ostream& operator<<(std::ostream& os, const FormFieldData& field) { |
153 return os | 153 return os |
154 << UTF16ToUTF8(field.label) | 154 << base::UTF16ToUTF8(field.label) |
155 << " " | 155 << " " |
156 << UTF16ToUTF8(field.name) | 156 << base::UTF16ToUTF8(field.name) |
157 << " " | 157 << " " |
158 << UTF16ToUTF8(field.value) | 158 << base::UTF16ToUTF8(field.value) |
159 << " " | 159 << " " |
160 << field.form_control_type | 160 << field.form_control_type |
161 << " " | 161 << " " |
162 << field.autocomplete_attribute | 162 << field.autocomplete_attribute |
163 << " " | 163 << " " |
164 << field.max_length | 164 << field.max_length |
165 << " " | 165 << " " |
166 << (field.is_autofilled ? "true" : "false") | 166 << (field.is_autofilled ? "true" : "false") |
167 << " " | 167 << " " |
168 << (field.is_checked ? "true" : "false") | 168 << (field.is_checked ? "true" : "false") |
169 << " " | 169 << " " |
170 << (field.is_checkable ? "true" : "false") | 170 << (field.is_checkable ? "true" : "false") |
171 << " " | 171 << " " |
172 << (field.is_focusable ? "true" : "false") | 172 << (field.is_focusable ? "true" : "false") |
173 << " " | 173 << " " |
174 << (field.should_autocomplete ? "true" : "false") | 174 << (field.should_autocomplete ? "true" : "false") |
175 << " " | 175 << " " |
176 << field.text_direction; | 176 << field.text_direction; |
177 } | 177 } |
178 | 178 |
179 } // namespace autofill | 179 } // namespace autofill |
OLD | NEW |