Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Unified Diff: components/autofill/common/form_field_data.cc

Issue 16879006: In components/autofill, move common/ to core/common/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to fix conflict Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/autofill/common/form_field_data.cc
diff --git a/components/autofill/common/form_field_data.cc b/components/autofill/common/form_field_data.cc
deleted file mode 100644
index 6e01c32b530893c88a674409842018a94d1442bb..0000000000000000000000000000000000000000
--- a/components/autofill/common/form_field_data.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "components/autofill/common/form_field_data.h"
-
-#include "base/strings/string_util.h"
-#include "base/strings/utf_string_conversions.h"
-
-namespace autofill {
-
-FormFieldData::FormFieldData()
- : max_length(0),
- is_autofilled(false),
- is_checked(false),
- is_checkable(false),
- is_focusable(false),
- should_autocomplete(true),
- text_direction(base::i18n::UNKNOWN_DIRECTION) {
-}
-
-FormFieldData::~FormFieldData() {
-}
-
-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 &&
- autocomplete_attribute == field.autocomplete_attribute &&
- max_length == field.max_length);
-}
-
-bool FormFieldData::operator!=(const FormFieldData& field) const {
- return !operator==(field);
-}
-
-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 FormFieldData& field) {
- return os
- << UTF16ToUTF8(field.label)
- << " "
- << UTF16ToUTF8(field.name)
- << " "
- << UTF16ToUTF8(field.value)
- << " "
- << field.form_control_type
- << " "
- << field.autocomplete_attribute
- << " "
- << field.max_length
- << " "
- << (field.is_autofilled ? "true" : "false")
- << " "
- << (field.is_checked ? "true" : "false")
- << " "
- << (field.is_checkable ? "true" : "false")
- << " "
- << (field.is_focusable ? "true" : "false")
- << " "
- << (field.should_autocomplete ? "true" : "false")
- << " "
- << field.text_direction;
-}
-
-} // namespace autofill
« no previous file with comments | « components/autofill/common/form_field_data.h ('k') | components/autofill/common/form_field_data_predictions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698