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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_common.cc

Issue 111853012: rAc: support street-address. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 12 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: chrome/browser/ui/autofill/autofill_dialog_common.cc
diff --git a/chrome/browser/ui/autofill/autofill_dialog_common.cc b/chrome/browser/ui/autofill/autofill_dialog_common.cc
index 6271abef07cf2137f544e52d52b118787ed71cbe..4af8d8b0756d26af0928ca0bc08c6ea33ec390df 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_common.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_common.cc
@@ -37,8 +37,14 @@ bool InputTypeMatchesFieldType(const DetailInput& input,
// Check the groups to distinguish billing types from shipping ones.
AutofillType input_type = AutofillType(input.type);
- return input_type.GetStorableType() == server_type &&
- input_type.group() == field_type.group();
+ if (input_type.group() != field_type.group())
+ return false;
+
+ // Street address (all lines) is matched to the first input address line.
+ if (server_type == ADDRESS_HOME_STREET_ADDRESS)
+ return input_type.GetStorableType() == ADDRESS_HOME_LINE1;
+
+ return input_type.GetStorableType() == server_type;
}
// Returns true if |input| in the given |section| should be used for a

Powered by Google App Engine
This is Rietveld 408576698