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

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

Issue 2027583002: service worker: Avoid starting up for activation during shutdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: maybe fix win Created 4 years, 6 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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 bool is_installed, 152 bool is_installed,
153 StartSituation start_situation); 153 StartSituation start_situation);
154 154
155 // Records the result of trying to stop a worker. 155 // Records the result of trying to stop a worker.
156 static void RecordWorkerStopped(StopStatus status); 156 static void RecordWorkerStopped(StopStatus status);
157 157
158 // Records the time taken to successfully stop a worker. 158 // Records the time taken to successfully stop a worker.
159 static void RecordStopWorkerTime(base::TimeDelta time); 159 static void RecordStopWorkerTime(base::TimeDelta time);
160 160
161 static void RecordActivateEventStatus(ServiceWorkerStatusCode status); 161 static void RecordActivateEventStatus(ServiceWorkerStatusCode status);
162 static void RecordActivateEventStatusWithShutdownStatus(
163 ServiceWorkerStatusCode status,
164 bool is_shutdown);
162 static void RecordInstallEventStatus(ServiceWorkerStatusCode status); 165 static void RecordInstallEventStatus(ServiceWorkerStatusCode status);
163 166
164 // Records how much of dispatched events are handled while a Service 167 // Records how much of dispatched events are handled while a Service
165 // Worker is awake (i.e. after it is woken up until it gets stopped). 168 // Worker is awake (i.e. after it is woken up until it gets stopped).
166 static void RecordEventHandledRatio(EventType event, 169 static void RecordEventHandledRatio(EventType event,
167 size_t handled_events, 170 size_t handled_events,
168 size_t fired_events); 171 size_t fired_events);
169 172
170 // Records how often a dispatched event times out. 173 // Records how often a dispatched event times out.
171 static void RecordEventTimeout(EventType event); 174 static void RecordEventTimeout(EventType event);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 static void RecordStartStatusAfterFailure(int failure_count, 224 static void RecordStartStatusAfterFailure(int failure_count,
222 ServiceWorkerStatusCode status); 225 ServiceWorkerStatusCode status);
223 226
224 private: 227 private:
225 DISALLOW_IMPLICIT_CONSTRUCTORS(ServiceWorkerMetrics); 228 DISALLOW_IMPLICIT_CONSTRUCTORS(ServiceWorkerMetrics);
226 }; 229 };
227 230
228 } // namespace content 231 } // namespace content
229 232
230 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_METRICS_H_ 233 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_METRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698