| Index: chrome/browser/chrome_content_browser_client.cc
|
| diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
|
| index 32432acce8dbdbe5877b32f2f1c7aead7ed955ab..b5b92f06ee0f73b62066ec13e265aaea5d07d296 100644
|
| --- a/chrome/browser/chrome_content_browser_client.cc
|
| +++ b/chrome/browser/chrome_content_browser_client.cc
|
| @@ -173,6 +173,7 @@
|
| #endif
|
|
|
| #if defined(OS_ANDROID)
|
| +#include "base/android/apk_assets.h"
|
| #include "ui/base/ui_base_paths.h"
|
| #include "ui/gfx/android/device_display_info.h"
|
| #endif
|
| @@ -2279,17 +2280,14 @@ void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
|
| }
|
| }
|
|
|
| - base::FilePath app_data_path;
|
| - PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path);
|
| - DCHECK(!app_data_path.empty());
|
| -
|
| - flags = base::File::FLAG_OPEN | base::File::FLAG_READ;
|
| - base::FilePath icudata_path =
|
| - app_data_path.AppendASCII(base::i18n::kIcuDataFileName);
|
| - base::File icudata_file(icudata_path, flags);
|
| - DCHECK(icudata_file.IsValid());
|
| - mappings->Transfer(kAndroidICUDataDescriptor,
|
| - base::ScopedFD(icudata_file.TakePlatformFile()));
|
| + if (!icudtl_fd_.is_valid()) {
|
| + icudtl_fd_.reset(base::android::OpenApkAsset(base::i18n::kIcuDataFileName,
|
| + &icudtl_region_));
|
| + DCHECK(icudtl_fd_.is_valid());
|
| + }
|
| + mappings->Share(kAndroidICUDataDescriptor, icudtl_fd_.get());
|
| + regions->insert(std::make_pair(kAndroidICUDataDescriptor, icudtl_region_));
|
| +
|
| #else
|
| int crash_signal_fd = GetCrashSignalFD(command_line);
|
| if (crash_signal_fd >= 0) {
|
|
|