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

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

Issue 2034663002: ServiceWorker: Keep the worker alive until FetchEvent.waitUntil settles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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_metrics.h
diff --git a/content/browser/service_worker/service_worker_metrics.h b/content/browser/service_worker/service_worker_metrics.h
index 9be6cdb4a5147ff15ca6a9d2c40d4e7da42ee362..d4cc56e308d918760001d477b5c5fc5ba6890fe3 100644
--- a/content/browser/service_worker/service_worker_metrics.h
+++ b/content/browser/service_worker/service_worker_metrics.h
@@ -80,6 +80,13 @@ class ServiceWorkerMetrics {
};
// Used for UMA. Append-only.
+ // This class is used to indicate which event is fired/finished. Most events
+ // have only one request that starts the event and one response that finishes
+ // the event, but the fetch and the foreign fetch event have two responses, so
+ // there are two types of EventType to break down the measurement into two:
+ // FETCH/FOREIGN_FETCH and FETCH_WAITUNTIL/FOREIGN_FETCH_WAITUNTIL.
+ // Moreover, FETCH is separated into the four: MAIN_FRAME, SUB_FRAME,
+ // SHARED_WORKER and SUB_RESOURCE for more detailed UMA.
enum class EventType {
ACTIVATE = 0,
INSTALL = 1,
@@ -97,6 +104,8 @@ class ServiceWorkerMetrics {
FETCH_SUB_RESOURCE = 13,
UNKNOWN = 14, // Used when event type is not known.
FOREIGN_FETCH = 15,
+ FETCH_WAITUNTIL = 16,
+ FOREIGN_FETCH_WAITUNTIL = 17,
// Add new events to record here.
NUM_TYPES
};

Powered by Google App Engine
This is Rietveld 408576698