| Index: google_apis/gcm/engine/gcm_unregistration_request_handler.cc
|
| diff --git a/google_apis/gcm/engine/gcm_unregistration_request_handler.cc b/google_apis/gcm/engine/gcm_unregistration_request_handler.cc
|
| index 86f473b708855b7838b673b3a5f2a99c939f342c..5d37382c3ed6b2f904fbf26e4aa3086850776469 100644
|
| --- a/google_apis/gcm/engine/gcm_unregistration_request_handler.cc
|
| +++ b/google_apis/gcm/engine/gcm_unregistration_request_handler.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "google_apis/gcm/engine/gcm_unregistration_request_handler.h"
|
|
|
| +#include "base/metrics/histogram.h"
|
| #include "google_apis/gcm/base/gcm_util.h"
|
| #include "net/url_request/url_fetcher.h"
|
|
|
| @@ -65,4 +66,20 @@ UnregistrationRequest::Status GCMUnregistrationRequestHandler::ParseResponse(
|
| return UnregistrationRequest::RESPONSE_PARSING_FAILED;
|
| }
|
|
|
| +void GCMUnregistrationRequestHandler::ReportUMAs(
|
| + UnregistrationRequest::Status status,
|
| + int retry_count,
|
| + base::TimeDelta complete_time) {
|
| + UMA_HISTOGRAM_ENUMERATION("GCM.UnregistrationRequestStatus",
|
| + status,
|
| + UnregistrationRequest::UNREGISTRATION_STATUS_COUNT);
|
| +
|
| + // Other UMAs are only reported when the request succeeds.
|
| + if (status != UnregistrationRequest::SUCCESS)
|
| + return;
|
| +
|
| + UMA_HISTOGRAM_COUNTS("GCM.UnregistrationRetryCount", retry_count);
|
| + UMA_HISTOGRAM_TIMES("GCM.UnregistrationCompleteTime", complete_time);
|
| +}
|
| +
|
| } // namespace gcm
|
|
|