| 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
|
|
|