| 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 "components/autofill/common/form_field_data.h" | 5 #include "components/autofill/common/form_field_data.h" |
| 6 | 6 |
| 7 #include "base/strings/string_util.h" | 7 #include "base/strings/string_util.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 | 9 |
| 10 namespace autofill { | 10 namespace autofill { |
| 11 | 11 |
| 12 FormFieldData::FormFieldData() | 12 FormFieldData::FormFieldData() |
| 13 : max_length(0), | 13 : max_length(0), |
| 14 is_autofilled(false), | 14 is_autofilled(false), |
| 15 is_checked(false), | 15 is_checked(false), |
| 16 is_checkable(false), | 16 is_checkable(false), |
| 17 is_focusable(false), | 17 is_focusable(false), |
| 18 should_autocomplete(true) { | 18 should_autocomplete(true), |
| 19 text_direction(base::i18n::UNKNOWN_DIRECTION) { |
| 19 } | 20 } |
| 20 | 21 |
| 21 FormFieldData::~FormFieldData() { | 22 FormFieldData::~FormFieldData() { |
| 22 } | 23 } |
| 23 | 24 |
| 24 bool FormFieldData::operator==(const FormFieldData& field) const { | 25 bool FormFieldData::operator==(const FormFieldData& field) const { |
| 25 // A FormFieldData stores a value, but the value is not part of the identity | 26 // A FormFieldData stores a value, but the value is not part of the identity |
| 26 // of the field, so we don't want to compare the values. | 27 // of the field, so we don't want to compare the values. |
| 27 return (label == field.label && | 28 return (label == field.label && |
| 28 name == field.name && | 29 name == field.name && |
| (...skipping 28 matching lines...) Expand all Loading... |
| 57 << field.max_length | 58 << field.max_length |
| 58 << " " | 59 << " " |
| 59 << (field.is_autofilled ? "true" : "false") | 60 << (field.is_autofilled ? "true" : "false") |
| 60 << " " | 61 << " " |
| 61 << (field.is_checked ? "true" : "false") | 62 << (field.is_checked ? "true" : "false") |
| 62 << " " | 63 << " " |
| 63 << (field.is_checkable ? "true" : "false") | 64 << (field.is_checkable ? "true" : "false") |
| 64 << " " | 65 << " " |
| 65 << (field.is_focusable ? "true" : "false") | 66 << (field.is_focusable ? "true" : "false") |
| 66 << " " | 67 << " " |
| 67 << (field.should_autocomplete ? "true" : "false"); | 68 << (field.should_autocomplete ? "true" : "false") |
| 69 << " " |
| 70 << field.text_direction; |
| 68 } | 71 } |
| 69 | 72 |
| 70 } // namespace autofill | 73 } // namespace autofill |
| OLD | NEW |