summaryrefslogtreecommitdiffstats
path: root/base/i18n/icu_util.h
blob: b0a5dbcce6df01cf29bacb9d953692ba7b74d97c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef BASE_I18N_ICU_UTIL_H_
#define BASE_I18N_ICU_UTIL_H_

#include "build/build_config.h"
#include "base/i18n/base_i18n_export.h"

namespace base {
namespace i18n {

// Call this function to load ICU's data tables for the current process.  This
// function should be called before ICU is used.
BASE_I18N_EXPORT bool InitializeICU();

#if defined(OS_ANDROID)
// Android uses a file descriptor passed by browser process to initialize ICU
// in render processes.
BASE_I18N_EXPORT bool InitializeICUWithFileDescriptor(int data_fd);
#endif

// In a test binary, the call above might occur twice.
BASE_I18N_EXPORT void AllowMultipleInitializeCallsForTesting();

}  // namespace i18n
}  // namespace base

#endif  // BASE_I18N_ICU_UTIL_H_