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

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 comment 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..74b283154c5dafea2d323329c9e569de411cb0dc 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;
@@ -31,6 +32,11 @@ bool IsValidCreditCardSecurityCode(const base::string16& text);
bool IsValidCreditCardSecurityCode(const base::string16& code,
const base::string16& number);
+// Returns true if |code| looks like a valid credit card security code
+// for the given credit card type.
+bool IsValidCreditCardSecurityCode(const base::string16& code,
+ 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