Chromium Code Reviews| 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 cbe2baace5f8a73e5cdb44518fbb0aa9445a86d1..ed08075e5faf1dba54dbb8efd9097d6abdd66d31 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, |
|
Matt Perry
2011/01/26 20:09:23
drop explicit
Charlie Reis
2011/03/01 21:33:11
Done.
|
| + 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, |