| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_COMPARATOR_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_COMPARATOR_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_COMPARATOR_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_COMPARATOR_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 // Returns true if |p1| and |p2| have addresses which are equivalent for the | 193 // Returns true if |p1| and |p2| have addresses which are equivalent for the |
| 194 // purposes of merging the two profiles. This means one of the addresses is | 194 // purposes of merging the two profiles. This means one of the addresses is |
| 195 // empty, or the addresses are a match. A number of normalization and | 195 // empty, or the addresses are a match. A number of normalization and |
| 196 // comparison heuristics are employed to determine if the addresses match. | 196 // comparison heuristics are employed to determine if the addresses match. |
| 197 // | 197 // |
| 198 // Note that this method does not provide any guidance on actually merging | 198 // Note that this method does not provide any guidance on actually merging |
| 199 // the email addresses. | 199 // the email addresses. |
| 200 bool HaveMergeableAddresses(const AutofillProfile& p1, | 200 bool HaveMergeableAddresses(const AutofillProfile& p1, |
| 201 const AutofillProfile& p2) const; | 201 const AutofillProfile& p2) const; |
| 202 | 202 |
| 203 // Returns true if |state1| and |state2| both represent the same state in | |
| 204 // |country_code|. | |
| 205 bool IsMatchingState(const base::string16& country_code, | |
| 206 const base::string16& state1, | |
| 207 const base::string16& state2) const; | |
| 208 | |
| 209 private: | 203 private: |
| 210 l10n::CaseInsensitiveCompare case_insensitive_compare_; | 204 l10n::CaseInsensitiveCompare case_insensitive_compare_; |
| 211 std::unique_ptr<icu::Transliterator> transliterator_; | 205 std::unique_ptr<icu::Transliterator> transliterator_; |
| 212 const std::string app_locale_; | 206 const std::string app_locale_; |
| 213 | 207 |
| 214 DISALLOW_COPY_AND_ASSIGN(AutofillProfileComparator); | 208 DISALLOW_COPY_AND_ASSIGN(AutofillProfileComparator); |
| 215 }; | 209 }; |
| 216 | 210 |
| 217 } // namespace autofill | 211 } // namespace autofill |
| 218 | 212 |
| 219 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_COMPARATOR_H_ | 213 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_COMPARATOR_H_ |
| OLD | NEW |