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

Unified Diff: components/autofill/core/browser/autofill_manager.cc

Issue 873403004: Autofill - show expiration date in CVC prompt when card is expired. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/core/browser/autofill_manager.cc
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
index c25c99c6e01fcc127a1184eb13446f2869517845..9d4a9c8c363d78cd28c2b7ced05f28570b215855 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -681,10 +681,12 @@ void AutofillManager::OnLoadedServerPredictions(
driver_->SendAutofillTypePredictionsToRenderer(form_structures_.get());
}
-void AutofillManager::OnUnmaskResponse(const base::string16& cvc) {
+void AutofillManager::OnUnmaskResponse(const base::string16& cvc,
+ const base::string16& exp_month,
+ const base::string16& exp_year) {
// Most of this function is demo code. The real code should look something
// like:
- // real_pan_client_.UnmaskCard(unmasking_card_, cvc);
+ // real_pan_client_.UnmaskCard(unmasking_card_, cvc, exp_month, exp_year);
unmasking_cvc_ = cvc;
// TODO(estade): fake verification: assume 123/1234 is the correct cvc.
@@ -722,6 +724,8 @@ void AutofillManager::OnUnmaskVerificationResult(bool success) {
unmasking_card_.set_record_type(CreditCard::FULL_SERVER_CARD);
if (unmasking_card_.type() == kAmericanExpressCard) {
unmasking_card_.SetNumber(base::ASCIIToUTF16("371449635398431"));
+ } else if (unmasking_card_.type() == kVisaCard) {
+ unmasking_card_.SetNumber(base::ASCIIToUTF16("4012888888881881"));
} else {
DCHECK_EQ(kDiscoverCard, unmasking_card_.type());
unmasking_card_.SetNumber(base::ASCIIToUTF16("6011000990139424"));

Powered by Google App Engine
This is Rietveld 408576698