| Index: chromecast/shell/browser/cast_content_browser_client.cc
|
| diff --git a/chromecast/shell/browser/cast_content_browser_client.cc b/chromecast/shell/browser/cast_content_browser_client.cc
|
| index 720bbb82de7447cd05f7fc01aec294f7eefd608b..fb40b5c4e7b89ac6633f8e7e514156477cd332f4 100644
|
| --- a/chromecast/shell/browser/cast_content_browser_client.cc
|
| +++ b/chromecast/shell/browser/cast_content_browser_client.cc
|
| @@ -5,11 +5,15 @@
|
| #include "chromecast/shell/browser/cast_content_browser_client.h"
|
|
|
| #include "base/command_line.h"
|
| +#include "base/path_service.h"
|
| +#include "chromecast/common/cast_paths.h"
|
| +#include "chromecast/common/global_descriptors.h"
|
| #include "chromecast/shell/browser/cast_browser_context.h"
|
| #include "chromecast/shell/browser/cast_browser_main_parts.h"
|
| #include "chromecast/shell/browser/geolocation/cast_access_token_store.h"
|
| #include "chromecast/shell/browser/url_request_context_factory.h"
|
| #include "content/public/browser/certificate_request_result_type.h"
|
| +#include "content/public/browser/file_descriptor_info.h"
|
| #include "content/public/browser/render_process_host.h"
|
| #include "content/public/common/content_descriptors.h"
|
| #include "content/public/common/content_switches.h"
|
| @@ -141,6 +145,19 @@ void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
|
| const base::CommandLine& command_line,
|
| int child_process_id,
|
| std::vector<content::FileDescriptorInfo>* mappings) {
|
| +#if defined(OS_ANDROID)
|
| + int flags = base::File::FLAG_OPEN | base::File::FLAG_READ;
|
| + base::FilePath pak_file;
|
| + CHECK(PathService::Get(FILE_CAST_PAK, &pak_file));
|
| + base::File pak_with_flags(pak_file, flags);
|
| + if (!pak_with_flags.IsValid()) {
|
| + NOTREACHED() << "Failed to open file when creating renderer process: "
|
| + << "cast_shell.pak";
|
| + }
|
| + mappings->push_back(content::FileDescriptorInfo(
|
| + kAndroidPakDescriptor,
|
| + base::FileDescriptor(base::File(pak_file, flags))));
|
| +#endif // defined(OS_ANDROID)
|
| }
|
|
|
| } // namespace shell
|
|
|