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

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

Issue 1098953005: ServiceWorker: Add UMA for Activate and Install event results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typo Created 5 years, 8 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 #include "content/browser/service_worker/service_worker_metrics.h" 5 #include "content/browser/service_worker/service_worker_metrics.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "base/metrics/user_metrics_action.h" 8 #include "base/metrics/user_metrics_action.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "content/public/browser/content_browser_client.h" 10 #include "content/public/browser/content_browser_client.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 89
90 void ServiceWorkerMetrics::RecordStartWorkerTime(const base::TimeDelta& time, 90 void ServiceWorkerMetrics::RecordStartWorkerTime(const base::TimeDelta& time,
91 bool is_installed) { 91 bool is_installed) {
92 if (is_installed) 92 if (is_installed)
93 UMA_HISTOGRAM_MEDIUM_TIMES("ServiceWorker.StartWorker.Time", time); 93 UMA_HISTOGRAM_MEDIUM_TIMES("ServiceWorker.StartWorker.Time", time);
94 else 94 else
95 UMA_HISTOGRAM_MEDIUM_TIMES("ServiceWorker.StartNewWorker.Time", time); 95 UMA_HISTOGRAM_MEDIUM_TIMES("ServiceWorker.StartNewWorker.Time", time);
96 } 96 }
97 97
98 void ServiceWorkerMetrics::RecordActivateEventStatus(
99 ServiceWorkerStatusCode status) {
100 UMA_HISTOGRAM_ENUMERATION("ServiceWorker.ActivateEventStatus", status,
101 SERVICE_WORKER_ERROR_MAX_VALUE);
102 }
103
104 void ServiceWorkerMetrics::RecordInstallEventStatus(
105 ServiceWorkerStatusCode status) {
106 UMA_HISTOGRAM_ENUMERATION("ServiceWorker.InstallEventStatus", status,
107 SERVICE_WORKER_ERROR_MAX_VALUE);
108 }
109
98 } // namespace content 110 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_metrics.h ('k') | content/browser/service_worker/service_worker_register_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698