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

Side by Side Diff: components/autofill/core/browser/contact_info.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_CONTACT_INFO_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_CONTACT_INFO_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_CONTACT_INFO_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_CONTACT_INFO_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "components/autofill/core/browser/field_types.h"
14 #include "components/autofill/core/browser/form_group.h" 13 #include "components/autofill/core/browser/form_group.h"
15 14
16 namespace autofill { 15 namespace autofill {
17 16
18 // A form group that stores name information. 17 // A form group that stores name information.
19 class NameInfo : public FormGroup { 18 class NameInfo : public FormGroup {
20 public: 19 public:
21 NameInfo(); 20 NameInfo();
22 NameInfo(const NameInfo& info); 21 NameInfo(const NameInfo& info);
23 virtual ~NameInfo(); 22 virtual ~NameInfo();
24 23
25 NameInfo& operator=(const NameInfo& info); 24 NameInfo& operator=(const NameInfo& info);
26 25
27 // FormGroup: 26 // FormGroup:
28 virtual base::string16 GetRawInfo(AutofillFieldType type) const OVERRIDE; 27 virtual base::string16 GetRawInfo(ServerFieldType type) const OVERRIDE;
29 virtual void SetRawInfo(AutofillFieldType type, 28 virtual void SetRawInfo(ServerFieldType type,
30 const base::string16& value) OVERRIDE; 29 const base::string16& value) OVERRIDE;
31 30
32 private: 31 private:
33 // FormGroup: 32 // FormGroup:
34 virtual void GetSupportedTypes(FieldTypeSet* supported_types) const OVERRIDE; 33 virtual void GetSupportedTypes(
34 ServerFieldTypeSet* supported_types) const OVERRIDE;
35 35
36 // Returns the full name, which can include up to the first, middle, and last 36 // Returns the full name, which can include up to the first, middle, and last
37 // name. 37 // name.
38 base::string16 FullName() const; 38 base::string16 FullName() const;
39 39
40 // Returns the middle initial if |middle_| is non-empty. Returns an empty 40 // Returns the middle initial if |middle_| is non-empty. Returns an empty
41 // string otherwise. 41 // string otherwise.
42 base::string16 MiddleInitial() const; 42 base::string16 MiddleInitial() const;
43 43
44 const base::string16& first() const { return first_; } 44 const base::string16& first() const { return first_; }
(...skipping 11 matching lines...) Expand all
56 56
57 class EmailInfo : public FormGroup { 57 class EmailInfo : public FormGroup {
58 public: 58 public:
59 EmailInfo(); 59 EmailInfo();
60 EmailInfo(const EmailInfo& info); 60 EmailInfo(const EmailInfo& info);
61 virtual ~EmailInfo(); 61 virtual ~EmailInfo();
62 62
63 EmailInfo& operator=(const EmailInfo& info); 63 EmailInfo& operator=(const EmailInfo& info);
64 64
65 // FormGroup: 65 // FormGroup:
66 virtual base::string16 GetRawInfo(AutofillFieldType type) const OVERRIDE; 66 virtual base::string16 GetRawInfo(ServerFieldType type) const OVERRIDE;
67 virtual void SetRawInfo(AutofillFieldType type, 67 virtual void SetRawInfo(ServerFieldType type,
68 const base::string16& value) OVERRIDE; 68 const base::string16& value) OVERRIDE;
69 69
70 private: 70 private:
71 // FormGroup: 71 // FormGroup:
72 virtual void GetSupportedTypes(FieldTypeSet* supported_types) const OVERRIDE; 72 virtual void GetSupportedTypes(
73 ServerFieldTypeSet* supported_types) const OVERRIDE;
73 74
74 base::string16 email_; 75 base::string16 email_;
75 }; 76 };
76 77
77 class CompanyInfo : public FormGroup { 78 class CompanyInfo : public FormGroup {
78 public: 79 public:
79 CompanyInfo(); 80 CompanyInfo();
80 CompanyInfo(const CompanyInfo& info); 81 CompanyInfo(const CompanyInfo& info);
81 virtual ~CompanyInfo(); 82 virtual ~CompanyInfo();
82 83
83 CompanyInfo& operator=(const CompanyInfo& info); 84 CompanyInfo& operator=(const CompanyInfo& info);
84 85
85 // FormGroup: 86 // FormGroup:
86 virtual base::string16 GetRawInfo(AutofillFieldType type) const OVERRIDE; 87 virtual base::string16 GetRawInfo(ServerFieldType type) const OVERRIDE;
87 virtual void SetRawInfo(AutofillFieldType type, 88 virtual void SetRawInfo(ServerFieldType type,
88 const base::string16& value) OVERRIDE; 89 const base::string16& value) OVERRIDE;
89 90
90 private: 91 private:
91 // FormGroup: 92 // FormGroup:
92 virtual void GetSupportedTypes(FieldTypeSet* supported_types) const OVERRIDE; 93 virtual void GetSupportedTypes(
94 ServerFieldTypeSet* supported_types) const OVERRIDE;
93 95
94 base::string16 company_name_; 96 base::string16 company_name_;
95 }; 97 };
96 98
97 } // namespace autofill 99 } // namespace autofill
98 100
99 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CONTACT_INFO_H_ 101 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CONTACT_INFO_H_
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_xml_parser.cc ('k') | components/autofill/core/browser/contact_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698