Chromium Code Reviews| Index: components/autofill/core/browser/autofill_profile.cc |
| diff --git a/components/autofill/core/browser/autofill_profile.cc b/components/autofill/core/browser/autofill_profile.cc |
| index 250b7a17694ca6261956385fac8769028cc7c9b5..e3dc4e270d0d7001ab4ba7575dd6095171bfdfb1 100644 |
| --- a/components/autofill/core/browser/autofill_profile.cc |
| +++ b/components/autofill/core/browser/autofill_profile.cc |
| @@ -71,12 +71,16 @@ void GetFieldsForDistinguishingProfiles( |
| COMPANY_NAME, |
| }; |
| + std::vector<ServerFieldType> default_fields; |
| if (!suggested_fields) { |
| - DCHECK_EQ(excluded_field, UNKNOWN_TYPE); |
| - distinguishing_fields->assign( |
| + default_fields.assign( |
| kDefaultDistinguishingFields, |
| kDefaultDistinguishingFields + arraysize(kDefaultDistinguishingFields)); |
| - return; |
| + suggested_fields = &default_fields; |
| + if (excluded_field == UNKNOWN_TYPE) { |
|
Ilya Sherman
2014/08/06 01:28:17
Why might there be an excluded field without a lis
Evan Stade
2014/08/06 17:59:19
Because Android puts the full name on the first li
Evan Stade
2014/08/06 18:00:47
(I'm talking about the preferences UI on desktop a
|
| + distinguishing_fields->swap(default_fields); |
| + return; |
| + } |
| } |
| // Keep track of which fields we've seen so that we avoid duplicate entries. |