| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 bool EqualsSansGuid(const AutofillProfile& profile) const; | 92 bool EqualsSansGuid(const AutofillProfile& profile) const; |
| 93 | 93 |
| 94 // Equality operators compare GUIDs, origins, language code, and the contents | 94 // Equality operators compare GUIDs, origins, language code, and the contents |
| 95 // in the comparison. | 95 // in the comparison. |
| 96 bool operator==(const AutofillProfile& profile) const; | 96 bool operator==(const AutofillProfile& profile) const; |
| 97 virtual bool operator!=(const AutofillProfile& profile) const; | 97 virtual bool operator!=(const AutofillProfile& profile) const; |
| 98 | 98 |
| 99 // Returns concatenation of full name and address line 1. This acts as the | 99 // Returns concatenation of full name and address line 1. This acts as the |
| 100 // basis of comparison for new values that are submitted through forms to | 100 // basis of comparison for new values that are submitted through forms to |
| 101 // aid with correct aggregation of new data. | 101 // aid with correct aggregation of new data. |
| 102 const base::string16 PrimaryValue() const; | 102 const base::string16& PrimaryValue() const; |
| 103 | 103 |
| 104 // Returns true if the data in this AutofillProfile is a subset of the data in | 104 // Returns true if the data in this AutofillProfile is a subset of the data in |
| 105 // |profile|. | 105 // |profile|. |
| 106 bool IsSubsetOf(const AutofillProfile& profile, | 106 bool IsSubsetOf(const AutofillProfile& profile, |
| 107 const std::string& app_locale) const; | 107 const std::string& app_locale) const; |
| 108 | 108 |
| 109 // Overwrites the single-valued field data in |profile| with this | 109 // Overwrites the single-valued field data in |profile| with this |
| 110 // Profile. Or, for multi-valued fields append the new values. | 110 // Profile. Or, for multi-valued fields append the new values. |
| 111 void OverwriteWithOrAddTo(const AutofillProfile& profile, | 111 void OverwriteWithOrAddTo(const AutofillProfile& profile, |
| 112 const std::string& app_locale); | 112 const std::string& app_locale); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 // The BCP 47 language code that can be used to format |address_| for display. | 207 // The BCP 47 language code that can be used to format |address_| for display. |
| 208 std::string language_code_; | 208 std::string language_code_; |
| 209 }; | 209 }; |
| 210 | 210 |
| 211 // So we can compare AutofillProfiles with EXPECT_EQ(). | 211 // So we can compare AutofillProfiles with EXPECT_EQ(). |
| 212 std::ostream& operator<<(std::ostream& os, const AutofillProfile& profile); | 212 std::ostream& operator<<(std::ostream& os, const AutofillProfile& profile); |
| 213 | 213 |
| 214 } // namespace autofill | 214 } // namespace autofill |
| 215 | 215 |
| 216 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_ | 216 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_ |
| OLD | NEW |