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

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: Rename StringFromType to StringIconIdentifierFromType 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..0517ecbcdb16132aee6e108bd6b392d946073239 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 StringIdentifierFromType(WalletItems::MaskedInstrument::Type type) {
+ 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(StringIdentifierFromType(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