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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // Records the result of trying to start a worker. |is_installed| indicates | 55 // Records the result of trying to start a worker. |is_installed| indicates |
56 // whether the version has been installed. | 56 // whether the version has been installed. |
57 static void RecordStartWorkerStatus(ServiceWorkerStatusCode status, | 57 static void RecordStartWorkerStatus(ServiceWorkerStatusCode status, |
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); |
| 66 static void RecordInstallEventStatus(ServiceWorkerStatusCode status); |
| 67 |
65 private: | 68 private: |
66 DISALLOW_IMPLICIT_CONSTRUCTORS(ServiceWorkerMetrics); | 69 DISALLOW_IMPLICIT_CONSTRUCTORS(ServiceWorkerMetrics); |
67 }; | 70 }; |
68 | 71 |
69 } // namespace content | 72 } // namespace content |
70 | 73 |
71 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_METRICS_H_ | 74 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_METRICS_H_ |
OLD | NEW |