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

Unified Diff: components/autofill/core/browser/validation.h

Issue 2611863002: Refactors cvc and expiration date validation in CC upload logic as well as unmask prompt. (Closed)
Patch Set: Addressed comments Created 3 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/validation.h
diff --git a/components/autofill/core/browser/validation.h b/components/autofill/core/browser/validation.h
index aaaedcd23b82c8442bec515954d3cf06b43f6797..a09ae75cbb3af7470832ce8306dcfdf34f1d8639 100644
--- a/components/autofill/core/browser/validation.h
+++ b/components/autofill/core/browser/validation.h
@@ -6,6 +6,7 @@
#define COMPONENTS_AUTOFILL_CORE_BROWSER_VALIDATION_H_
#include "base/strings/string16.h"
+#include "base/strings/string_piece.h"
namespace base {
class Time;
@@ -23,13 +24,10 @@ bool IsValidCreditCardExpirationDate(int year,
// Uses the Luhn formula to validate the number.
bool IsValidCreditCardNumber(const base::string16& text);
-// Returns true if |text| looks like a valid credit card security code.
-bool IsValidCreditCardSecurityCode(const base::string16& text);
-
// Returns true if |code| looks like a valid credit card security code
-// for the type of credit card designated by |number|.
+// for the given credit card type.
bool IsValidCreditCardSecurityCode(const base::string16& code,
- const base::string16& number);
+ const base::StringPiece card_type);
// Returns true if |text| looks like a valid e-mail address.
bool IsValidEmailAddress(const base::string16& text);

Powered by Google App Engine
This is Rietveld 408576698