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

Unified Diff: content/child/service_worker/service_worker_network_provider.cc

Issue 2396273002: ServiceWorker: Mojofication of ServiceWorkerDispatcherHost (Closed)
Patch Set: Removed GetWeakPtr and moved a method to private 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
« no previous file with comments | « content/child/service_worker/service_worker_network_provider.h ('k') | content/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/service_worker/service_worker_network_provider.cc
diff --git a/content/child/service_worker/service_worker_network_provider.cc b/content/child/service_worker/service_worker_network_provider.cc
index 89cd50e5284b0fe84f930bd76e2f05c9c621f4f6..baa6f6317b5ce66026967e0066104129966c6fb5 100644
--- a/content/child/service_worker/service_worker_network_provider.cc
+++ b/content/child/service_worker/service_worker_network_provider.cc
@@ -11,6 +11,7 @@
#include "content/common/service_worker/service_worker_messages.h"
#include "content/common/service_worker/service_worker_utils.h"
#include "content/public/common/browser_side_navigation_policy.h"
+#include "ipc/ipc_sync_channel.h"
#include "third_party/WebKit/public/platform/WebSecurityOrigin.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebSandboxFlags.h"
@@ -128,8 +129,15 @@ ServiceWorkerNetworkProvider::ServiceWorkerNetworkProvider(
context_ = new ServiceWorkerProviderContext(
provider_id_, provider_type,
ChildThreadImpl::current()->thread_safe_sender());
- ChildThreadImpl::current()->Send(new ServiceWorkerHostMsg_ProviderCreated(
- provider_id_, route_id, provider_type, is_parent_frame_secure));
+ if (ServiceWorkerUtils::IsMojoForServiceWorkerEnabled()) {
+ ChildThreadImpl::current()->channel()->GetRemoteAssociatedInterface(
+ &dispatcher_host_);
+ dispatcher_host_->OnProviderCreated(provider_id_, route_id, provider_type,
+ is_parent_frame_secure);
+ } else {
+ ChildThreadImpl::current()->Send(new ServiceWorkerHostMsg_ProviderCreated(
+ provider_id_, route_id, provider_type, is_parent_frame_secure));
+ }
}
ServiceWorkerNetworkProvider::ServiceWorkerNetworkProvider(
« no previous file with comments | « content/child/service_worker/service_worker_network_provider.h ('k') | content/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698