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

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

Issue 13697002: Make autofill's Address store country using the country code so that app locale isn't needed for th… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix remaining tests Created 7 years, 8 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_controller_impl.cc
===================================================================
--- chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc (revision 192389)
+++ chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc (working copy)
@@ -153,8 +153,16 @@
FormGroup* form_group) {
for (DetailOutputMap::const_iterator iter = detail_outputs.begin();
iter != detail_outputs.end(); ++iter) {
- if (!iter->second.empty())
- form_group->SetRawInfo(iter->first->type, iter->second);
+ if (!iter->second.empty()) {
+ if (iter->first->type == ADDRESS_HOME_COUNTRY ||
+ iter->first->type == ADDRESS_BILLING_COUNTRY) {
+ form_group->SetInfo(iter->first->type,
+ iter->second,
+ g_browser_process->GetApplicationLocale());
+ } else {
+ form_group->SetRawInfo(iter->first->type, iter->second);
+ }
+ }
}
}
@@ -174,6 +182,11 @@
if (it->first->type == CREDIT_CARD_VERIFICATION_CODE) {
if (cvc)
cvc->assign(trimmed);
+ } else if (it->first->type == ADDRESS_HOME_COUNTRY ||
+ it->first->type == ADDRESS_BILLING_COUNTRY) {
+ profile->SetInfo(it->first->type,
+ trimmed,
+ g_browser_process->GetApplicationLocale());
} else {
// Copy the credit card name to |profile| in addition to |card| as
// wallet::Instrument requires a recipient name for its billing address.

Powered by Google App Engine
This is Rietveld 408576698