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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 enum class EventType { | 76 enum class EventType { |
77 ACTIVATE, | 77 ACTIVATE, |
78 INSTALL, | 78 INSTALL, |
79 FETCH, | 79 FETCH, |
80 SYNC, | 80 SYNC, |
81 NOTIFICATION_CLICK, | 81 NOTIFICATION_CLICK, |
82 PUSH, | 82 PUSH, |
83 GEOFENCING, | 83 GEOFENCING, |
84 SERVICE_PORT_CONNECT, | 84 SERVICE_PORT_CONNECT, |
85 MESSAGE, | 85 MESSAGE, |
| 86 NOTIFICATION_CLOSE, |
86 // Add new events to record here. | 87 // Add new events to record here. |
87 | 88 |
88 NUM_TYPES | 89 NUM_TYPES |
89 }; | 90 }; |
90 | 91 |
91 // Used for UMA. Append only. | 92 // Used for UMA. Append only. |
92 enum class Site { OTHER, NEW_TAB_PAGE, NUM_TYPES }; | 93 enum class Site { OTHER, NEW_TAB_PAGE, NUM_TYPES }; |
93 | 94 |
94 // Converts an event type to a string. Used for tracing. | 95 // Converts an event type to a string. Used for tracing. |
95 static const char* EventTypeToString(EventType event_type); | 96 static const char* EventTypeToString(EventType event_type); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 // previous event ended). | 178 // previous event ended). |
178 static void RecordTimeBetweenEvents(const base::TimeDelta& time); | 179 static void RecordTimeBetweenEvents(const base::TimeDelta& time); |
179 | 180 |
180 private: | 181 private: |
181 DISALLOW_IMPLICIT_CONSTRUCTORS(ServiceWorkerMetrics); | 182 DISALLOW_IMPLICIT_CONSTRUCTORS(ServiceWorkerMetrics); |
182 }; | 183 }; |
183 | 184 |
184 } // namespace content | 185 } // namespace content |
185 | 186 |
186 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_METRICS_H_ | 187 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_METRICS_H_ |
OLD | NEW |