Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: components/autofill/core/browser/autofill_profile.cc

Issue 440283002: Android: Get AutofillProfile summary labels from PersonalDataManagerAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: after early return Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698