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

Unified Diff: chrome/browser/autofill/name_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/autofill/name_field.h ('k') | chrome/browser/autofill/name_field_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/name_field.cc
diff --git a/chrome/browser/autofill/name_field.cc b/chrome/browser/autofill/name_field.cc
index 7d54700d57af0ae632ebb77bd47c2a814b118dad..05e79b9f5321fcd1bceef3dcd5a81175ca0c53b2 100644
--- a/chrome/browser/autofill/name_field.cc
+++ b/chrome/browser/autofill/name_field.cc
@@ -8,14 +8,11 @@
#include "base/memory/scoped_ptr.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
-#include "chrome/browser/autofill/autofill_ecml.h"
#include "chrome/browser/autofill/autofill_scanner.h"
#include "chrome/browser/autofill/autofill_type.h"
#include "grit/autofill_resources.h"
#include "ui/base/l10n/l10n_util.h"
-using autofill::GetEcmlPattern;
-
namespace {
// A form field that can parse a full name field.
@@ -40,8 +37,7 @@ class FirstLastNameField : public NameField {
public:
static FirstLastNameField* ParseSpecificName(AutofillScanner* scanner);
static FirstLastNameField* ParseComponentNames(AutofillScanner* scanner);
- static FirstLastNameField* ParseEcmlName(AutofillScanner* scanner);
- static FirstLastNameField* Parse(AutofillScanner* scanner, bool is_ecml);
+ static FirstLastNameField* Parse(AutofillScanner* scanner);
protected:
// FormField:
@@ -60,13 +56,13 @@ class FirstLastNameField : public NameField {
} // namespace
-FormField* NameField::Parse(AutofillScanner* scanner, bool is_ecml) {
+FormField* NameField::Parse(AutofillScanner* scanner) {
if (scanner->IsEnd())
return NULL;
// Try FirstLastNameField first since it's more specific.
- NameField* field = FirstLastNameField::Parse(scanner, is_ecml);
- if (!field && !is_ecml)
+ NameField* field = FirstLastNameField::Parse(scanner);
+ if (!field)
field = FullNameField::Parse(scanner);
return field;
}
@@ -202,32 +198,7 @@ FirstLastNameField* FirstLastNameField::ParseComponentNames(
return NULL;
}
-FirstLastNameField* FirstLastNameField::ParseEcmlName(
- AutofillScanner* scanner) {
- scoped_ptr<FirstLastNameField> field(new FirstLastNameField);
- scanner->SaveCursor();
-
- string16 pattern = GetEcmlPattern(kEcmlShipToFirstName,
- kEcmlBillToFirstName, '|');
- if (!ParseField(scanner, pattern, &field->first_name_))
- return NULL;
-
- pattern = GetEcmlPattern(kEcmlShipToMiddleName, kEcmlBillToMiddleName, '|');
- ParseField(scanner, pattern, &field->middle_name_);
-
- pattern = GetEcmlPattern(kEcmlShipToLastName, kEcmlBillToLastName, '|');
- if (ParseField(scanner, pattern, &field->last_name_))
- return field.release();
-
- scanner->Rewind();
- return NULL;
-}
-
-FirstLastNameField* FirstLastNameField::Parse(AutofillScanner* scanner,
- bool is_ecml) {
- if (is_ecml)
- return ParseEcmlName(scanner);
-
+FirstLastNameField* FirstLastNameField::Parse(AutofillScanner* scanner) {
FirstLastNameField* field = ParseSpecificName(scanner);
if (!field)
field = ParseComponentNames(scanner);
« no previous file with comments | « chrome/browser/autofill/name_field.h ('k') | chrome/browser/autofill/name_field_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698