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

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

Issue 1579413004: Move push event dispatching out of ServiceWorkerVersion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hopefully correct tests Created 4 years, 11 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_version.h
diff --git a/content/browser/service_worker/service_worker_version.h b/content/browser/service_worker/service_worker_version.h
index 2b7009d48d6e57f74dcb814e85136822c1270c88..c8b2505652302bdfad41c74dc6a49ec9f9fe9578 100644
--- a/content/browser/service_worker/service_worker_version.h
+++ b/content/browser/service_worker/service_worker_version.h
@@ -272,14 +272,6 @@ class CONTENT_EXPORT ServiceWorkerVersion
const PlatformNotificationData& notification_data,
int action_index);
- // Sends push event to the associated embedded worker and asynchronously calls
- // |callback| when it errors out or it gets a response from the worker to
- // notify completion.
- //
- // This must be called when the status() is ACTIVATED.
- void DispatchPushEvent(const StatusCallback& callback,
- const std::string& data);
-
// Sends a cross origin message event to the associated embedded worker and
// asynchronously calls |callback| when the message was sent (or failed to
// sent).
@@ -406,7 +398,6 @@ class CONTENT_EXPORT ServiceWorkerVersion
REQUEST_INSTALL,
REQUEST_FETCH,
REQUEST_NOTIFICATION_CLICK,
- REQUEST_PUSH,
REQUEST_CUSTOM,
NUM_REQUEST_TYPES
};
@@ -568,8 +559,6 @@ class CONTENT_EXPORT ServiceWorkerVersion
ServiceWorkerFetchEventResult result,
const ServiceWorkerResponse& response);
void OnNotificationClickEventFinished(int request_id);
- void OnPushEventFinished(int request_id,
- blink::WebServiceWorkerEventResult result);
void OnOpenWindow(int request_id, GURL url);
void OnOpenWindowFinished(int request_id,
ServiceWorkerStatusCode status,
@@ -698,7 +687,6 @@ class CONTENT_EXPORT ServiceWorkerVersion
IDMap<PendingRequest<FetchCallback>, IDMapOwnPointer> fetch_requests_;
IDMap<PendingRequest<StatusCallback>, IDMapOwnPointer>
notification_click_requests_;
- IDMap<PendingRequest<StatusCallback>, IDMapOwnPointer> push_requests_;
IDMap<PendingRequest<StatusCallback>, IDMapOwnPointer> custom_requests_;
// Stores all open connections to mojo services. Maps the service name to
@@ -820,6 +808,7 @@ bool ServiceWorkerVersion::EventResponseHandler<ResponseMessage, CallbackType>::
if (!result || received_request_id != request_id_)
return false;
+ CallbackType protect(callback_);
// Essentially same code as what IPC_MESSAGE_FORWARD expands to.
void* param = nullptr;
if (!ResponseMessage::Dispatch(&message, &callback_, this, param,

Powered by Google App Engine
This is Rietveld 408576698