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

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: add test 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
« no previous file with comments | « chrome/browser/autofill/android/personal_data_manager_android.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « chrome/browser/autofill/android/personal_data_manager_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698