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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/files/memory_mapped_file.h" | 10 #include "base/files/memory_mapped_file.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // descriptor within the same process when initializing two copies of ICU from | 43 // descriptor within the same process when initializing two copies of ICU from |
44 // different binaries in the same address space. This returns an unowned | 44 // different binaries in the same address space. This returns an unowned |
45 // pointer to the memory mapped icu data file; consumers copies of base must | 45 // pointer to the memory mapped icu data file; consumers copies of base must |
46 // not outlive the copy of base that owns the memory mapped file. | 46 // not outlive the copy of base that owns the memory mapped file. |
47 BASE_I18N_EXPORT const uint8_t* GetRawIcuMemory(); | 47 BASE_I18N_EXPORT const uint8_t* GetRawIcuMemory(); |
48 | 48 |
49 // Initializes ICU memory | 49 // Initializes ICU memory |
50 // | 50 // |
51 // This does nothing in component builds; this initialization should only be | 51 // This does nothing in component builds; this initialization should only be |
52 // done in cases where there could be two copies of base in a single process in | 52 // done in cases where there could be two copies of base in a single process in |
53 // non-component builds. (The big example is mojo: the shell will have a copy | 53 // non-component builds. (The big example is standalone service libraries: the |
54 // of base linked in, and the majority of mojo applications will have base | 54 // Service Manager will have a copy of base linked in, and the majority of |
55 // linked in but in non-component builds, these will be separate copies of | 55 // service libraries will have base linked in but in non-component builds, |
56 // base.) | 56 // these will be separate copies of base.) |
57 BASE_I18N_EXPORT bool InitializeICUFromRawMemory(const uint8_t* raw_memory); | 57 BASE_I18N_EXPORT bool InitializeICUFromRawMemory(const uint8_t* raw_memory); |
58 #endif // ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE | 58 #endif // ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE |
59 #endif // !defined(OS_NACL) | 59 #endif // !defined(OS_NACL) |
60 | 60 |
61 // In a test binary, the call above might occur twice. | 61 // In a test binary, the call above might occur twice. |
62 BASE_I18N_EXPORT void AllowMultipleInitializeCallsForTesting(); | 62 BASE_I18N_EXPORT void AllowMultipleInitializeCallsForTesting(); |
63 | 63 |
64 } // namespace i18n | 64 } // namespace i18n |
65 } // namespace base | 65 } // namespace base |
66 | 66 |
67 #endif // BASE_I18N_ICU_UTIL_H_ | 67 #endif // BASE_I18N_ICU_UTIL_H_ |
OLD | NEW |