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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 bool HaveMergeableAddresses(const AutofillProfile& p1, | 208 bool HaveMergeableAddresses(const AutofillProfile& p1, |
209 const AutofillProfile& p2) const; | 209 const AutofillProfile& p2) const; |
210 | 210 |
211 // Populates |name_info| with the result of merging the Chinese, Japanese or | 211 // Populates |name_info| with the result of merging the Chinese, Japanese or |
212 // Korean names in |p1| and |p2|. Returns true if successful. Expects that | 212 // Korean names in |p1| and |p2|. Returns true if successful. Expects that |
213 // |p1| and |p2| have already been found to be mergeable, and have CJK names. | 213 // |p1| and |p2| have already been found to be mergeable, and have CJK names. |
214 bool MergeCJKNames(const AutofillProfile& p1, | 214 bool MergeCJKNames(const AutofillProfile& p1, |
215 const AutofillProfile& p2, | 215 const AutofillProfile& p2, |
216 NameInfo* info) const; | 216 NameInfo* info) const; |
217 | 217 |
| 218 const std::string app_locale() const { return app_locale_; } |
| 219 |
218 private: | 220 private: |
219 l10n::CaseInsensitiveCompare case_insensitive_compare_; | 221 l10n::CaseInsensitiveCompare case_insensitive_compare_; |
220 std::unique_ptr<icu::Transliterator> transliterator_; | 222 std::unique_ptr<icu::Transliterator> transliterator_; |
221 const std::string app_locale_; | 223 const std::string app_locale_; |
222 | 224 |
223 DISALLOW_COPY_AND_ASSIGN(AutofillProfileComparator); | 225 DISALLOW_COPY_AND_ASSIGN(AutofillProfileComparator); |
224 }; | 226 }; |
225 | 227 |
226 } // namespace autofill | 228 } // namespace autofill |
227 | 229 |
228 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_COMPARATOR_H_ | 230 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_COMPARATOR_H_ |
OLD | NEW |