Index: google_apis/gcm/engine/instance_id_delete_token_request_handler.cc |
diff --git a/google_apis/gcm/engine/instance_id_delete_token_request_handler.cc b/google_apis/gcm/engine/instance_id_delete_token_request_handler.cc |
index 2ee47132b2171dcac2988e9ad7ffb9e2504a3dfe..82de88a967bbade192aa65dc026fe280c21bb054 100644 |
--- a/google_apis/gcm/engine/instance_id_delete_token_request_handler.cc |
+++ b/google_apis/gcm/engine/instance_id_delete_token_request_handler.cc |
@@ -4,6 +4,7 @@ |
#include "google_apis/gcm/engine/instance_id_delete_token_request_handler.h" |
+#include "base/metrics/histogram.h" |
#include "base/strings/string_number_conversions.h" |
#include "google_apis/gcm/base/gcm_util.h" |
#include "net/url_request/url_fetcher.h" |
@@ -66,4 +67,20 @@ InstanceIDDeleteTokenRequestHandler::ParseResponse( |
return UnregistrationRequest::SUCCESS; |
} |
+void InstanceIDDeleteTokenRequestHandler::ReportUMAs( |
+ UnregistrationRequest::Status status, |
+ int retry_count, |
+ base::TimeDelta complete_time) { |
+ UMA_HISTOGRAM_ENUMERATION("InstanceID.DeleteToken.RequestStatus", |
+ status, |
+ UnregistrationRequest::UNREGISTRATION_STATUS_COUNT); |
+ |
+ // Other UMAs are only reported when the request succeeds. |
+ if (status != UnregistrationRequest::SUCCESS) |
+ return; |
+ |
+ UMA_HISTOGRAM_COUNTS("InstanceID.DeleteToken.RetryCount", retry_count); |
+ UMA_HISTOGRAM_TIMES("InstanceID.DeleteToken.CompleteTime", complete_time); |
+} |
+ |
} // namespace gcm |