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

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

Issue 1799413002: ServiceWorker: Release a reference when it fails to dispatch ExtendableMessageEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_dispatch_extendable_message_event
Patch Set: Created 4 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.h
diff --git a/content/browser/service_worker/service_worker_dispatcher_host.h b/content/browser/service_worker/service_worker_dispatcher_host.h
index e1f57d02aa314e9841cef85eb2f8cc2fecd69dd3..d2c6812cd730b6688f4101c839fa5482a9ed5772 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host.h
+++ b/content/browser/service_worker/service_worker_dispatcher_host.h
@@ -88,8 +88,11 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost : public BrowserMessageFilter {
private:
friend class BrowserThread;
friend class base::DeleteHelper<ServiceWorkerDispatcherHost>;
+ friend class ServiceWorkerDispatcherHostTest;
friend class TestingServiceWorkerDispatcherHost;
+ using StatusCallback = base::Callback<void(ServiceWorkerStatusCode status)>;
+
// IPC Message handlers
void OnRegisterServiceWorker(int thread_id,
int request_id,
@@ -154,21 +157,33 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost : public BrowserMessageFilter {
void OnTerminateWorker(int handle_id);
- template <typename SourceInfo>
void DispatchExtendableMessageEvent(
scoped_refptr<ServiceWorkerVersion> worker,
const base::string16& message,
const url::Origin& source_origin,
const std::vector<TransferredMessagePort>& sent_message_ports,
+ ServiceWorkerProviderHost* sender_provider_host,
+ const StatusCallback& callback);
+ template <typename SourceInfo>
+ void DispatchExtendableMessageEventInternal(
+ scoped_refptr<ServiceWorkerVersion> worker,
+ const base::string16& message,
+ const url::Origin& source_origin,
+ const std::vector<TransferredMessagePort>& sent_message_ports,
+ const StatusCallback& callback,
const SourceInfo& source_info);
void DispatchExtendableMessageEventAfterStartWorker(
scoped_refptr<ServiceWorkerVersion> worker,
const base::string16& message,
const url::Origin& source_origin,
const std::vector<TransferredMessagePort>& sent_message_ports,
- const ExtendableMessageEventSource& source);
+ const ExtendableMessageEventSource& source,
+ const StatusCallback& callback);
+ template <typename SourceInfo>
void DidFailToDispatchExtendableMessageEvent(
const std::vector<TransferredMessagePort>& sent_message_ports,
+ const SourceInfo& source_info,
+ const StatusCallback& callback,
ServiceWorkerStatusCode status);
ServiceWorkerRegistrationHandle* FindRegistrationHandle(

Powered by Google App Engine
This is Rietveld 408576698