Chromium Code Reviews| Index: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc |
| diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc |
| index 4005cd637740de78e4b893536150352e6f725c0c..994fbbed790f85022c3f510b1aee56ed8e3de0bb 100644 |
| --- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc |
| +++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc |
| @@ -1745,7 +1745,6 @@ ValidityMessages AutofillDialogControllerImpl::InputsAreValid( |
| DialogSection section, |
| const FieldValueMap& inputs) { |
| ValidityMessages messages; |
| - FieldValueMap field_values; |
| for (FieldValueMap::const_iterator iter = inputs.begin(); |
| iter != inputs.end(); ++iter) { |
| const ServerFieldType type = iter->first; |
| @@ -1757,23 +1756,11 @@ ValidityMessages AutofillDialogControllerImpl::InputsAreValid( |
| // it to be valid unless later proven otherwise. |
| bool sure = InputWasEdited(type, iter->second) || |
| AutofillType(type).GetStorableType() == ADDRESS_HOME_COUNTRY; |
| - |
| - // Consider only individually valid fields for inter-field validation. |
| - if (text.empty()) { |
| - field_values[type] = iter->second; |
| - // If the field is valid but can be invalidated by inter-field validation, |
|
Evan Stade
2014/01/31 00:22:13
example of the problem this caused:
1) CC is inva
groby-ooo-7-16
2014/01/31 19:59:59
I'm not sure this addresses that issue without sid
Evan Stade
2014/01/31 21:50:28
yes, we want it to always occur, so that we can va
|
| - // assume it to be unsure. |
| - if (type == CREDIT_CARD_EXP_4_DIGIT_YEAR || |
| - type == CREDIT_CARD_EXP_MONTH || |
| - type == CREDIT_CARD_VERIFICATION_CODE || |
| - type == PHONE_HOME_WHOLE_NUMBER || |
| - type == PHONE_BILLING_WHOLE_NUMBER) { |
| - sure = false; |
| - } |
| - } |
| messages.Set(type, ValidityMessage(text, sure)); |
| } |
| + // For the convenience of using operator[]. |
| + FieldValueMap& field_values = const_cast<FieldValueMap&>(inputs); |
| // Validate the date formed by month and year field. (Autofill dialog is |
| // never supposed to have 2-digit years, so not checked). |
| if (field_values.count(CREDIT_CARD_EXP_4_DIGIT_YEAR) && |