[Android] Fix icu_use_data_file = false.
There are compiler errors while building Android WebView Shell with icu_use_data_file = false. BUG= Review-Url: https://codereview.chromium.org/2241753002 Cr-Commit-Position: refs/heads/master@{#413686}
This commit is contained in:
content
@ -471,6 +471,7 @@ class ContentMainRunnerImpl : public ContentMainRunner {
|
||||
#endif // OS_ANDROID
|
||||
|
||||
base::GlobalDescriptors* g_fds = base::GlobalDescriptors::GetInstance();
|
||||
ALLOW_UNUSED_LOCAL(g_fds);
|
||||
|
||||
// On Android,
|
||||
// - setlocale() is not supported.
|
||||
@ -678,7 +679,7 @@ class ContentMainRunnerImpl : public ContentMainRunner {
|
||||
RegisterPathProvider();
|
||||
RegisterContentSchemes(true);
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
#if defined(OS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE)
|
||||
int icudata_fd = g_fds->MaybeGet(kAndroidICUDataDescriptor);
|
||||
if (icudata_fd != -1) {
|
||||
auto icudata_region = g_fds->GetRegion(kAndroidICUDataDescriptor);
|
||||
@ -689,7 +690,7 @@ class ContentMainRunnerImpl : public ContentMainRunner {
|
||||
}
|
||||
#else
|
||||
CHECK(base::i18n::InitializeICU());
|
||||
#endif // OS_ANDROID
|
||||
#endif // OS_ANDROID && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE)
|
||||
|
||||
base::StatisticsRecorder::Initialize();
|
||||
|
||||
|
@ -238,9 +238,11 @@ void LaunchOnLauncherThread(const NotifyCallback& callback,
|
||||
#endif // defined(OS_POSIX) && !defined(OS_MACOSX)
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
#if ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE
|
||||
files_to_register->Share(
|
||||
kAndroidICUDataDescriptor,
|
||||
base::i18n::GetIcuDataFileHandle(®ions[kAndroidICUDataDescriptor]));
|
||||
#endif // ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE
|
||||
|
||||
// Android WebView runs in single process, ensure that we never get here
|
||||
// when running in single process mode.
|
||||
|
Reference in New Issue
Block a user