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

Side by Side Diff: chrome/browser/autofill/email_field.cc

Issue 7585020: Remove Autofill support for the ECML standard, as it is virtually unused. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove ECML files from the repository Created 9 years, 4 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
« no previous file with comments | « chrome/browser/autofill/email_field.h ('k') | chrome/browser/autofill/form_field.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/email_field.h" 5 #include "chrome/browser/autofill/email_field.h"
6 6
7 #include "chrome/browser/autofill/autofill_ecml.h"
8 #include "chrome/browser/autofill/autofill_scanner.h" 7 #include "chrome/browser/autofill/autofill_scanner.h"
9 #include "grit/autofill_resources.h" 8 #include "grit/autofill_resources.h"
10 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
11 10
12 using autofill::GetEcmlPattern;
13
14 // static 11 // static
15 FormField* EmailField::Parse(AutofillScanner* scanner, bool is_ecml) { 12 FormField* EmailField::Parse(AutofillScanner* scanner) {
16 string16 pattern;
17 if (is_ecml)
18 pattern = GetEcmlPattern(kEcmlShipToEmail, kEcmlBillToEmail, '|');
19 else
20 pattern = l10n_util::GetStringUTF16(IDS_AUTOFILL_EMAIL_RE);
21
22 const AutofillField* field; 13 const AutofillField* field;
23 if (ParseFieldSpecifics(scanner, pattern, 14 if (ParseFieldSpecifics(scanner,
15 l10n_util::GetStringUTF16(IDS_AUTOFILL_EMAIL_RE),
24 MATCH_DEFAULT | MATCH_EMAIL, &field)) { 16 MATCH_DEFAULT | MATCH_EMAIL, &field)) {
25 return new EmailField(field); 17 return new EmailField(field);
26 } 18 }
27 19
28 return NULL; 20 return NULL;
29 } 21 }
30 22
31 EmailField::EmailField(const AutofillField* field) : field_(field) { 23 EmailField::EmailField(const AutofillField* field) : field_(field) {
32 } 24 }
33 25
34 bool EmailField::ClassifyField(FieldTypeMap* map) const { 26 bool EmailField::ClassifyField(FieldTypeMap* map) const {
35 return AddClassification(field_, EMAIL_ADDRESS, map); 27 return AddClassification(field_, EMAIL_ADDRESS, map);
36 } 28 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/email_field.h ('k') | chrome/browser/autofill/form_field.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698