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

Side by Side Diff: chrome/browser/autofill/credit_card_field.h

Issue 12260054: [Autofill] Enable heuristic detection of credit card issuer fields. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_AUTOFILL_CREDIT_CARD_FIELD_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_CREDIT_CARD_FIELD_H_
6 #define CHROME_BROWSER_AUTOFILL_CREDIT_CARD_FIELD_H_ 6 #define CHROME_BROWSER_AUTOFILL_CREDIT_CARD_FIELD_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "chrome/browser/autofill/autofill_type.h" 13 #include "chrome/browser/autofill/autofill_type.h"
14 #include "chrome/browser/autofill/form_field.h" 14 #include "chrome/browser/autofill/form_field.h"
15 15
16 class AutofillField; 16 class AutofillField;
17 class AutofillScanner; 17 class AutofillScanner;
18 18
19 class CreditCardField : public FormField { 19 class CreditCardField : public FormField {
20 public: 20 public:
21 static FormField* Parse(AutofillScanner* scanner, 21 static FormField* Parse(AutofillScanner* scanner);
22 bool parse_new_field_types);
23 22
24 protected: 23 protected:
25 // FormField: 24 // FormField:
26 virtual bool ClassifyField(FieldTypeMap* map) const OVERRIDE; 25 virtual bool ClassifyField(FieldTypeMap* map) const OVERRIDE;
27 26
28 private: 27 private:
29 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, ParseMiniumCreditCard); 28 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, ParseMiniumCreditCard);
30 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, ParseFullCreditCard); 29 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, ParseFullCreditCard);
31 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, ParseCreditCardType); 30 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, ParseCreditCardType);
32 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, ParseExpMonthYear); 31 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, ParseExpMonthYear);
(...skipping 30 matching lines...) Expand all
63 const AutofillField* expiration_date_; 62 const AutofillField* expiration_date_;
64 63
65 // True if the year is detected to be a 2-digit year; otherwise, we assume 64 // True if the year is detected to be a 2-digit year; otherwise, we assume
66 // a 4-digit year. 65 // a 4-digit year.
67 bool is_two_digit_year_; 66 bool is_two_digit_year_;
68 67
69 DISALLOW_COPY_AND_ASSIGN(CreditCardField); 68 DISALLOW_COPY_AND_ASSIGN(CreditCardField);
70 }; 69 };
71 70
72 #endif // CHROME_BROWSER_AUTOFILL_CREDIT_CARD_FIELD_H_ 71 #endif // CHROME_BROWSER_AUTOFILL_CREDIT_CARD_FIELD_H_
OLDNEW
« no previous file with comments | « chrome/browser/autofill/address_field_unittest.cc ('k') | chrome/browser/autofill/credit_card_field.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698