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

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

Issue 1167753002: Add more UMAs for Instance ID (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address more feedback Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « google_apis/gcm/engine/gcm_registration_request_handler.h ('k') | google_apis/gcm/engine/gcm_store_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gcm/engine/gcm_registration_request_handler.cc
diff --git a/google_apis/gcm/engine/gcm_registration_request_handler.cc b/google_apis/gcm/engine/gcm_registration_request_handler.cc
index c0213f3cb066a6ea2320a9753bbae40bba8f360d..9533165d66b6f3206e53f93ab1ab6588887c9fe5 100644
--- a/google_apis/gcm/engine/gcm_registration_request_handler.cc
+++ b/google_apis/gcm/engine/gcm_registration_request_handler.cc
@@ -4,6 +4,7 @@
#include "google_apis/gcm/engine/gcm_registration_request_handler.h"
+#include "base/metrics/histogram.h"
#include "google_apis/gcm/base/gcm_util.h"
namespace gcm {
@@ -26,4 +27,20 @@ void GCMRegistrationRequestHandler::BuildRequestBody(std::string* body){
BuildFormEncoding(kSenderKey, senders_, body);
}
+void GCMRegistrationRequestHandler::ReportUMAs(
+ RegistrationRequest::Status status,
+ int retry_count,
+ base::TimeDelta complete_time) {
+ UMA_HISTOGRAM_ENUMERATION("GCM.RegistrationRequestStatus",
+ status,
+ RegistrationRequest::STATUS_COUNT);
+
+ // Other UMAs are only reported when the request succeeds.
+ if (status != RegistrationRequest::SUCCESS)
+ return;
+
+ UMA_HISTOGRAM_COUNTS("GCM.RegistrationRetryCount", retry_count);
+ UMA_HISTOGRAM_TIMES("GCM.RegistrationCompleteTime", complete_time);
+}
+
} // namespace gcm
« no previous file with comments | « google_apis/gcm/engine/gcm_registration_request_handler.h ('k') | google_apis/gcm/engine/gcm_store_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698