OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 UI_BASE_L10N_L10N_UTIL_COLLATOR_H_ | 5 #ifndef UI_BASE_L10N_L10N_UTIL_COLLATOR_H_ |
6 #define UI_BASE_L10N_L10N_UTIL_COLLATOR_H_ | 6 #define UI_BASE_L10N_L10N_UTIL_COLLATOR_H_ |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <functional> | 9 #include <functional> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
| 15 #include "third_party/icu/public/i18n/unicode/coll.h" |
15 #include "ui/base/ui_export.h" | 16 #include "ui/base/ui_export.h" |
16 #include "unicode/coll.h" | |
17 | 17 |
18 namespace l10n_util { | 18 namespace l10n_util { |
19 | 19 |
20 // Compares the two strings using the specified collator. | 20 // Compares the two strings using the specified collator. |
21 UI_EXPORT UCollationResult CompareString16WithCollator( | 21 UI_EXPORT UCollationResult CompareString16WithCollator( |
22 const icu::Collator* collator, | 22 const icu::Collator* collator, |
23 const string16& lhs, | 23 const string16& lhs, |
24 const string16& rhs); | 24 const string16& rhs); |
25 | 25 |
26 // Used by SortStringsUsingMethod. Invokes a method on the objects passed to | 26 // Used by SortStringsUsingMethod. Invokes a method on the objects passed to |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 void SortVectorWithStringKey(const std::string& locale, | 147 void SortVectorWithStringKey(const std::string& locale, |
148 std::vector<Element>* elements, | 148 std::vector<Element>* elements, |
149 bool needs_stable_sort) { | 149 bool needs_stable_sort) { |
150 SortVectorWithStringKey<Element>(locale, elements, 0, elements->size(), | 150 SortVectorWithStringKey<Element>(locale, elements, 0, elements->size(), |
151 needs_stable_sort); | 151 needs_stable_sort); |
152 } | 152 } |
153 | 153 |
154 } // namespace l10n_util | 154 } // namespace l10n_util |
155 | 155 |
156 #endif // UI_BASE_L10N_L10N_UTIL_COLLATOR_H_ | 156 #endif // UI_BASE_L10N_L10N_UTIL_COLLATOR_H_ |
OLD | NEW |