summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/credit_card.h
diff options
context:
space:
mode:
authorthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-08 14:40:53 +0000
committerthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-08 14:40:53 +0000
commitce0a501326e20c17e76796f550179a49be67bc0f (patch)
treea620ad1268f1313da9fda613ef1c2822087d4c82 /chrome/browser/autofill/credit_card.h
parenta39aa53a7acabb03a86a5be5c663d6ae47215440 (diff)
downloadchromium_src-ce0a501326e20c17e76796f550179a49be67bc0f.zip
chromium_src-ce0a501326e20c17e76796f550179a49be67bc0f.tar.gz
chromium_src-ce0a501326e20c17e76796f550179a49be67bc0f.tar.bz2
Putting this back in since it didn't solve the failures.
Revert 49164 - Backing this out to see if it fixes the failures on the two windows bots (landed about when they started). Revert 49030 AutoFill: Don't save credit card numbers from Autocomplete to the WebDB. BUG=8026 TEST=AutocompleteHistoryManagerTest Review URL: http://codereview.chromium.org/2676003 TBR=jhawkins@chromium.org Review URL: http://codereview.chromium.org/2748002 TBR=thomasvl@chromium.org Review URL: http://codereview.chromium.org/2770001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49165 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/credit_card.h')
-rw-r--r--chrome/browser/autofill/credit_card.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/autofill/credit_card.h b/chrome/browser/autofill/credit_card.h
index 4c16ec7..50bfa3a 100644
--- a/chrome/browser/autofill/credit_card.h
+++ b/chrome/browser/autofill/credit_card.h
@@ -58,6 +58,10 @@ class CreditCard : public FormGroup {
bool operator!=(const CreditCard& creditcard) const;
void set_label(const string16& label) { label_ = label; }
+ // Returns true if |value| is a credit card number. Uses the Luhn formula to
+ // validate the number.
+ static bool IsCreditCardNumber(const string16& text);
+
private:
// The month and year are zero if not present.
int Expiration4DigitYear() const { return expiration_year_; }
@@ -107,9 +111,6 @@ class CreditCard : public FormGroup {
// case-insensitive.
bool IsNameOnCard(const string16& text) const;
- // Uses the Luhn formula to validate the credit card number in |text|.
- static bool IsCreditCardNumber(const string16& text);
-
// Returns true if |text| matches the expiration month of the card.
bool IsExpirationMonth(const string16& text) const;