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

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: Add an inline comment 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..d7de003b42bfa2366da1bf67051f4b570a93d976 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
+ // has only one request to start event and one response to finish event, but
falken 2016/06/22 01:27:31 grammar nit: "events has" -> "events have", "reque
shimazu 2016/06/22 05:41:27 Done.
+ // 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