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

Side by Side Diff: components/autofill/browser/form_field.cc

Issue 12434004: Move remaining Autofill code to //components/autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix long lines Created 7 years, 9 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 | Annotate | Revision Log
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/form_field.h" 5 #include "components/autofill/browser/form_field.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "base/stringprintf.h" 14 #include "base/stringprintf.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "chrome/browser/autofill/address_field.h" 16 #include "components/autofill/browser/address_field.h"
17 #include "chrome/browser/autofill/autofill_field.h" 17 #include "components/autofill/browser/autofill_field.h"
18 #include "chrome/browser/autofill/autofill_regexes.h" 18 #include "components/autofill/browser/autofill_regexes.h"
19 #include "chrome/browser/autofill/autofill_scanner.h" 19 #include "components/autofill/browser/autofill_scanner.h"
20 #include "chrome/browser/autofill/credit_card_field.h" 20 #include "components/autofill/browser/credit_card_field.h"
21 #include "chrome/browser/autofill/email_field.h" 21 #include "components/autofill/browser/email_field.h"
22 #include "chrome/browser/autofill/field_types.h" 22 #include "components/autofill/browser/field_types.h"
23 #include "chrome/browser/autofill/form_structure.h" 23 #include "components/autofill/browser/form_structure.h"
24 #include "chrome/browser/autofill/name_field.h" 24 #include "components/autofill/browser/name_field.h"
25 #include "chrome/browser/autofill/phone_field.h" 25 #include "components/autofill/browser/phone_field.h"
26 #include "ui/base/l10n/l10n_util.h" 26 #include "ui/base/l10n/l10n_util.h"
27 27
28 namespace { 28 namespace {
29 29
30 bool IsTextField(const std::string& type) { 30 bool IsTextField(const std::string& type) {
31 return type == "text"; 31 return type == "text";
32 } 32 }
33 33
34 bool IsEmailField(const std::string& type) { 34 bool IsEmailField(const std::string& type) {
35 return type == "email"; 35 return type == "email";
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 continue; 188 continue;
189 } 189 }
190 190
191 // Add entries into the map for each field type found in |form_field|. 191 // Add entries into the map for each field type found in |form_field|.
192 bool ok = form_field->ClassifyField(map); 192 bool ok = form_field->ClassifyField(map);
193 DCHECK(ok); 193 DCHECK(ok);
194 } 194 }
195 195
196 std::swap(*fields, remaining_fields); 196 std::swap(*fields, remaining_fields);
197 } 197 }
OLDNEW
« no previous file with comments | « components/autofill/browser/form_field.h ('k') | components/autofill/browser/form_field_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698