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 2beb2b18d3872cac26c28fbfd1f01179010aa1ac..948d232dfaf30b8c004bdb98d7aebf19eabcba50 100644 |
--- a/content/browser/renderer_host/render_process_host_impl.cc |
+++ b/content/browser/renderer_host/render_process_host_impl.cc |
@@ -9,6 +9,7 @@ |
#include <algorithm> |
#include <limits> |
+#include <set> |
#include <utility> |
#include <vector> |
@@ -73,8 +74,9 @@ |
#include "content/browser/gpu/gpu_process_host.h" |
#include "content/browser/gpu/shader_disk_cache.h" |
#include "content/browser/histogram_message_filter.h" |
+#include "content/browser/indexed_db/database_factory_impl.h" |
+#include "content/browser/indexed_db/database_impl.h" |
#include "content/browser/indexed_db/indexed_db_context_impl.h" |
-#include "content/browser/indexed_db/indexed_db_dispatcher_host.h" |
#include "content/browser/loader/resource_message_filter.h" |
#include "content/browser/loader/resource_scheduler_filter.h" |
#include "content/browser/loader/url_loader_factory_impl.h" |
@@ -622,6 +624,9 @@ RenderProcessHostImpl::RenderProcessHostImpl( |
widget_helper_ = new RenderWidgetHelper(); |
ChildProcessSecurityPolicyImpl::GetInstance()->Add(GetID()); |
+ database_factory_impl_ = new DatabaseFactoryImpl( |
+ storage_partition_impl->GetIndexedDBContext(), |
+ storage_partition_impl->GetURLRequestContext(), GetID()); |
CHECK(!BrowserMainRunner::ExitedMainMessageLoop()); |
RegisterHost(GetID(), this); |
@@ -999,10 +1004,6 @@ void RenderProcessHostImpl::CreateMessageFilters() { |
AddFilter(new ClipboardMessageFilter(blob_storage_context)); |
AddFilter(new DOMStorageMessageFilter( |
storage_partition_impl_->GetDOMStorageContext())); |
- AddFilter(new IndexedDBDispatcherHost( |
- GetID(), storage_partition_impl_->GetURLRequestContext(), |
- storage_partition_impl_->GetIndexedDBContext(), |
- blob_storage_context.get())); |
#if defined(ENABLE_WEBRTC) |
peer_connection_tracker_host_ = new PeerConnectionTrackerHost( |
@@ -1180,6 +1181,11 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { |
base::Bind(&WebSocketManager::CreateWebSocket, GetID(), MSG_ROUTING_NONE), |
ui_task_runner); |
+ registry->AddInterface( |
+ base::Bind(&RenderProcessHostImpl::CreateIndexedDBFactoryService, |
+ base::Unretained(this)), |
+ storage_partition_impl_->GetIndexedDBContext()->TaskRunner()); |
+ |
GetContentClient()->browser()->ExposeInterfacesToRenderer(registry.get(), |
this); |
@@ -1192,6 +1198,11 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { |
mojo_shell_connection->AddConnectionFilter(std::move(connection_filter)); |
} |
+void RenderProcessHostImpl::CreateIndexedDBFactoryService( |
+ mojo::InterfaceRequest<::indexed_db::mojom::DatabaseFactory> request) { |
+ database_factory_impl_->Bind(std::move(request)); |
+} |
+ |
void RenderProcessHostImpl::CreateStoragePartitionService( |
mojo::InterfaceRequest<mojom::StoragePartitionService> request) { |
// DO NOT REMOVE THIS COMMAND LINE CHECK WITHOUT SECURITY REVIEW! |