| 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 1506fcbb4ad3421cbabcaea7d490571db50eae40..11522bd3324e680dff54bd659127ec6f12402fed 100644
|
| --- a/content/browser/service_worker/service_worker_metrics.h
|
| +++ b/content/browser/service_worker/service_worker_metrics.h
|
| @@ -136,6 +136,9 @@ class ServiceWorkerMetrics {
|
| // Converts an event type to a string. Used for tracing.
|
| static const char* EventTypeToString(EventType event_type);
|
|
|
| + // Returns true when the event is for a navigation hint.
|
| + static bool IsNavigationHintEvent(EventType event_type);
|
| +
|
| // Excludes NTP scope from UMA for now as it tends to dominate the stats and
|
| // makes the results largely skewed. Some metrics don't follow this policy
|
| // and hence don't call this function.
|
| @@ -198,6 +201,13 @@ class ServiceWorkerMetrics {
|
| size_t handled_events,
|
| size_t fired_events);
|
|
|
| + // Records the precision of the speculative launch of Service Workers for
|
| + // each navigation hint type when the worker is stopped. If there was no
|
| + // main/sub frame fetch event fired on the worker, |frame_fetch_event_fired|
|
| + // is false. This means that the speculative launch wasn't helpful.
|
| + static void RecordNavigationHintPrecision(EventType start_worker_purpose,
|
| + bool frame_fetch_event_fired);
|
| +
|
| // Records how often a dispatched event times out.
|
| static void RecordEventTimeout(EventType event);
|
|
|
|
|