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..1f9927f53c210f0e75b20cb6f612522a3f945469 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; |
+ if (excluded_field == UNKNOWN_TYPE) { |
+ distinguishing_fields->swap(default_fields); |
+ return; |
+ } |
+ suggested_fields = &default_fields; |
} |
// Keep track of which fields we've seen so that we avoid duplicate entries. |