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

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

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
« no previous file with comments | « components/autofill/common/form_data_predictions.cc ('k') | components/autofill/common/form_field_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/common/form_field_data.h
diff --git a/components/autofill/common/form_field_data.h b/components/autofill/common/form_field_data.h
deleted file mode 100644
index 64f3cc2803714fb280f74294599eb93d35b0a13e..0000000000000000000000000000000000000000
--- a/components/autofill/common/form_field_data.h
+++ /dev/null
@@ -1,69 +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.
-
-#ifndef COMPONENTS_AUTOFILL_COMMON_FORM_FIELD_DATA_H_
-#define COMPONENTS_AUTOFILL_COMMON_FORM_FIELD_DATA_H_
-
-#include <vector>
-
-#include "base/i18n/rtl.h"
-#include "base/strings/string16.h"
-
-namespace autofill {
-
-// Stores information about a field in a form.
-struct FormFieldData {
- FormFieldData();
- ~FormFieldData();
-
- // Equality tests for identity which does not include |value| or
- // |is_autofilled|.
- // TODO(dhollowa): These operators need to be revised when we implement field
- // ids.
- bool operator==(const FormFieldData& field) const;
- bool operator!=(const FormFieldData& field) const;
- // Comparison operator exposed for STL map. Uses label, then name to sort.
- bool operator<(const FormFieldData& field) const;
-
- base::string16 label;
- base::string16 name;
- base::string16 value;
- std::string form_control_type;
- std::string autocomplete_attribute;
- size_t max_length;
- bool is_autofilled;
- bool is_checked;
- bool is_checkable;
- bool is_focusable;
- bool should_autocomplete;
- base::i18n::TextDirection text_direction;
-
- // For the HTML snippet |<option value="US">United States</option>|, the
- // value is "US" and the contents are "United States".
- std::vector<base::string16> option_values;
- std::vector<base::string16> option_contents;
-};
-
-// So we can compare FormFieldDatas with EXPECT_EQ().
-std::ostream& operator<<(std::ostream& os, const FormFieldData& field);
-
-// Prefer to use this macro in place of |EXPECT_EQ()| for comparing
-// |FormFieldData|s in test code.
-#define EXPECT_FORM_FIELD_DATA_EQUALS(expected, actual) \
- do { \
- EXPECT_EQ(expected.label, actual.label); \
- EXPECT_EQ(expected.name, actual.name); \
- EXPECT_EQ(expected.value, actual.value); \
- EXPECT_EQ(expected.form_control_type, actual.form_control_type); \
- EXPECT_EQ(expected.autocomplete_attribute, actual.autocomplete_attribute); \
- EXPECT_EQ(expected.max_length, actual.max_length); \
- EXPECT_EQ(expected.is_autofilled, actual.is_autofilled); \
- EXPECT_EQ(expected.is_checked, actual.is_checked); \
- EXPECT_EQ(expected.is_checkable, actual.is_checkable); \
- } while (0)
-
-} // namespace autofill
-
-#endif // COMPONENTS_AUTOFILL_COMMON_FORM_FIELD_DATA_H_
-
« no previous file with comments | « components/autofill/common/form_data_predictions.cc ('k') | components/autofill/common/form_field_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698