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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <functional> | 10 #include <functional> |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
| 14 #include "base/scoped_ptr.h" |
14 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
15 #include "unicode/coll.h" | 16 #include "unicode/coll.h" |
16 | 17 |
17 namespace l10n_util { | 18 namespace l10n_util { |
18 | 19 |
19 // Compares the two strings using the specified collator. | 20 // Compares the two strings using the specified collator. |
20 UCollationResult CompareString16WithCollator(const icu::Collator* collator, | 21 UCollationResult CompareString16WithCollator(const icu::Collator* collator, |
21 const string16& lhs, | 22 const string16& lhs, |
22 const string16& rhs); | 23 const string16& rhs); |
23 | 24 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 void SortVectorWithStringKey(const std::string& locale, | 146 void SortVectorWithStringKey(const std::string& locale, |
146 std::vector<Element>* elements, | 147 std::vector<Element>* elements, |
147 bool needs_stable_sort) { | 148 bool needs_stable_sort) { |
148 SortVectorWithStringKey<Element>(locale, elements, 0, elements->size(), | 149 SortVectorWithStringKey<Element>(locale, elements, 0, elements->size(), |
149 needs_stable_sort); | 150 needs_stable_sort); |
150 } | 151 } |
151 | 152 |
152 } // namespace l10n_util | 153 } // namespace l10n_util |
153 | 154 |
154 #endif // UI_BASE_L10N_L10N_UTIL_COLLATOR_H_ | 155 #endif // UI_BASE_L10N_L10N_UTIL_COLLATOR_H_ |
OLD | NEW |