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

Side by Side Diff: components/autofill/core/browser/name_field.cc

Issue 112433004: Update uses of UTF conversions in chrome_frame/, chromeos/, components/ to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/autofill/core/browser/name_field.h" 5 #include "components/autofill/core/browser/name_field.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "components/autofill/core/browser/autofill_regex_constants.h" 11 #include "components/autofill/core/browser/autofill_regex_constants.h"
12 #include "components/autofill/core/browser/autofill_scanner.h" 12 #include "components/autofill/core/browser/autofill_scanner.h"
13 #include "components/autofill/core/browser/autofill_type.h" 13 #include "components/autofill/core/browser/autofill_type.h"
14 #include "ui/base/l10n/l10n_util.h" 14 #include "ui/base/l10n/l10n_util.h"
15 15
16 using base::UTF8ToUTF16;
17
16 namespace autofill { 18 namespace autofill {
17 namespace { 19 namespace {
18 20
19 // A form field that can parse a full name field. 21 // A form field that can parse a full name field.
20 class FullNameField : public NameField { 22 class FullNameField : public NameField {
21 public: 23 public:
22 static FullNameField* Parse(AutofillScanner* scanner); 24 static FullNameField* Parse(AutofillScanner* scanner);
23 25
24 protected: 26 protected:
25 // FormField: 27 // FormField:
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 210
209 bool FirstLastNameField::ClassifyField(ServerFieldTypeMap* map) const { 211 bool FirstLastNameField::ClassifyField(ServerFieldTypeMap* map) const {
210 bool ok = AddClassification(first_name_, NAME_FIRST, map); 212 bool ok = AddClassification(first_name_, NAME_FIRST, map);
211 ok = ok && AddClassification(last_name_, NAME_LAST, map); 213 ok = ok && AddClassification(last_name_, NAME_LAST, map);
212 ServerFieldType type = middle_initial_ ? NAME_MIDDLE_INITIAL : NAME_MIDDLE; 214 ServerFieldType type = middle_initial_ ? NAME_MIDDLE_INITIAL : NAME_MIDDLE;
213 ok = ok && AddClassification(middle_name_, type, map); 215 ok = ok && AddClassification(middle_name_, type, map);
214 return ok; 216 return ok;
215 } 217 }
216 218
217 } // namespace autofill 219 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/form_structure_unittest.cc ('k') | components/autofill/core/browser/name_field_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698