summaryrefslogtreecommitdiffstats
path: root/components/autofill/browser/wallet
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-05 20:13:23 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-05 20:13:23 +0000
commit0b2f513b8e24956466fcb04fad1d912ff8cfe65b (patch)
treeaa76fe9bd680e19131a54aadd6c43732f62ec785 /components/autofill/browser/wallet
parent33959607f032668f0da22f9332e7f95c5f037121 (diff)
downloadchromium_src-0b2f513b8e24956466fcb04fad1d912ff8cfe65b.zip
chromium_src-0b2f513b8e24956466fcb04fad1d912ff8cfe65b.tar.gz
chromium_src-0b2f513b8e24956466fcb04fad1d912ff8cfe65b.tar.bz2
Remove application locale cache in autofill code (AutofillCountry::ApplicationLOcale).
This is in preparation for removing content::GetContentClient calls outside of content. BUG=227047 Review URL: https://codereview.chromium.org/13488009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192622 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/autofill/browser/wallet')
-rw-r--r--components/autofill/browser/wallet/wallet_address.cc6
-rw-r--r--components/autofill/browser/wallet/wallet_address.h3
-rw-r--r--components/autofill/browser/wallet/wallet_items.cc6
-rw-r--r--components/autofill/browser/wallet/wallet_items.h3
4 files changed, 11 insertions, 7 deletions
diff --git a/components/autofill/browser/wallet/wallet_address.cc b/components/autofill/browser/wallet/wallet_address.cc
index 9e5f5d4..209330d 100644
--- a/components/autofill/browser/wallet/wallet_address.cc
+++ b/components/autofill/browser/wallet/wallet_address.cc
@@ -233,7 +233,8 @@ string16 Address::DisplayNameDetail() const {
#endif
}
-string16 Address::GetInfo(AutofillFieldType type) const {
+string16 Address::GetInfo(AutofillFieldType type,
+ const std::string& app_locale) const {
switch (type) {
case NAME_FULL:
return recipient_name();
@@ -254,8 +255,7 @@ string16 Address::GetInfo(AutofillFieldType type) const {
return postal_code_number();
case ADDRESS_HOME_COUNTRY: {
- AutofillCountry country(country_name_code(),
- AutofillCountry::ApplicationLocale());
+ AutofillCountry country(country_name_code(), app_locale);
return country.name();
}
diff --git a/components/autofill/browser/wallet/wallet_address.h b/components/autofill/browser/wallet/wallet_address.h
index c6ac95e..b8ebf94 100644
--- a/components/autofill/browser/wallet/wallet_address.h
+++ b/components/autofill/browser/wallet/wallet_address.h
@@ -88,7 +88,8 @@ class Address {
string16 DisplayNameDetail() const;
// Returns data appropriate for |type|.
- string16 GetInfo(AutofillFieldType type) const;
+ string16 GetInfo(AutofillFieldType type,
+ const std::string& app_locale) const;
const std::string& country_name_code() const { return country_name_code_; }
const string16& recipient_name() const { return recipient_name_; }
diff --git a/components/autofill/browser/wallet/wallet_items.cc b/components/autofill/browser/wallet/wallet_items.cc
index 4084998..8d7e8c4 100644
--- a/components/autofill/browser/wallet/wallet_items.cc
+++ b/components/autofill/browser/wallet/wallet_items.cc
@@ -313,9 +313,11 @@ const gfx::Image& WalletItems::MaskedInstrument::CardIcon() const {
return ResourceBundle::GetSharedInstance().GetImageNamed(idr);
}
-string16 WalletItems::MaskedInstrument::GetInfo(AutofillFieldType type) const {
+string16 WalletItems::MaskedInstrument::GetInfo(
+ AutofillFieldType type,
+ const std::string& app_locale) const {
if (AutofillType(type).group() != AutofillType::CREDIT_CARD)
- return address().GetInfo(type);
+ return address().GetInfo(type, app_locale);
switch (type) {
case CREDIT_CARD_NAME:
diff --git a/components/autofill/browser/wallet/wallet_items.h b/components/autofill/browser/wallet/wallet_items.h
index ddd22b7..f072b79 100644
--- a/components/autofill/browser/wallet/wallet_items.h
+++ b/components/autofill/browser/wallet/wallet_items.h
@@ -86,7 +86,8 @@ class WalletItems {
string16 DisplayNameDetail() const;
// Gets info that corresponds with |type|.
- string16 GetInfo(AutofillFieldType type) const;
+ string16 GetInfo(AutofillFieldType type,
+ const std::string& app_locale) const;
// Returns the display type of the and last four digits (e.g. Visa - 4444).
string16 TypeAndLastFourDigits() const;