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

Unified Diff: chromecast/browser/cast_content_browser_client.cc

Issue 1181953002: Load non-locale .pak files directly from the .apk on Android (rather than extracting on start-up). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@raw-paks
Patch Set: fix unused LoadMainAndroidPackFile 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
Index: chromecast/browser/cast_content_browser_client.cc
diff --git a/chromecast/browser/cast_content_browser_client.cc b/chromecast/browser/cast_content_browser_client.cc
index 2d1027bb1ee90b990be16be18942f4a11d1f6c2b..8fc4b4bdb5de1e2ea00465fb64b947301eb09bf8 100644
--- a/chromecast/browser/cast_content_browser_client.cc
+++ b/chromecast/browser/cast_content_browser_client.cc
@@ -332,18 +332,18 @@ bool CastContentBrowserClient::CanCreateWindow(
void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
const base::CommandLine& command_line,
int child_process_id,
- content::FileDescriptorInfo* mappings) {
+ FileDescriptorInfo* mappings
#if defined(OS_ANDROID)
- const int flags_open_read = base::File::FLAG_OPEN | base::File::FLAG_READ;
- base::FilePath pak_file_path;
- CHECK(PathService::Get(FILE_CAST_PAK, &pak_file_path));
- base::File pak_file(pak_file_path, flags_open_read);
- if (!pak_file.IsValid()) {
- NOTREACHED() << "Failed to open file when creating renderer process: "
- << "cast_shell.pak";
- }
- mappings->Transfer(kAndroidPakDescriptor,
- base::ScopedFD(pak_file.TakePlatformFile()));
+ , std::map<int, base::MemoryMappedFile::Region>* regions
+#endif
+ ) {
+#if defined(OS_ANDROID)
+ mappings->Share(
+ kAndroidPakDescriptor,
+ base::GlobalDescriptors::GetInstance()->Get(kAndroidPakDescriptor));
+ regions->insert(std::make_pair(
+ kAndroidPakDescriptor, base::GlobalDescriptors::GetInstance()->GetRegion(
+ kAndroidPakDescriptor)));
if (breakpad::IsCrashReporterEnabled()) {
base::File minidump_file(

Powered by Google App Engine
This is Rietveld 408576698