Make autofill's Address store country using the country code so that app locale isn't needed for the raw methods.
This is in preparation for removing content::GetContentClient calls outside of content.
BUG=227047
Review URL: https://codereview.chromium.org/13697002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192588 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/components/autofill/browser/phone_number.cc b/components/autofill/browser/phone_number.cc
index 0a785e5..703e63e 100644
--- a/components/autofill/browser/phone_number.cc
+++ b/components/autofill/browser/phone_number.cc
@@ -34,9 +34,9 @@
// code corresponding to the |app_locale|.
std::string GetRegion(const AutofillProfile& profile,
const std::string& app_locale) {
- std::string country_code = profile.CountryCode();
+ string16 country_code = profile.GetRawInfo(ADDRESS_HOME_COUNTRY);
if (!country_code.empty())
- return country_code;
+ return UTF16ToASCII(country_code);
return AutofillCountry::CountryCodeForLocale(app_locale);
}