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

Unified Diff: content/browser/service_worker/service_worker_dispatcher_host.cc

Issue 2653493009: Add two interfaces for ServiceWorkerProviderContext/ProviderHost (Closed)
Patch Set: Rebase Created 3 years, 9 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/service_worker/service_worker_dispatcher_host.cc
diff --git a/content/browser/service_worker/service_worker_dispatcher_host.cc b/content/browser/service_worker/service_worker_dispatcher_host.cc
index d8a667c555454f71233e43c56697639dbaf8ceb1..46019ca14139de4d80b3991a3773cf7eff9ad67d 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host.cc
+++ b/content/browser/service_worker/service_worker_dispatcher_host.cc
@@ -1040,26 +1040,6 @@ void ServiceWorkerDispatcherHost::OnProviderCreated(
}
}
-void ServiceWorkerDispatcherHost::OnProviderDestroyed(int provider_id) {
- TRACE_EVENT0("ServiceWorker",
- "ServiceWorkerDispatcherHost::OnProviderDestroyed");
- if (!GetContext())
- return;
- if (!GetContext()->GetProviderHost(render_process_id_, provider_id)) {
- // PlzNavigate: in some cancellation of navigation cases, it is possible
- // for the pre-created hoist to have been destroyed before being claimed by
- // the renderer. The provider is then destroyed in the renderer, and no
- // matching host will be found.
- if (!IsBrowserSideNavigationEnabled() ||
- !ServiceWorkerUtils::IsBrowserAssignedProviderId(provider_id)) {
- bad_message::ReceivedBadMessage(
- this, bad_message::SWDH_PROVIDER_DESTROYED_NO_HOST);
- }
- return;
- }
- GetContext()->RemoveProviderHost(render_process_id_, provider_id);
-}
-
void ServiceWorkerDispatcherHost::OnSetHostedVersionId(int provider_id,
int64_t version_id,
int embedded_worker_id) {

Powered by Google App Engine
This is Rietveld 408576698