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

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: fix assignments Created 6 years, 11 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 | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 81cc60056010132eb358854e2cfcf9d57708a2f6..7c4db15825a5b791d868e86f72c9a42cf7f502f5 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_common.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_common.cc
@@ -42,8 +42,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
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698