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

Unified Diff: components/autofill/browser/autocheckout_manager.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: components/autofill/browser/autocheckout_manager.cc
===================================================================
--- components/autofill/browser/autocheckout_manager.cc (revision 192389)
+++ components/autofill/browser/autocheckout_manager.cc (working copy)
@@ -20,6 +20,9 @@
#include "components/autofill/common/form_data.h"
#include "components/autofill/common/form_field_data.h"
#include "components/autofill/common/web_element_descriptor.h"
+// TODO(jam) remove once https://codereview.chromium.org/13488009/ lands, since
+// that brings localle to AutofillManager.
+#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/ssl_status.h"
@@ -287,6 +290,15 @@
if (AutofillType(type).group() == AutofillType::CREDIT_CARD) {
credit_card_->SetRawInfo(result->field(i)->type(),
result->field(i)->value);
+ } else if (result->field(i)->type() == ADDRESS_HOME_COUNTRY ||
+ result->field(i)->type() == ADDRESS_BILLING_COUNTRY) {
+ profile_->SetInfo(result->field(i)->type(),
+ result->field(i)->value,
+ // TODO(jam) remove once
+ // https://codereview.chromium.org/13488009/
+ // lands, since that brings localle to AutofillManager.
+ content::GetContentClient()->browser()->
+ GetApplicationLocale());
} else {
profile_->SetRawInfo(result->field(i)->type(), result->field(i)->value);
}
« no previous file with comments | « components/autofill/browser/android/personal_data_manager_android.cc ('k') | components/autofill/browser/autofill_profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698