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

Unified Diff: components/autofill/content/browser/wallet/wallet_items.cc

Issue 23756007: [rac] Show amex specific cvc hint (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Enable returning card type from wallet instrument Created 7 years, 3 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 | « chrome/browser/ui/views/autofill/autofill_dialog_views.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/content/browser/wallet/wallet_items.cc
diff --git a/components/autofill/content/browser/wallet/wallet_items.cc b/components/autofill/content/browser/wallet/wallet_items.cc
index 03cf3f442c2453c8df0caf05a9dd817561572ea8..cd8b8deb949d2b5411f3dd858372c3b01f494198 100644
--- a/components/autofill/content/browser/wallet/wallet_items.cc
+++ b/components/autofill/content/browser/wallet/wallet_items.cc
@@ -80,6 +80,21 @@ WalletItems::MaskedInstrument::Status
return WalletItems::MaskedInstrument::INAPPLICABLE;
}
+std::string StringFromType(WalletItems::MaskedInstrument::Type type) {
Evan Stade 2013/09/18 01:34:39 can you call this something slightly different? It
please use gerrit instead 2013/09/18 15:22:44 Done. Renamed to StringIdentifierFromType. The com
+ switch (type) {
+ case WalletItems::MaskedInstrument::VISA:
+ return kVisaCard;
+ case WalletItems::MaskedInstrument::MASTER_CARD:
+ return kMasterCard;
+ case WalletItems::MaskedInstrument::AMEX:
+ return kAmericanExpressCard;
+ case WalletItems::MaskedInstrument::DISCOVER:
+ return kDiscoverCard;
+ default:
+ return kGenericCard;
+ }
+}
+
} // anonymous namespace
WalletItems::MaskedInstrument::MaskedInstrument(
@@ -327,6 +342,9 @@ base::string16 WalletItems::MaskedInstrument::GetInfo(
case CREDIT_CARD_VERIFICATION_CODE:
break;
+ case CREDIT_CARD_TYPE:
+ return UTF8ToUTF16(StringFromType(type_));
+
default:
NOTREACHED();
}
« no previous file with comments | « chrome/browser/ui/views/autofill/autofill_dialog_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698