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

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

Issue 1647323002: Move activate event dispatching out of ServiceWorkerVersion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor-install-event
Patch Set: 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 4af65415479cf138a7aca1314345abccf2822705..3b52fe8ff9f2e853b694e4205add81c3ac566471 100644
--- a/content/browser/service_worker/service_worker_version.h
+++ b/content/browser/service_worker/service_worker_version.h
@@ -241,16 +241,6 @@ class CONTENT_EXPORT ServiceWorkerVersion
const std::vector<TransferredMessagePort>& sent_message_ports,
const StatusCallback& callback);
- // Sends activate event to the associated embedded worker and asynchronously
- // calls |callback| when it errors out or it gets a response from the worker
- // to notify activation completion.
- //
- // This must be called when the status() is INSTALLED. Calling this changes
- // the version's status to ACTIVATING.
- // Upon completion, the version's status will be changed to ACTIVATED
- // on success, or back to INSTALLED on failure.
- void DispatchActivateEvent(const StatusCallback& callback);
-
// Sends fetch event to the associated embedded worker and calls
// |callback| with the response from the worker.
//
@@ -384,7 +374,6 @@ class CONTENT_EXPORT ServiceWorkerVersion
class PingController;
enum RequestType {
- REQUEST_ACTIVATE,
REQUEST_FETCH,
REQUEST_CUSTOM,
NUM_REQUEST_TYPES
@@ -525,8 +514,6 @@ class CONTENT_EXPORT ServiceWorkerVersion
void OnStartSentAndScriptEvaluated(ServiceWorkerStatusCode status);
- void DispatchActivateEventAfterStartWorker(const StatusCallback& callback);
-
void DispatchMessageEventInternal(
const base::string16& message,
const std::vector<TransferredMessagePort>& sent_message_ports,
@@ -538,8 +525,6 @@ class CONTENT_EXPORT ServiceWorkerVersion
void OnGetClients(int request_id,
const ServiceWorkerClientQueryOptions& options);
- void OnActivateEventFinished(int request_id,
- blink::WebServiceWorkerEventResult result);
void OnFetchEventFinished(int request_id,
ServiceWorkerFetchEventResult result,
const ServiceWorkerResponse& response);
@@ -668,7 +653,6 @@ class CONTENT_EXPORT ServiceWorkerVersion
// Message callbacks. (Update HasInflightRequests() too when you update this
// list.)
- IDMap<PendingRequest<StatusCallback>, IDMapOwnPointer> activate_requests_;
IDMap<PendingRequest<FetchCallback>, IDMapOwnPointer> fetch_requests_;
IDMap<PendingRequest<StatusCallback>, IDMapOwnPointer> custom_requests_;

Powered by Google App Engine
This is Rietveld 408576698