OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_AUTOFILL_PROFILE_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_PROFILE_H_ |
6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_PROFILE_H_ | 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_PROFILE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 void set_label(const string16& label) { label_ = label; } | 104 void set_label(const string16& label) { label_ = label; } |
105 | 105 |
106 // Returns concatenation of full name and address line 1. This acts as the | 106 // Returns concatenation of full name and address line 1. This acts as the |
107 // basis of comparison for new values that are submitted through forms to | 107 // basis of comparison for new values that are submitted through forms to |
108 // aid with correct aggregation of new data. | 108 // aid with correct aggregation of new data. |
109 const string16 PrimaryValue() const; | 109 const string16 PrimaryValue() const; |
110 | 110 |
111 private: | 111 private: |
112 Address* GetHomeAddress(); | 112 Address* GetHomeAddress(); |
113 | 113 |
114 // Builds inferred label, includes first non-empty field at the beginning, | 114 // Builds inferred label from all non-empty fields in |included_fields|. |
115 // even if it matches for all. | |
116 // |included_fields| - array of the fields, that needs to be included in this | |
117 // label. | |
118 string16 ConstructInferredLabel( | 115 string16 ConstructInferredLabel( |
119 const std::vector<AutoFillFieldType>* included_fields) const; | 116 const std::vector<AutoFillFieldType>& included_fields) const; |
120 | 117 |
121 // The label presented to the user when selecting a profile. | 118 // The label presented to the user when selecting a profile. |
122 string16 label_; | 119 string16 label_; |
123 | 120 |
124 // The guid of this profile. | 121 // The guid of this profile. |
125 std::string guid_; | 122 std::string guid_; |
126 | 123 |
127 // Personal information for this profile. | 124 // Personal information for this profile. |
128 FormGroupMap personal_info_; | 125 FormGroupMap personal_info_; |
129 }; | 126 }; |
130 | 127 |
131 // So we can compare AutoFillProfiles with EXPECT_EQ(). | 128 // So we can compare AutoFillProfiles with EXPECT_EQ(). |
132 std::ostream& operator<<(std::ostream& os, const AutoFillProfile& profile); | 129 std::ostream& operator<<(std::ostream& os, const AutoFillProfile& profile); |
133 | 130 |
134 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_PROFILE_H_ | 131 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_PROFILE_H_ |
OLD | NEW |