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

Unified Diff: chrome/browser/autofill/autofill_dialog_controller_mac.mm

Issue 2868076: [Mac] Don't offer profiles for billing addresses that have no address data.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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/autofill_dialog_controller_mac.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_dialog_controller_mac.mm
===================================================================
--- chrome/browser/autofill/autofill_dialog_controller_mac.mm (revision 53935)
+++ chrome/browser/autofill/autofill_dialog_controller_mac.mm (working copy)
@@ -591,6 +591,19 @@
std::vector<AutoFillProfile>::iterator i;
for (i = profiles_.begin(); i != profiles_.end(); ++i) {
+ FieldTypeSet fields;
+ i->GetAvailableFieldTypes(&fields);
+ if (fields.find(ADDRESS_HOME_LINE1) == fields.end() &&
+ fields.find(ADDRESS_HOME_LINE2) == fields.end() &&
+ fields.find(ADDRESS_HOME_APT_NUM) == fields.end() &&
+ fields.find(ADDRESS_HOME_CITY) == fields.end() &&
+ fields.find(ADDRESS_HOME_STATE) == fields.end() &&
+ fields.find(ADDRESS_HOME_ZIP) == fields.end() &&
+ fields.find(ADDRESS_HOME_COUNTRY) == fields.end()) {
+ // No address information in this profile; it's useless as a billing
+ // address.
+ continue;
+ }
[array addObject:SysUTF16ToNSString(i->Label())];
}
« no previous file with comments | « chrome/browser/autofill/autofill_dialog_controller_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698