Chromium Code Reviews| 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 52f471cd3d3774ca5c2170c1495170840924b857..4fb0e66e28d5e44e784e76400266a3c5d2034782 100644 |
| --- a/content/browser/service_worker/service_worker_metrics.h |
| +++ b/content/browser/service_worker/service_worker_metrics.h |
| @@ -73,6 +73,13 @@ class ServiceWorkerMetrics { |
| NUM_STOP_STATUS_TYPES |
| }; |
| + enum EventType { |
| + EVENT_TYPE_FETCH, |
| + // Add new events to record here. |
| + |
| + NUM_EVENT_TYPES |
| + }; |
| + |
| // Used for ServiceWorkerDiskCache. |
| static void CountInitDiskCacheResult(bool result); |
| static void CountReadResponseResult(ReadResponseResult result); |
| @@ -110,9 +117,12 @@ class ServiceWorkerMetrics { |
| static void RecordActivateEventStatus(ServiceWorkerStatusCode status); |
| static void RecordInstallEventStatus(ServiceWorkerStatusCode status); |
| - // Records the ratio of unhandled events to the all events fired during |
| - // the lifetime of ServiceWorker. |
| - static void RecordEventStatus(size_t fired_events, size_t handled_events); |
| + // Records how much of dispatched events is handled while a Service |
|
falken
2015/07/03 04:45:00
I think it's "are handled"
kinuko
2015/07/05 09:19:04
Done.
|
| + // Worker is awake (i.e. after it is woken up until it gets stopped). |
| + static void RecordEventHandledRatio(const GURL& scope, |
| + EventType event, |
| + size_t handled_events, |
| + size_t fired_events); |
| // Records the result of dispatching a fetch event to a service worker. |
| static void RecordFetchEventStatus(bool is_main_resource, |