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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 1187433006: Load language .pak files directly from the apk when using splits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@locale-res-or-file
Patch Set: Fix ui_base_unittest failure (allow locale paks to be loaded multiple times) Created 5 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
« no previous file with comments | « chrome/browser/chrome_browser_main_android.cc ('k') | ui/base/resource/resource_bundle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f7b841877b0c6849d02dc738e33416eca78d4f9b..3f175fe14887e410b0917dfd8d4d4fdb3be965bb 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -2290,18 +2290,13 @@ void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
&(*regions)[kAndroidChrome100PercentPakDescriptor]);
mappings->Share(kAndroidChrome100PercentPakDescriptor, fd);
- int flags = base::File::FLAG_OPEN | base::File::FLAG_READ;
- const std::string locale = GetApplicationLocale();
- base::FilePath locale_pak = ResourceBundle::GetSharedInstance().
- GetLocaleFilePath(locale, false);
- base::File file(locale_pak, flags);
- DCHECK(file.IsValid());
- mappings->Transfer(kAndroidLocalePakDescriptor,
- base::ScopedFD(file.TakePlatformFile()));
+ fd = ui::GetLocalePackFd(&(*regions)[kAndroidLocalePakDescriptor]);
+ mappings->Share(kAndroidLocalePakDescriptor, fd);
if (breakpad::IsCrashReporterEnabled()) {
- file = breakpad::CrashDumpManager::GetInstance()->CreateMinidumpFile(
- child_process_id);
+ base::File file =
+ breakpad::CrashDumpManager::GetInstance()->CreateMinidumpFile(
+ child_process_id);
if (file.IsValid()) {
mappings->Transfer(kAndroidMinidumpDescriptor,
base::ScopedFD(file.TakePlatformFile()));
« no previous file with comments | « chrome/browser/chrome_browser_main_android.cc ('k') | ui/base/resource/resource_bundle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698