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

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: Update AutofillFieldTest expectations 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 dbf2037af209eb8fb6227890b5ca853243ef79c5..3202aa367bd4be44e266f9147403f2846f5cb531 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 &&
@@ -1247,9 +1247,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);
@@ -1275,7 +1275,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;
« no previous file with comments | « chrome/browser/autofill/autofill_field_unittest.cc ('k') | chrome/browser/autofill/autofill_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698