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

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

Issue 2446553002: Support Service Worker NavigationPreload with PlzNavigate. (Closed)
Patch Set: remove unnecessary comment Created 4 years, 2 months 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 f1dcab31fb7bf1deff1b29dae91138238d9d70b0..38f2c380cc380a89a39f036559246aefcc799cc4 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1140,8 +1140,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
scoped_refptr<ServiceWorkerDispatcherHost> service_worker_filter =
new ServiceWorkerDispatcherHost(
GetID(), message_port_message_filter_.get(), resource_context,
- base::Bind(&RenderProcessHostImpl::CreateURLLoaderFactory,
- weak_factory_.GetWeakPtr()));
+ CreateURLLoaderFactoryGetter());
service_worker_filter->Init(
storage_partition_impl_->GetServiceWorkerContext());
AddFilter(service_worker_filter.get());
@@ -1409,6 +1408,12 @@ mojom::Renderer* RenderProcessHostImpl::GetRendererInterface() {
return renderer_interface_.get();
}
+MojoURLLoaderFactoryGetter
+RenderProcessHostImpl::CreateURLLoaderFactoryGetter() {
+ return base::Bind(&RenderProcessHostImpl::CreateURLLoaderFactory,
+ weak_factory_.GetWeakPtr());
horo 2016/10/31 14:50:32 WeakPtr is not thread safe. So we should not pass
piman 2016/10/31 20:43:25 I'll wait for the update before a full review. Jus
+}
+
mojom::RouteProvider* RenderProcessHostImpl::GetRemoteRouteProvider() {
return remote_route_provider_.get();
}

Powered by Google App Engine
This is Rietveld 408576698