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

Side by Side Diff: content/browser/service_worker/service_worker_metrics.h

Issue 1133853007: Add UMA to record the ratio of how many fetch events are not handled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_METRICS_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_METRICS_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_METRICS_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_METRICS_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "content/browser/service_worker/service_worker_database.h" 9 #include "content/browser/service_worker/service_worker_database.h"
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 bool is_installed); 58 bool is_installed);
59 59
60 // Records the time taken to successfully start a worker. |is_installed| 60 // Records the time taken to successfully start a worker. |is_installed|
61 // indicates whether the version has been installed. 61 // indicates whether the version has been installed.
62 static void RecordStartWorkerTime(const base::TimeDelta& time, 62 static void RecordStartWorkerTime(const base::TimeDelta& time,
63 bool is_installed); 63 bool is_installed);
64 64
65 static void RecordActivateEventStatus(ServiceWorkerStatusCode status); 65 static void RecordActivateEventStatus(ServiceWorkerStatusCode status);
66 static void RecordInstallEventStatus(ServiceWorkerStatusCode status); 66 static void RecordInstallEventStatus(ServiceWorkerStatusCode status);
67 67
68 // Records the ratio of unhandled events to the all events fired during
69 // the lifetime of ServiceWorker.
70 static void RecordEventStatus(unsigned int fired_events,
Alexei Svitkine (slow) 2015/05/14 17:49:59 Nit: Chromium style doesn't usually use unsigned i
kinuko 2015/05/15 00:05:37 Chromium guide says following sentence, is that wh
71 unsigned int handled_events);
72
68 private: 73 private:
69 DISALLOW_IMPLICIT_CONSTRUCTORS(ServiceWorkerMetrics); 74 DISALLOW_IMPLICIT_CONSTRUCTORS(ServiceWorkerMetrics);
70 }; 75 };
71 76
72 } // namespace content 77 } // namespace content
73 78
74 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_METRICS_H_ 79 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_METRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698