OLD | NEW |
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_CONTACT_INFO_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_CONTACT_INFO_H_ |
6 #define CHROME_BROWSER_AUTOFILL_CONTACT_INFO_H_ | 6 #define CHROME_BROWSER_AUTOFILL_CONTACT_INFO_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
12 #include "chrome/browser/autofill/field_types.h" | 12 #include "chrome/browser/autofill/field_types.h" |
13 #include "chrome/browser/autofill/form_group.h" | 13 #include "chrome/browser/autofill/form_group.h" |
14 | 14 |
15 // A form group that stores name information. | 15 // A form group that stores name information. |
16 class NameInfo : public FormGroup { | 16 class NameInfo : public FormGroup { |
17 public: | 17 public: |
18 NameInfo(); | 18 NameInfo(); |
19 NameInfo(const NameInfo& info); | 19 NameInfo(const NameInfo& info); |
20 virtual ~NameInfo(); | 20 virtual ~NameInfo(); |
21 | 21 |
22 NameInfo& operator=(const NameInfo& info); | 22 NameInfo& operator=(const NameInfo& info); |
23 | 23 |
24 // FormGroup: | 24 // FormGroup: |
25 virtual string16 GetInfo(AutofillFieldType type) const OVERRIDE; | 25 virtual string16 GetRawInfo(AutofillFieldType type) const OVERRIDE; |
26 virtual void SetInfo(AutofillFieldType type, const string16& value) OVERRIDE; | 26 virtual void SetRawInfo(AutofillFieldType type, |
| 27 const string16& value) OVERRIDE; |
27 | 28 |
28 private: | 29 private: |
29 // FormGroup: | 30 // FormGroup: |
30 virtual void GetSupportedTypes(FieldTypeSet* supported_types) const OVERRIDE; | 31 virtual void GetSupportedTypes(FieldTypeSet* supported_types) const OVERRIDE; |
31 | 32 |
32 // Returns the full name, which can include up to the first, middle, and last | 33 // Returns the full name, which can include up to the first, middle, and last |
33 // name. | 34 // name. |
34 string16 FullName() const; | 35 string16 FullName() const; |
35 | 36 |
36 // Returns the middle initial if |middle_| is non-empty. Returns an empty | 37 // Returns the middle initial if |middle_| is non-empty. Returns an empty |
(...skipping 15 matching lines...) Expand all Loading... |
52 | 53 |
53 class EmailInfo : public FormGroup { | 54 class EmailInfo : public FormGroup { |
54 public: | 55 public: |
55 EmailInfo(); | 56 EmailInfo(); |
56 EmailInfo(const EmailInfo& info); | 57 EmailInfo(const EmailInfo& info); |
57 virtual ~EmailInfo(); | 58 virtual ~EmailInfo(); |
58 | 59 |
59 EmailInfo& operator=(const EmailInfo& info); | 60 EmailInfo& operator=(const EmailInfo& info); |
60 | 61 |
61 // FormGroup: | 62 // FormGroup: |
62 virtual string16 GetInfo(AutofillFieldType type) const OVERRIDE; | 63 virtual string16 GetRawInfo(AutofillFieldType type) const OVERRIDE; |
63 virtual void SetInfo(AutofillFieldType type, const string16& value) OVERRIDE; | 64 virtual void SetRawInfo(AutofillFieldType type, |
| 65 const string16& value) OVERRIDE; |
64 | 66 |
65 private: | 67 private: |
66 // FormGroup: | 68 // FormGroup: |
67 virtual void GetSupportedTypes(FieldTypeSet* supported_types) const OVERRIDE; | 69 virtual void GetSupportedTypes(FieldTypeSet* supported_types) const OVERRIDE; |
68 | 70 |
69 string16 email_; | 71 string16 email_; |
70 }; | 72 }; |
71 | 73 |
72 class CompanyInfo : public FormGroup { | 74 class CompanyInfo : public FormGroup { |
73 public: | 75 public: |
74 CompanyInfo(); | 76 CompanyInfo(); |
75 CompanyInfo(const CompanyInfo& info); | 77 CompanyInfo(const CompanyInfo& info); |
76 virtual ~CompanyInfo(); | 78 virtual ~CompanyInfo(); |
77 | 79 |
78 CompanyInfo& operator=(const CompanyInfo& info); | 80 CompanyInfo& operator=(const CompanyInfo& info); |
79 | 81 |
80 // FormGroup: | 82 // FormGroup: |
81 virtual string16 GetInfo(AutofillFieldType type) const OVERRIDE; | 83 virtual string16 GetRawInfo(AutofillFieldType type) const OVERRIDE; |
82 virtual void SetInfo(AutofillFieldType type, const string16& value) OVERRIDE; | 84 virtual void SetRawInfo(AutofillFieldType type, |
| 85 const string16& value) OVERRIDE; |
83 | 86 |
84 private: | 87 private: |
85 // FormGroup: | 88 // FormGroup: |
86 virtual void GetSupportedTypes(FieldTypeSet* supported_types) const OVERRIDE; | 89 virtual void GetSupportedTypes(FieldTypeSet* supported_types) const OVERRIDE; |
87 | 90 |
88 string16 company_name_; | 91 string16 company_name_; |
89 }; | 92 }; |
90 | 93 |
91 #endif // CHROME_BROWSER_AUTOFILL_CONTACT_INFO_H_ | 94 #endif // CHROME_BROWSER_AUTOFILL_CONTACT_INFO_H_ |
OLD | NEW |