Chromium Code Reviews| Index: chrome/browser/autofill/autofill_manager.cc |
| diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc |
| index 162375268776d8418d802d495793a96847dc7b5f..267a4571646827bb4a882bd8a288068a4ff9788b 100644 |
| --- a/chrome/browser/autofill/autofill_manager.cc |
| +++ b/chrome/browser/autofill/autofill_manager.cc |
| @@ -686,10 +686,18 @@ void AutoFillManager::FillCreditCardFormField(const CreditCard* credit_card, |
| DCHECK(type.group() == AutoFillType::CREDIT_CARD); |
| DCHECK(field); |
| - if (field->form_control_type() == ASCIIToUTF16("select-one")) |
| + if (field->form_control_type() == ASCIIToUTF16("select-one")) { |
| autofill::FillSelectControl(credit_card, type, field); |
| - else |
| + } else if (field->form_control_type() == ASCIIToUTF16("month")) { |
| + // HTML5 input="month" consisnts of year-month. |
|
dhollowa
2011/01/05 03:08:26
It is possible that that the |credit_card| has emp
dhollowa
2011/01/05 03:08:26
nit: s/consisnts/consists/
|
| + string16 month = credit_card->GetFieldText( |
| + AutoFillType(CREDIT_CARD_EXP_4_DIGIT_YEAR)); |
| + month += ASCIIToUTF16("-"); |
| + month += credit_card->GetFieldText(AutoFillType(CREDIT_CARD_EXP_MONTH)); |
| + field->set_value(month); |
| + } else { |
| field->set_value(credit_card->GetFieldText(type)); |
| + } |
| } |
| void AutoFillManager::FillFormField(const AutoFillProfile* profile, |