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

Unified Diff: webkit/forms/form_field.cc

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 | « webkit/forms/form_field.h ('k') | webkit/forms/form_field_predictions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/forms/form_field.cc
diff --git a/webkit/forms/form_field.cc b/webkit/forms/form_field.cc
deleted file mode 100644
index 3032c612f2232caad5a7303736cdc886b5958ecb..0000000000000000000000000000000000000000
--- a/webkit/forms/form_field.cc
+++ /dev/null
@@ -1,66 +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 "webkit/forms/form_field.h"
-
-#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
-
-namespace webkit {
-namespace forms {
-
-FormField::FormField()
- : max_length(0),
- is_autofilled(false),
- is_focusable(false),
- should_autocomplete(false) {
-}
-
-FormField::~FormField() {
-}
-
-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.
- return (label == field.label &&
- name == field.name &&
- form_control_type == field.form_control_type &&
- autocomplete_type == field.autocomplete_type &&
- max_length == field.max_length);
-}
-
-bool FormField::operator!=(const FormField& field) const {
- return !operator==(field);
-}
-
-bool FormField::operator<(const FormField& field) const {
- if (label == field.label)
- return name < field.name;
-
- return label < field.label;
-}
-
-std::ostream& operator<<(std::ostream& os, const FormField& field) {
- return os
- << UTF16ToUTF8(field.label)
- << " "
- << UTF16ToUTF8(field.name)
- << " "
- << UTF16ToUTF8(field.value)
- << " "
- << UTF16ToUTF8(field.form_control_type)
- << " "
- << UTF16ToUTF8(field.autocomplete_type)
- << " "
- << field.max_length
- << " "
- << (field.is_autofilled ? "true" : "false")
- << " "
- << (field.is_focusable ? "true" : "false")
- << " "
- << (field.should_autocomplete ? "true" : "false");
-}
-
-} // namespace forms
-} // namespace webkit
« no previous file with comments | « webkit/forms/form_field.h ('k') | webkit/forms/form_field_predictions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698