| Index: chrome/browser/renderer_host/browser_render_process_host.cc
|
| diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
|
| index 7c047af44aa60974abf31b7f9c53ceb6cbe321c5..6ffd54fbe316d7f1f649faed465bcbcace82cc6c 100644
|
| --- a/chrome/browser/renderer_host/browser_render_process_host.cc
|
| +++ b/chrome/browser/renderer_host/browser_render_process_host.cc
|
| @@ -233,8 +233,9 @@ namespace {
|
| class RendererURLRequestContextOverride
|
| : public ResourceMessageFilter::URLRequestContextOverride {
|
| public:
|
| - explicit RendererURLRequestContextOverride(Profile* profile)
|
| - : request_context_(profile->GetRequestContext()),
|
| + explicit RendererURLRequestContextOverride(Profile* profile,
|
| + const Extension* installed_app)
|
| + : request_context_(profile->GetRequestContext(installed_app)),
|
| media_request_context_(profile->GetRequestContextForMedia()) {
|
| }
|
|
|
| @@ -330,7 +331,8 @@ BrowserRenderProcessHost::~BrowserRenderProcessHost() {
|
| }
|
|
|
| bool BrowserRenderProcessHost::Init(
|
| - bool is_accessibility_enabled, bool is_extensions_process) {
|
| + bool is_accessibility_enabled, bool is_extensions_process,
|
| + const Extension* installed_app) {
|
| // calling Init() more than once does nothing, this makes it more convenient
|
| // for the view host which may not be sure in some cases
|
| if (channel_.get())
|
| @@ -342,6 +344,9 @@ bool BrowserRenderProcessHost::Init(
|
| // content, e.g. if an extension calls window.open.
|
| extension_process_ = extension_process_ || is_extensions_process;
|
|
|
| + // Keep track of the installed app for this process, if any.
|
| + installed_app_ = installed_app;
|
| +
|
| // run the IPC channel on the shared IO thread.
|
| base::Thread* io_thread = g_browser_process->io_thread();
|
|
|
| @@ -430,11 +435,12 @@ void BrowserRenderProcessHost::CreateMessageFilters() {
|
| new RenderMessageFilter(id(),
|
| PluginService::GetInstance(),
|
| profile(),
|
| - widget_helper_));
|
| + widget_helper_,
|
| + installed_app_));
|
| channel_->AddFilter(render_message_filter);
|
|
|
| scoped_refptr<RendererURLRequestContextOverride> url_request_context_override(
|
| - new RendererURLRequestContextOverride(profile()));
|
| + new RendererURLRequestContextOverride(profile(), installed_app_));
|
|
|
| ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter(
|
| id(), ChildProcessInfo::RENDER_PROCESS,
|
|
|