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; |
Ilya Sherman
2014/08/06 19:15:35
nit: Please move this to be after the early return
Evan Stade
2014/08/06 21:04:27
Done.
|
+ if (excluded_field == UNKNOWN_TYPE) { |
+ distinguishing_fields->swap(default_fields); |
+ return; |
+ } |
} |
// Keep track of which fields we've seen so that we avoid duplicate entries. |