Chromium Code Reviews| Index: content/browser/renderer_host/render_process_host_impl.cc |
| diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc |
| index 67f45e6b5283db6f5e52aa1a2b163a2997742412..e230be5e07aee7c8eb3d57bf3bf5da09c40c81c5 100644 |
| --- a/content/browser/renderer_host/render_process_host_impl.cc |
| +++ b/content/browser/renderer_host/render_process_host_impl.cc |
| @@ -872,10 +872,14 @@ void RenderProcessHostImpl::CreateMessageFilters() { |
| base::Bind(&GetContexts, browser_context->GetResourceContext(), |
| request_context, media_request_context)); |
| + // Several filters need the Blob storage context, so fetch it in advance. |
| + ChromeBlobStorageContext* chrome_blob_storage_context = |
|
kinuko
2016/02/05 05:18:06
nit: this class name is very unfortunate (should b
Adam Rice
2016/02/05 07:21:48
I have been trying to think of a better name for C
|
| + ChromeBlobStorageContext::GetFor(browser_context); |
| + |
| ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter( |
| GetID(), PROCESS_TYPE_RENDERER, |
| storage_partition_impl_->GetAppCacheService(), |
| - ChromeBlobStorageContext::GetFor(browser_context), |
| + chrome_blob_storage_context, |
| storage_partition_impl_->GetFileSystemContext(), |
| storage_partition_impl_->GetServiceWorkerContext(), |
| storage_partition_impl_->GetHostZoomLevelContext(), |
| @@ -907,7 +911,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { |
| AddFilter(new IndexedDBDispatcherHost( |
| GetID(), storage_partition_impl_->GetURLRequestContext(), |
| storage_partition_impl_->GetIndexedDBContext(), |
| - ChromeBlobStorageContext::GetFor(browser_context))); |
| + chrome_blob_storage_context)); |
| gpu_message_filter_ = new GpuMessageFilter(GetID()); |
| AddFilter(gpu_message_filter_); |
| @@ -930,8 +934,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { |
| AddFilter(new FileAPIMessageFilter( |
| GetID(), storage_partition_impl_->GetURLRequestContext(), |
| storage_partition_impl_->GetFileSystemContext(), |
| - ChromeBlobStorageContext::GetFor(browser_context), |
| - StreamContext::GetFor(browser_context))); |
| + chrome_blob_storage_context, StreamContext::GetFor(browser_context))); |
| AddFilter(new FileUtilitiesMessageFilter(GetID())); |
| AddFilter(new MimeRegistryMessageFilter()); |
| AddFilter( |
| @@ -959,8 +962,9 @@ void RenderProcessHostImpl::CreateMessageFilters() { |
| base::Bind(&GetRequestContext, request_context, media_request_context, |
| RESOURCE_TYPE_SUB_RESOURCE)); |
| - AddFilter( |
| - new WebSocketDispatcherHost(GetID(), websocket_request_context_callback)); |
| + AddFilter(new WebSocketDispatcherHost( |
| + GetID(), websocket_request_context_callback, chrome_blob_storage_context, |
| + storage_partition_impl_)); |
| message_port_message_filter_ = new MessagePortMessageFilter( |
| base::Bind(&RenderWidgetHelper::GetNextRoutingID, |