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

Side by Side Diff: chrome/browser/autofill/autofill_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 unified diff | Download patch
« no previous file with comments | « chrome/browser/autofill/autofill_field.h ('k') | chrome/browser/autofill/autofill_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/autofill/autofill_field.h" 5 #include "chrome/browser/autofill/autofill_field.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/sha1.h" 8 #include "base/sha1.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 13 matching lines...) Expand all
24 } 24 }
25 25
26 } // namespace 26 } // namespace
27 27
28 AutofillField::AutofillField() 28 AutofillField::AutofillField()
29 : server_type_(NO_SERVER_DATA), 29 : server_type_(NO_SERVER_DATA),
30 heuristic_type_(UNKNOWN_TYPE), 30 heuristic_type_(UNKNOWN_TYPE),
31 phone_part_(IGNORED) { 31 phone_part_(IGNORED) {
32 } 32 }
33 33
34 AutofillField::AutofillField(const webkit::forms::FormField& field, 34 AutofillField::AutofillField(const FormFieldData& field,
35 const string16& unique_name) 35 const string16& unique_name)
36 : webkit::forms::FormField(field), 36 : FormFieldData(field),
37 unique_name_(unique_name), 37 unique_name_(unique_name),
38 server_type_(NO_SERVER_DATA), 38 server_type_(NO_SERVER_DATA),
39 heuristic_type_(UNKNOWN_TYPE), 39 heuristic_type_(UNKNOWN_TYPE),
40 phone_part_(IGNORED) { 40 phone_part_(IGNORED) {
41 } 41 }
42 42
43 AutofillField::~AutofillField() {} 43 AutofillField::~AutofillField() {}
44 44
45 void AutofillField::set_heuristic_type(AutofillFieldType type) { 45 void AutofillField::set_heuristic_type(AutofillFieldType type) {
46 if (type >= 0 && type < MAX_VALID_FIELD_TYPE) { 46 if (type >= 0 && type < MAX_VALID_FIELD_TYPE) {
(...skipping 28 matching lines...) Expand all
75 std::string AutofillField::FieldSignature() const { 75 std::string AutofillField::FieldSignature() const {
76 std::string field_name = UTF16ToUTF8(name); 76 std::string field_name = UTF16ToUTF8(name);
77 std::string type = UTF16ToUTF8(form_control_type); 77 std::string type = UTF16ToUTF8(form_control_type);
78 std::string field_string = field_name + "&" + type; 78 std::string field_string = field_name + "&" + type;
79 return Hash32Bit(field_string); 79 return Hash32Bit(field_string);
80 } 80 }
81 81
82 bool AutofillField::IsFieldFillable() const { 82 bool AutofillField::IsFieldFillable() const {
83 return type() != UNKNOWN_TYPE; 83 return type() != UNKNOWN_TYPE;
84 } 84 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_field.h ('k') | chrome/browser/autofill/autofill_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698