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

Unified Diff: google_apis/gcm/engine/connection_event_tracker.cc

Issue 2594373002: Add PendingEvents UMA to ConnectionEventTracker shutdown. (Closed)
Patch Set: Renamed histogram and nits Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gcm/engine/connection_event_tracker.cc
diff --git a/google_apis/gcm/engine/connection_event_tracker.cc b/google_apis/gcm/engine/connection_event_tracker.cc
index d8c3313135f23abc256bb807c1b535449a61d483..50a5ecdcc4c762400cd2316876da190991c49de4 100644
--- a/google_apis/gcm/engine/connection_event_tracker.cc
+++ b/google_apis/gcm/engine/connection_event_tracker.cc
@@ -4,6 +4,7 @@
#include "google_apis/gcm/engine/connection_event_tracker.h"
+#include "base/metrics/histogram_macros.h"
#include "base/time/time.h"
#include "net/base/network_change_notifier.h"
@@ -19,7 +20,10 @@ namespace gcm {
ConnectionEventTracker::ConnectionEventTracker() = default;
-ConnectionEventTracker::~ConnectionEventTracker() = default;
+ConnectionEventTracker::~ConnectionEventTracker() {
+ UMA_HISTOGRAM_ENUMERATION("GCM.PendingConnectionEventsAtShutdown",
+ completed_events_.size(), kMaxClientEvents + 1);
+}
void ConnectionEventTracker::StartConnectionAttempt() {
// TODO(harkness): Can we dcheck here that there is not an in progress
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698