| Index: chrome/common/form_field_data.cc
|
| diff --git a/webkit/forms/form_field.cc b/chrome/common/form_field_data.cc
|
| similarity index 68%
|
| rename from webkit/forms/form_field.cc
|
| rename to chrome/common/form_field_data.cc
|
| index 3032c612f2232caad5a7303736cdc886b5958ecb..cd134d4008ee2abe3165f2b0a6dcef95dc5e2a0e 100644
|
| --- a/webkit/forms/form_field.cc
|
| +++ b/chrome/common/form_field_data.cc
|
| @@ -2,27 +2,24 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "webkit/forms/form_field.h"
|
| +#include "chrome/common/form_field_data.h"
|
|
|
| #include "base/string_util.h"
|
| #include "base/utf_string_conversions.h"
|
|
|
| -namespace webkit {
|
| -namespace forms {
|
| -
|
| -FormField::FormField()
|
| +FormFieldData::FormFieldData()
|
| : max_length(0),
|
| is_autofilled(false),
|
| is_focusable(false),
|
| should_autocomplete(false) {
|
| }
|
|
|
| -FormField::~FormField() {
|
| +FormFieldData::~FormFieldData() {
|
| }
|
|
|
| -bool FormField::operator==(const FormField& field) const {
|
| - // A FormField stores a value, but the value is not part of the identity of
|
| - // the field, so we don't want to compare the values.
|
| +bool FormFieldData::operator==(const FormFieldData& field) const {
|
| + // A FormFieldData stores a value, but the value is not part of the identity
|
| + // of the field, so we don't want to compare the values.
|
| return (label == field.label &&
|
| name == field.name &&
|
| form_control_type == field.form_control_type &&
|
| @@ -30,18 +27,18 @@ bool FormField::operator==(const FormField& field) const {
|
| max_length == field.max_length);
|
| }
|
|
|
| -bool FormField::operator!=(const FormField& field) const {
|
| +bool FormFieldData::operator!=(const FormFieldData& field) const {
|
| return !operator==(field);
|
| }
|
|
|
| -bool FormField::operator<(const FormField& field) const {
|
| +bool FormFieldData::operator<(const FormFieldData& field) const {
|
| if (label == field.label)
|
| return name < field.name;
|
|
|
| return label < field.label;
|
| }
|
|
|
| -std::ostream& operator<<(std::ostream& os, const FormField& field) {
|
| +std::ostream& operator<<(std::ostream& os, const FormFieldData& field) {
|
| return os
|
| << UTF16ToUTF8(field.label)
|
| << " "
|
| @@ -61,6 +58,3 @@ std::ostream& operator<<(std::ostream& os, const FormField& field) {
|
| << " "
|
| << (field.should_autocomplete ? "true" : "false");
|
| }
|
| -
|
| -} // namespace forms
|
| -} // namespace webkit
|
|
|