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

Unified Diff: chrome/common/form_field_data.h

Issue 11000016: Move forms/ out of webkit/. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Response to review Created 8 years, 2 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 | « chrome/common/form_data_predictions.cc ('k') | chrome/common/form_field_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/form_field_data.h
diff --git a/webkit/forms/form_field.h b/chrome/common/form_field_data.h
similarity index 66%
rename from webkit/forms/form_field.h
rename to chrome/common/form_field_data.h
index 0e92d9872d1a5609c39a1fa1f55a4b8710ecca93..286fb727293e41e575650e8d2a9cadadaccf331a 100644
--- a/webkit/forms/form_field.h
+++ b/chrome/common/form_field_data.h
@@ -2,30 +2,26 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_FORMS_FORM_FIELD_H_
-#define WEBKIT_FORMS_FORM_FIELD_H_
+#ifndef CHROME_COMMON_FORM_FIELD_DATA_H_
+#define CHROME_COMMON_FORM_FIELD_DATA_H_
#include <vector>
#include "base/string16.h"
-#include "webkit/forms/webkit_forms_export.h"
-
-namespace webkit {
-namespace forms {
// Stores information about a field in a form.
-struct WEBKIT_FORMS_EXPORT FormField {
- FormField();
- virtual ~FormField();
+struct FormFieldData {
+ FormFieldData();
+ virtual ~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 FormField& field) const;
- bool operator!=(const FormField& field) const;
+ bool operator==(const FormFieldData& field) const;
+ bool operator!=(const FormFieldData& field) const;
// Comparsion operator exposed for STL map. Uses label, then name to sort.
- bool operator<(const FormField& field) const;
+ bool operator<(const FormFieldData& field) const;
string16 label;
string16 name;
@@ -43,16 +39,12 @@ struct WEBKIT_FORMS_EXPORT FormField {
std::vector<string16> option_contents;
};
-// So we can compare FormFields with EXPECT_EQ().
-WEBKIT_FORMS_EXPORT std::ostream& operator<<(std::ostream& os,
- const FormField& field);
-
-} // namespace forms
-} // namespace webkit
+// 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 |FormField|s
-// in test code.
-#define EXPECT_FORM_FIELD_EQUALS(expected, actual) \
+// 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); \
@@ -63,4 +55,4 @@ WEBKIT_FORMS_EXPORT std::ostream& operator<<(std::ostream& os,
EXPECT_EQ(expected.is_autofilled, actual.is_autofilled); \
} while (0)
-#endif // WEBKIT_FORMS_FORM_FIELD_H_
+#endif // CHROME_COMMON_FORM_FIELD_DATA_H_
« no previous file with comments | « chrome/common/form_data_predictions.cc ('k') | chrome/common/form_field_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698