Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1103)

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2601163002: Remove indexed_db_messages.h. (Closed)
Patch Set: Set up the factory on the right thread. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 18d86d268a0c4f6aafa2cda59e90f71cb0298f25..76a92efe0f4d1735c49b490069bf47e5fbc0a5b0 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -684,6 +684,10 @@ RenderProcessHostImpl::RenderProcessHostImpl(
webrtc_eventlog_host_(id_),
#endif
permission_service_context_(new PermissionServiceContext(this)),
+ indexed_db_factory_(new IndexedDBDispatcherHost(
+ id_, storage_partition_impl_->GetURLRequestContext(),
+ storage_partition_impl_->GetIndexedDBContext(),
+ ChromeBlobStorageContext::GetFor(browser_context_))),
channel_connected_(false),
sent_render_process_ready_(false),
#if defined(OS_ANDROID)
@@ -1083,10 +1087,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 BUILDFLAG(ENABLE_WEBRTC)
peer_connection_tracker_host_ = new PeerConnectionTrackerHost(
@@ -1195,6 +1195,10 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
base::Bind(&RenderProcessHostImpl::OnRouteProviderRequest,
base::Unretained(this)));
+ channel_->AddAssociatedInterfaceForIOThread(
+ base::Bind(&RenderProcessHostImpl::OnIndexedDBFactoryRequest,
+ base::Unretained(this)));
+
#if defined(OS_ANDROID)
AddUIThreadInterface(registry.get(),
GetGlobalJavaInterfaces()
@@ -2623,6 +2627,11 @@ void RenderProcessHostImpl::OnRouteProviderRequest(
route_provider_binding_.Bind(std::move(request));
}
+void RenderProcessHostImpl::OnIndexedDBFactoryRequest(
+ ::indexed_db::mojom::FactoryAssociatedRequest request) {
+ indexed_db_factory_->Bind(std::move(request));
cmumford 2017/01/05 00:29:02 Do we need to check if indexed_db_factory_.is_boun
Reilly Grant (use Gerrit) 2017/01/06 02:23:35 Renamed this to AddBinding() to make it clear the
+}
+
void RenderProcessHostImpl::ProcessDied(bool already_dead,
RendererClosedDetails* known_details) {
// Our child process has died. If we didn't expect it, it's a crash.

Powered by Google App Engine
This is Rietveld 408576698