OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/common/form_field_data.h" | 5 #include "chrome/common/form_field_data.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 | 9 |
10 FormFieldData::FormFieldData() | 10 FormFieldData::FormFieldData() |
11 : max_length(0), | 11 : max_length(0), |
12 is_autofilled(false), | 12 is_autofilled(false), |
| 13 is_checked(false), |
| 14 is_checkable(false), |
13 is_focusable(false), | 15 is_focusable(false), |
14 should_autocomplete(false) { | 16 should_autocomplete(false) { |
15 } | 17 } |
16 | 18 |
17 FormFieldData::~FormFieldData() { | 19 FormFieldData::~FormFieldData() { |
18 } | 20 } |
19 | 21 |
20 bool FormFieldData::operator==(const FormFieldData& field) const { | 22 bool FormFieldData::operator==(const FormFieldData& field) const { |
21 // A FormFieldData stores a value, but the value is not part of the identity | 23 // A FormFieldData stores a value, but the value is not part of the identity |
22 // of the field, so we don't want to compare the values. | 24 // of the field, so we don't want to compare the values. |
(...skipping 24 matching lines...) Expand all Loading... |
47 << UTF16ToUTF8(field.value) | 49 << UTF16ToUTF8(field.value) |
48 << " " | 50 << " " |
49 << field.form_control_type | 51 << field.form_control_type |
50 << " " | 52 << " " |
51 << field.autocomplete_attribute | 53 << field.autocomplete_attribute |
52 << " " | 54 << " " |
53 << field.max_length | 55 << field.max_length |
54 << " " | 56 << " " |
55 << (field.is_autofilled ? "true" : "false") | 57 << (field.is_autofilled ? "true" : "false") |
56 << " " | 58 << " " |
| 59 << (field.is_checked ? "true" : "false") |
| 60 << " " |
| 61 << (field.is_checkable ? "true" : "false") |
| 62 << " " |
57 << (field.is_focusable ? "true" : "false") | 63 << (field.is_focusable ? "true" : "false") |
58 << " " | 64 << " " |
59 << (field.should_autocomplete ? "true" : "false"); | 65 << (field.should_autocomplete ? "true" : "false"); |
60 } | 66 } |
OLD | NEW |