OLD | NEW |
---|---|
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 Loading... | |
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_ |
OLD | NEW |