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

Unified Diff: chrome/browser/autofill/autofill_manager.cc

Issue 11198048: [Autofill] Update the autocomplete types implementation to match the current HTML spec. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: string16 -> std::string and other fixes + cleanup 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autofill/autofill_manager.cc
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index e4d89a5be997c5bcddd24e557a9924584a188707..2cd6bfe3fc354d3bf05393b6033b10499b6f45e2 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -119,7 +119,7 @@ void RemoveDuplicateSuggestions(std::vector<string16>* values,
// is auto-filled.
bool SectionIsAutofilled(const FormStructure& form_structure,
const FormData& form,
- const string16& section) {
+ const std::string& section) {
DCHECK_EQ(form_structure.field_count(), form.fields.size());
for (size_t i = 0; i < form_structure.field_count(); ++i) {
if (form_structure.field(i)->section() == section &&
@@ -1234,9 +1234,9 @@ void AutofillManager::FillCreditCardFormField(const CreditCard& credit_card,
DCHECK_EQ(AutofillType::CREDIT_CARD, AutofillType(type).group());
DCHECK(field);
- if (field->form_control_type == ASCIIToUTF16("select-one")) {
+ if (field->form_control_type == "select-one") {
autofill::FillSelectControl(credit_card, type, field);
- } else if (field->form_control_type == ASCIIToUTF16("month")) {
+ } else if (field->form_control_type == "month") {
// HTML5 input="month" consists of year-month.
string16 year =
credit_card.GetCanonicalizedInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR);
@@ -1262,7 +1262,7 @@ void AutofillManager::FillFormField(const AutofillProfile& profile,
if (type == PHONE_HOME_NUMBER) {
FillPhoneNumberField(profile, cached_field, variant, field);
} else {
- if (field->form_control_type == ASCIIToUTF16("select-one")) {
+ if (field->form_control_type == "select-one") {
autofill::FillSelectControl(profile, type, field);
} else {
std::vector<string16> values;

Powered by Google App Engine
This is Rietveld 408576698