| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 // Used for UMA. Append-only. | 75 // Used for UMA. Append-only. |
| 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 NOTIFICATION_CLOSE, |
| 85 // Add new events to record here. | 86 // Add new events to record here. |
| 86 | 87 |
| 87 NUM_TYPES | 88 NUM_TYPES |
| 88 }; | 89 }; |
| 89 | 90 |
| 90 // Used for UMA. Append only. | 91 // Used for UMA. Append only. |
| 91 enum class Site { OTHER, NEW_TAB_PAGE, NUM_TYPES }; | 92 enum class Site { OTHER, NEW_TAB_PAGE, NUM_TYPES }; |
| 92 | 93 |
| 93 // Excludes NTP scope from UMA for now as it tends to dominate the stats and | 94 // Excludes NTP scope from UMA for now as it tends to dominate the stats and |
| 94 // makes the results largely skewed. Some metrics don't follow this policy | 95 // makes the results largely skewed. Some metrics don't follow this policy |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // previous event ended). | 174 // previous event ended). |
| 174 static void RecordTimeBetweenEvents(const base::TimeDelta& time); | 175 static void RecordTimeBetweenEvents(const base::TimeDelta& time); |
| 175 | 176 |
| 176 private: | 177 private: |
| 177 DISALLOW_IMPLICIT_CONSTRUCTORS(ServiceWorkerMetrics); | 178 DISALLOW_IMPLICIT_CONSTRUCTORS(ServiceWorkerMetrics); |
| 178 }; | 179 }; |
| 179 | 180 |
| 180 } // namespace content | 181 } // namespace content |
| 181 | 182 |
| 182 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_METRICS_H_ | 183 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_METRICS_H_ |
| OLD | NEW |