summaryrefslogtreecommitdiffstats
path: root/chromium/base/i18n/icu_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/base/i18n/icu_util.h')
-rw-r--r--chromium/base/i18n/icu_util.h28
1 files changed, 22 insertions, 6 deletions
diff --git a/chromium/base/i18n/icu_util.h b/chromium/base/i18n/icu_util.h
index a861ce6c9ac..4324dc577a7 100644
--- a/chromium/base/i18n/icu_util.h
+++ b/chromium/base/i18n/icu_util.h
@@ -23,18 +23,28 @@ namespace i18n {
BASE_I18N_EXPORT bool InitializeICU();
#if ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE
-#if defined(OS_ANDROID)
-// Returns the PlatformFile and Region that was initialized by InitializeICU().
-// Use with InitializeICUWithFileDescriptor().
+// Loads ICU's extra data tables from disk for the current process. If used must
+// be called before InitializeICU().
+BASE_I18N_EXPORT bool InitializeExtraICU();
+// Returns the PlatformFile and Region that was initialized by InitializeICU()
+// or InitializeExtraICU(). Use with InitializeICUWithFileDescriptor() or
+// InitializeExtraICUWithFileDescriptor().
BASE_I18N_EXPORT PlatformFile GetIcuDataFileHandle(
MemoryMappedFile::Region* out_region);
+BASE_I18N_EXPORT PlatformFile
+GetIcuExtraDataFileHandle(MemoryMappedFile::Region* out_region);
-// Android uses a file descriptor passed by browser process to initialize ICU
-// in render processes.
+// Loads ICU extra data file from file descriptor passed by browser process to
+// initialize ICU in render processes. If used must be called before
+// InitializeICUWithFileDescriptor().
+BASE_I18N_EXPORT bool InitializeExtraICUWithFileDescriptor(
+ PlatformFile data_fd,
+ const MemoryMappedFile::Region& data_region);
+// Loads ICU data file from file descriptor passed by browser process to
+// initialize ICU in render processes.
BASE_I18N_EXPORT bool InitializeICUWithFileDescriptor(
PlatformFile data_fd,
const MemoryMappedFile::Region& data_region);
-#endif
// Returns a void pointer to the memory mapped ICU data file.
//
@@ -60,6 +70,12 @@ BASE_I18N_EXPORT bool InitializeICUFromRawMemory(const uint8_t* raw_memory);
// In a test binary, the call above might occur twice.
BASE_I18N_EXPORT void AllowMultipleInitializeCallsForTesting();
+#if !defined(OS_NACL)
+#if ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE
+BASE_I18N_EXPORT void ResetGlobalsForTesting();
+#endif // ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE
+#endif // !defined(OS_NACL)
+
} // namespace i18n
} // namespace base