Chromium Code Reviews| Index: components/autofill/core/browser/autofill_manager.cc |
| diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc |
| index 26816f8f0a3e20668849938e4d46367157bdd4f2..e7969bfb661acc981cb427909c8bcee2bd6262cd 100644 |
| --- a/components/autofill/core/browser/autofill_manager.cc |
| +++ b/components/autofill/core/browser/autofill_manager.cc |
| @@ -508,6 +508,24 @@ void AutofillManager::OnQueryFormFieldAutofill(int query_id, |
| metric_logger_->LogAddressSuggestionsCount(values.size()); |
| has_logged_address_suggestions_count_ = true; |
| } |
| + |
| + // Adjust phone number to display in prefix/suffix case. |
| + FormData result = form; |
| + if (type.GetStorableType() == PHONE_HOME_NUMBER) { |
| + for (std::vector<FormFieldData>::iterator iter = |
| + result.fields.begin(); |
| + iter != result.fields.end(); |
| + ++iter) { |
| + if ((*iter) == field) { |
| + for (size_t i = 0; i < values.size(); ++i) { |
| + base::string16 value; |
| + AutofillField::GetPhoneNumberValue( |
| + *autofill_field, values[i], &(*iter), &value); |
| + values[i] = value; |
| + } |
| + } |
| + } |
| + } |
|
Ilya Sherman
2014/09/03 00:55:49
Can all of this be done in the method that assigns
ziran.sun
2014/09/04 13:10:25
I'm not sure this change is related to phone numbe
Ilya Sherman
2014/09/11 05:32:14
Sorry, you're right that I got labels and values s
ziran.sun
2014/09/22 13:46:33
Done.
|
| } |
| } |
| } |