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 BASE_I18N_ICU_UTIL_H_ | 5 #ifndef BASE_I18N_ICU_UTIL_H_ |
6 #define BASE_I18N_ICU_UTIL_H_ | 6 #define BASE_I18N_ICU_UTIL_H_ |
7 | 7 |
| 8 #include "build/build_config.h" |
8 #include "base/i18n/base_i18n_export.h" | 9 #include "base/i18n/base_i18n_export.h" |
9 | 10 |
10 namespace base { | 11 namespace base { |
11 namespace i18n { | 12 namespace i18n { |
12 | 13 |
13 // Call this function to load ICU's data tables for the current process. This | 14 // Call this function to load ICU's data tables for the current process. This |
14 // function should be called before ICU is used. | 15 // function should be called before ICU is used. |
15 BASE_I18N_EXPORT bool InitializeICU(); | 16 BASE_I18N_EXPORT bool InitializeICU(); |
16 | 17 |
| 18 #if defined(OS_ANDROID) |
| 19 // Android uses a file descriptor passed by browser process to initialize ICU |
| 20 // in render processes. |
| 21 BASE_I18N_EXPORT bool InitializeICUWithFileDescriptor(int data_fd); |
| 22 #endif |
| 23 |
17 // In a test binary, the call above might occur twice. | 24 // In a test binary, the call above might occur twice. |
18 BASE_I18N_EXPORT void AllowMultipleInitializeCallsForTesting(); | 25 BASE_I18N_EXPORT void AllowMultipleInitializeCallsForTesting(); |
19 | 26 |
20 } // namespace i18n | 27 } // namespace i18n |
21 } // namespace base | 28 } // namespace base |
22 | 29 |
23 #endif // BASE_I18N_ICU_UTIL_H_ | 30 #endif // BASE_I18N_ICU_UTIL_H_ |
OLD | NEW |