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_AUTOFILL_PROFILE_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <iosfwd> | 10 #include <iosfwd> |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
61 | 61 |
62 // Multi-value equivalents to |GetInfo| and |SetInfo|. | 62 // Multi-value equivalents to |GetInfo| and |SetInfo|. |
63 void SetRawMultiInfo(ServerFieldType type, | 63 void SetRawMultiInfo(ServerFieldType type, |
64 const std::vector<base::string16>& values); | 64 const std::vector<base::string16>& values); |
65 void GetRawMultiInfo(ServerFieldType type, | 65 void GetRawMultiInfo(ServerFieldType type, |
66 std::vector<base::string16>* values) const; | 66 std::vector<base::string16>* values) const; |
67 void GetMultiInfo(const AutofillType& type, | 67 void GetMultiInfo(const AutofillType& type, |
68 const std::string& app_locale, | 68 const std::string& app_locale, |
69 std::vector<base::string16>* values) const; | 69 std::vector<base::string16>* values) const; |
70 | 70 |
71 void SetPreferredNameInfo(const std::vector<NameInfo>& profiles); | |
Ilya Sherman
2014/05/29 07:38:03
nit: This should have private visibility.
Pritam Nikam
2014/05/30 11:12:40
To provide unit-test this need to have public visi
| |
72 | |
71 // Returns true if there are no values (field types) set. | 73 // Returns true if there are no values (field types) set. |
72 bool IsEmpty(const std::string& app_locale) const; | 74 bool IsEmpty(const std::string& app_locale) const; |
73 | 75 |
74 // Returns true if the |type| of data in this profile is present, but invalid. | 76 // Returns true if the |type| of data in this profile is present, but invalid. |
75 // Otherwise returns false. | 77 // Otherwise returns false. |
76 bool IsPresentButInvalid(ServerFieldType type) const; | 78 bool IsPresentButInvalid(ServerFieldType type) const; |
77 | 79 |
78 // Comparison for Sync. Returns 0 if the profile is the same as |this|, | 80 // Comparison for Sync. Returns 0 if the profile is the same as |this|, |
79 // or < 0, or > 0 if it is different. The implied ordering can be used for | 81 // or < 0, or > 0 if it is different. The implied ordering can be used for |
80 // culling duplicates. The ordering is based on collation order of the | 82 // culling duplicates. The ordering is based on collation order of the |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
201 // The BCP 47 language code that can be used to format |address_| for display. | 203 // The BCP 47 language code that can be used to format |address_| for display. |
202 std::string language_code_; | 204 std::string language_code_; |
203 }; | 205 }; |
204 | 206 |
205 // So we can compare AutofillProfiles with EXPECT_EQ(). | 207 // So we can compare AutofillProfiles with EXPECT_EQ(). |
206 std::ostream& operator<<(std::ostream& os, const AutofillProfile& profile); | 208 std::ostream& operator<<(std::ostream& os, const AutofillProfile& profile); |
207 | 209 |
208 } // namespace autofill | 210 } // namespace autofill |
209 | 211 |
210 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_ | 212 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_ |
OLD | NEW |