OLD | NEW |
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/form_group.h" | 13 #include "components/autofill/core/browser/form_group.h" |
14 | 14 |
15 namespace autofill { | 15 namespace autofill { |
16 | 16 |
17 // A form group that stores name information. | 17 // A form group that stores name information. |
18 class NameInfo : public FormGroup { | 18 class NameInfo : public FormGroup { |
19 public: | 19 public: |
20 NameInfo(); | 20 NameInfo(); |
21 NameInfo(const NameInfo& info); | 21 NameInfo(const NameInfo& info); |
22 virtual ~NameInfo(); | 22 virtual ~NameInfo(); |
23 | 23 |
24 NameInfo& operator=(const NameInfo& info); | 24 NameInfo& operator=(const NameInfo& info); |
25 | 25 |
| 26 // Compares |NameInfo| objects for |first_|, |middle_| and |last_| names, |
| 27 // ignoring their case differences. |
| 28 bool EqualsIgnoreCase(const NameInfo& info); |
| 29 |
26 // FormGroup: | 30 // FormGroup: |
27 virtual base::string16 GetRawInfo(ServerFieldType type) const OVERRIDE; | 31 virtual base::string16 GetRawInfo(ServerFieldType type) const OVERRIDE; |
28 virtual void SetRawInfo(ServerFieldType type, | 32 virtual void SetRawInfo(ServerFieldType type, |
29 const base::string16& value) OVERRIDE; | 33 const base::string16& value) OVERRIDE; |
30 | 34 |
31 private: | 35 private: |
32 // FormGroup: | 36 // FormGroup: |
33 virtual void GetSupportedTypes( | 37 virtual void GetSupportedTypes( |
34 ServerFieldTypeSet* supported_types) const OVERRIDE; | 38 ServerFieldTypeSet* supported_types) const OVERRIDE; |
35 | 39 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 // FormGroup: | 96 // FormGroup: |
93 virtual void GetSupportedTypes( | 97 virtual void GetSupportedTypes( |
94 ServerFieldTypeSet* supported_types) const OVERRIDE; | 98 ServerFieldTypeSet* supported_types) const OVERRIDE; |
95 | 99 |
96 base::string16 company_name_; | 100 base::string16 company_name_; |
97 }; | 101 }; |
98 | 102 |
99 } // namespace autofill | 103 } // namespace autofill |
100 | 104 |
101 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CONTACT_INFO_H_ | 105 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CONTACT_INFO_H_ |
OLD | NEW |