| 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 cae105323efcb18b09f719222657334c589c2c2a..f2f0eb8f2f1d5c7b1e089bf62479657ed2612058 100644
|
| --- a/content/browser/renderer_host/render_process_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_process_host_impl.cc
|
| @@ -81,6 +81,7 @@
|
| #include "content/browser/renderer_host/socket_stream_dispatcher_host.h"
|
| #include "content/browser/renderer_host/text_input_client_message_filter.h"
|
| #include "content/browser/resolve_proxy_msg_helper.h"
|
| +#include "content/browser/storage_partition_impl.h"
|
| #include "content/browser/speech/input_tag_speech_dispatcher_host.h"
|
| #include "content/browser/speech/speech_recognition_dispatcher_host.h"
|
| #include "content/browser/trace_message_filter.h"
|
| @@ -321,7 +322,9 @@ void RenderProcessHost::SetMaxRendererProcessCount(size_t count) {
|
| }
|
|
|
| RenderProcessHostImpl::RenderProcessHostImpl(
|
| - BrowserContext* browser_context, bool is_guest)
|
| + BrowserContext* browser_context,
|
| + StoragePartitionImpl* storage_partition_impl,
|
| + bool is_guest)
|
| : fast_shutdown_started_(false),
|
| deleting_soon_(false),
|
| pending_views_(0),
|
| @@ -333,6 +336,7 @@ RenderProcessHostImpl::RenderProcessHostImpl(
|
| is_initialized_(false),
|
| id_(ChildProcessHostImpl::GenerateChildProcessUniqueId()),
|
| browser_context_(browser_context),
|
| + storage_partition_impl_(storage_partition_impl),
|
| sudden_termination_allowed_(true),
|
| ignore_input_events_(false),
|
| is_guest_(is_guest) {
|
| @@ -512,7 +516,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
| GetBrowserContext(),
|
| GetBrowserContext()->GetRequestContextForRenderProcess(GetID()),
|
| widget_helper_,
|
| - media_observer));
|
| + media_observer,
|
| + storage_partition_impl_->GetDOMStorageContext()));
|
| channel_->AddFilter(render_message_filter);
|
| BrowserContext* browser_context = GetBrowserContext();
|
| ResourceContext* resource_context = browser_context->GetResourceContext();
|
| @@ -529,17 +534,18 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
| media_stream_manager));
|
| channel_->AddFilter(new AudioRendererHost(audio_manager, media_observer));
|
| channel_->AddFilter(new VideoCaptureHost());
|
| - channel_->AddFilter(new AppCacheDispatcherHost(
|
| - static_cast<ChromeAppCacheService*>(
|
| - BrowserContext::GetAppCacheService(browser_context)),
|
| - GetID()));
|
| + channel_->AddFilter(
|
| + new AppCacheDispatcherHost(storage_partition_impl_->GetAppCacheService(),
|
| + GetID()));
|
| channel_->AddFilter(new ClipboardMessageFilter());
|
| - channel_->AddFilter(new DOMStorageMessageFilter(GetID(),
|
| - static_cast<DOMStorageContextImpl*>(
|
| - BrowserContext::GetDOMStorageContext(browser_context, GetID()))));
|
| - channel_->AddFilter(new IndexedDBDispatcherHost(GetID(),
|
| - static_cast<IndexedDBContextImpl*>(
|
| - BrowserContext::GetIndexedDBContext(browser_context))));
|
| + channel_->AddFilter(
|
| + new DOMStorageMessageFilter(
|
| + GetID(),
|
| + storage_partition_impl_->GetDOMStorageContext()));
|
| + channel_->AddFilter(
|
| + new IndexedDBDispatcherHost(
|
| + GetID(),
|
| + storage_partition_impl_->GetIndexedDBContext()));
|
| channel_->AddFilter(GeolocationDispatcherHost::New(
|
| GetID(), browser_context->GetGeolocationPermissionContext()));
|
| gpu_message_filter_ = new GpuMessageFilter(GetID(), widget_helper_.get());
|
| @@ -564,13 +570,13 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
| channel_->AddFilter(new FileAPIMessageFilter(
|
| GetID(),
|
| browser_context->GetRequestContext(),
|
| - BrowserContext::GetFileSystemContext(browser_context),
|
| + storage_partition_impl_->GetFileSystemContext(),
|
| ChromeBlobStorageContext::GetFor(browser_context)));
|
| channel_->AddFilter(new device_orientation::OrientationMessageFilter());
|
| channel_->AddFilter(new FileUtilitiesMessageFilter(GetID()));
|
| channel_->AddFilter(new MimeRegistryMessageFilter());
|
| channel_->AddFilter(new DatabaseMessageFilter(
|
| - BrowserContext::GetDatabaseTracker(browser_context)));
|
| + storage_partition_impl_->GetDatabaseTracker()));
|
| #if defined(OS_MACOSX)
|
| channel_->AddFilter(new TextInputClientMessageFilter(GetID()));
|
| #elif defined(OS_WIN)
|
| @@ -596,7 +602,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
| browser_context->GetRequestContextForRenderProcess(GetID())));
|
| channel_->AddFilter(new QuotaDispatcherHost(
|
| GetID(),
|
| - BrowserContext::GetQuotaManager(browser_context),
|
| + storage_partition_impl_->GetQuotaManager(),
|
| GetContentClient()->browser()->CreateQuotaPermissionContext()));
|
| channel_->AddFilter(new GamepadBrowserMessageFilter(this));
|
| channel_->AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER));
|
|
|