Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Side by Side Diff: base/i18n/icu_util.h

Issue 1542323002: Switch to standard integer types in base/i18n/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: header Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/i18n/icu_string_conversions_unittest.cc ('k') | base/i18n/icu_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
9
8 #include "base/files/memory_mapped_file.h" 10 #include "base/files/memory_mapped_file.h"
9 #include "base/i18n/base_i18n_export.h" 11 #include "base/i18n/base_i18n_export.h"
10 #include "build/build_config.h" 12 #include "build/build_config.h"
11 13
12 namespace base { 14 namespace base {
13 namespace i18n { 15 namespace i18n {
14 16
15 #if !defined(OS_NACL) 17 #if !defined(OS_NACL)
16 // Call this function to load ICU's data tables for the current process. This 18 // Call this function to load ICU's data tables for the current process. This
17 // function should be called before ICU is used. 19 // function should be called before ICU is used.
(...skipping 13 matching lines...) Expand all
31 const MemoryMappedFile::Region& data_region); 33 const MemoryMappedFile::Region& data_region);
32 #endif 34 #endif
33 35
34 // Returns a void pointer to the memory mapped ICU data file. 36 // Returns a void pointer to the memory mapped ICU data file.
35 // 37 //
36 // There are cases on Android where we would be unsafely reusing a file 38 // There are cases on Android where we would be unsafely reusing a file
37 // descriptor within the same process when initializing two copies of ICU from 39 // descriptor within the same process when initializing two copies of ICU from
38 // different binaries in the same address space. This returns an unowned 40 // different binaries in the same address space. This returns an unowned
39 // pointer to the memory mapped icu data file; consumers copies of base must 41 // pointer to the memory mapped icu data file; consumers copies of base must
40 // not outlive the copy of base that owns the memory mapped file. 42 // not outlive the copy of base that owns the memory mapped file.
41 BASE_I18N_EXPORT const uint8* GetRawIcuMemory(); 43 BASE_I18N_EXPORT const uint8_t* GetRawIcuMemory();
42 44
43 // Initializes ICU memory 45 // Initializes ICU memory
44 // 46 //
45 // This does nothing in component builds; this initialization should only be 47 // This does nothing in component builds; this initialization should only be
46 // done in cases where there could be two copies of base in a single process in 48 // done in cases where there could be two copies of base in a single process in
47 // non-component builds. (The big example is mojo: the shell will have a copy 49 // non-component builds. (The big example is mojo: the shell will have a copy
48 // of base linked in, and the majority of mojo applications will have base 50 // of base linked in, and the majority of mojo applications will have base
49 // linked in but in non-component builds, these will be separate copies of 51 // linked in but in non-component builds, these will be separate copies of
50 // base.) 52 // base.)
51 BASE_I18N_EXPORT bool InitializeICUFromRawMemory(const uint8* raw_memory); 53 BASE_I18N_EXPORT bool InitializeICUFromRawMemory(const uint8_t* raw_memory);
52 #endif // ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE 54 #endif // ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE
53 #endif // !defined(OS_NACL) 55 #endif // !defined(OS_NACL)
54 56
55 // In a test binary, the call above might occur twice. 57 // In a test binary, the call above might occur twice.
56 BASE_I18N_EXPORT void AllowMultipleInitializeCallsForTesting(); 58 BASE_I18N_EXPORT void AllowMultipleInitializeCallsForTesting();
57 59
58 } // namespace i18n 60 } // namespace i18n
59 } // namespace base 61 } // namespace base
60 62
61 #endif // BASE_I18N_ICU_UTIL_H_ 63 #endif // BASE_I18N_ICU_UTIL_H_
OLDNEW
« no previous file with comments | « base/i18n/icu_string_conversions_unittest.cc ('k') | base/i18n/icu_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698