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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 317833006: [ICU] Avoid reading ICU data files in render process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
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 b0ca19c2340c7867cbd23ceb1d83a1a2f663364d..11a9c76bc38a86e9dd4294827ed0bf331f2b399a 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -2642,6 +2642,19 @@ void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
}
}
+ {
jungshik at Google 2014/06/05 23:30:58 nit: I wonder why you enclosed this block with a p
Feng Qian 2014/06/06 17:40:31 I intended to scope variable names, but can remove
+ base::FilePath app_data_path;
+ PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path);
+ DCHECK(!app_data_path.empty());
+
+ int flags = base::File::FLAG_OPEN | base::File::FLAG_READ;
+ base::FilePath icudlt_dat_path =
+ app_data_path.AppendASCII("icudtl.dat");
jungshik at Google 2014/06/05 23:30:57 nit: |icudata_path| would be better, wouldn't it?
Feng Qian 2014/06/06 17:40:31 sure On 2014/06/05 23:30:57, Jungshik Shin wrote:
+ base::File file(icudlt_dat_path, flags);
+ DCHECK(file.IsValid());
+ mappings->push_back(FileDescriptorInfo(kAndroidICUDataDescriptor,
+ FileDescriptor(file.Pass())));
+ }
#else
int crash_signal_fd = GetCrashSignalFD(command_line);
if (crash_signal_fd >= 0) {

Powered by Google App Engine
This is Rietveld 408576698