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

Side by Side Diff: components/autofill/core/browser/address_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. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | 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_ADDRESS_FIELD_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_ADDRESS_FIELD_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_ADDRESS_FIELD_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_ADDRESS_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 "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 #include "components/autofill/core/browser/autofill_type.h" 14 #include "components/autofill/core/browser/autofill_type.h"
15 #include "components/autofill/core/browser/form_field.h" 15 #include "components/autofill/core/browser/form_field.h"
16 16
17 namespace autofill { 17 namespace autofill {
18 18
19 class AutofillField; 19 class AutofillField;
20 class AutofillScanner; 20 class AutofillScanner;
21 21
22 class AddressField : public FormField { 22 class AddressField : public FormField {
23 public: 23 public:
24 static FormField* Parse(AutofillScanner* scanner); 24 static FormField* Parse(AutofillScanner* scanner);
25 25
26 protected: 26 protected:
27 // FormField: 27 // FormField:
28 virtual bool ClassifyField(FieldTypeMap* map) const OVERRIDE; 28 virtual bool ClassifyField(ServerFieldTypeMap* map) const OVERRIDE;
29 29
30 private: 30 private:
31 enum AddressType { 31 enum AddressType {
32 kGenericAddress = 0, 32 kGenericAddress = 0,
33 kBillingAddress, 33 kBillingAddress,
34 kShippingAddress 34 kShippingAddress
35 }; 35 };
36 36
37 FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseOneLineAddress); 37 FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseOneLineAddress);
38 FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseOneLineAddressBilling); 38 FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseOneLineAddressBilling);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 const AutofillField* country_; // optional 79 const AutofillField* country_; // optional
80 80
81 AddressType type_; 81 AddressType type_;
82 82
83 DISALLOW_COPY_AND_ASSIGN(AddressField); 83 DISALLOW_COPY_AND_ASSIGN(AddressField);
84 }; 84 };
85 85
86 } // namespace autofill 86 } // namespace autofill
87 87
88 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_ADDRESS_FIELD_H_ 88 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_ADDRESS_FIELD_H_
OLDNEW
« no previous file with comments | « components/autofill/core/browser/address.cc ('k') | components/autofill/core/browser/address_field.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698