Chromium Code Reviews

Side by Side Diff: components/autofill/core/browser/credit_card_field.h

Issue 22009003: [Autofill] Distinguish between native field types and potentially HTML field types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_FIELD_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_FIELD_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_FIELD_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_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 "components/autofill/core/browser/autofill_type.h" 13 #include "components/autofill/core/browser/autofill_type.h"
14 #include "components/autofill/core/browser/form_field.h" 14 #include "components/autofill/core/browser/form_field.h"
15 15
16 namespace autofill { 16 namespace autofill {
17 17
18 class AutofillField; 18 class AutofillField;
19 class AutofillScanner; 19 class AutofillScanner;
20 20
21 class CreditCardField : public FormField { 21 class CreditCardField : public FormField {
22 public: 22 public:
23 static FormField* Parse(AutofillScanner* scanner); 23 static FormField* Parse(AutofillScanner* scanner);
24 24
25 protected: 25 protected:
26 // FormField: 26 // FormField:
27 virtual bool ClassifyField(FieldTypeMap* map) const OVERRIDE; 27 virtual bool ClassifyField(ServerFieldTypeMap* map) const OVERRIDE;
28 28
29 private: 29 private:
30 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, ParseMiniumCreditCard); 30 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, ParseMiniumCreditCard);
31 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, ParseFullCreditCard); 31 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, ParseFullCreditCard);
32 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, ParseCreditCardType); 32 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, ParseCreditCardType);
33 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, ParseExpMonthYear); 33 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, ParseExpMonthYear);
34 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, ParseExpMonthYear2); 34 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, ParseExpMonthYear2);
35 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, ParseExpField); 35 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, ParseExpField);
36 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, ParseExpField2DigitYear); 36 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, ParseExpField2DigitYear);
37 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest, 37 FRIEND_TEST_ALL_PREFIXES(CreditCardFieldTest,
(...skipping 28 matching lines...)
66 // True if the year is detected to be a 2-digit year; otherwise, we assume 66 // True if the year is detected to be a 2-digit year; otherwise, we assume
67 // a 4-digit year. 67 // a 4-digit year.
68 bool is_two_digit_year_; 68 bool is_two_digit_year_;
69 69
70 DISALLOW_COPY_AND_ASSIGN(CreditCardField); 70 DISALLOW_COPY_AND_ASSIGN(CreditCardField);
71 }; 71 };
72 72
73 } // namespace autofill 73 } // namespace autofill
74 74
75 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_FIELD_H_ 75 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_FIELD_H_
OLDNEW
« no previous file with comments | « components/autofill/core/browser/credit_card.cc ('k') | components/autofill/core/browser/credit_card_field.cc » ('j') | no next file with comments »

Powered by Google App Engine