Chromium Code Reviews| Index: google_apis/gcm/engine/instance_id_get_token_request_handler.cc |
| diff --git a/google_apis/gcm/engine/instance_id_get_token_request_handler.cc b/google_apis/gcm/engine/instance_id_get_token_request_handler.cc |
| index ebf6279af0502682268c1c681125e51cb111cb3d..ad7922732c28f792f259dbf53ee811b6473faeaf 100644 |
| --- a/google_apis/gcm/engine/instance_id_get_token_request_handler.cc |
| +++ b/google_apis/gcm/engine/instance_id_get_token_request_handler.cc |
| @@ -4,6 +4,7 @@ |
| #include "google_apis/gcm/engine/instance_id_get_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_request_context_getter.h" |
| @@ -53,4 +54,20 @@ void InstanceIDGetTokenRequestHandler::BuildRequestBody(std::string* body){ |
| BuildFormEncoding(kSubtypeKey, authorized_entity_, body); |
| } |
| +void InstanceIDGetTokenRequestHandler::ReportUMAs( |
| + RegistrationRequest::Status status, |
| + int retry_count, |
| + base::TimeDelta complete_time) { |
| + UMA_HISTOGRAM_ENUMERATION("InstanceID.GetTokenRequestStatus", |
| + status, |
| + RegistrationRequest::STATUS_COUNT); |
| + |
| + // Other UMAs are only reported when the request succeeds. |
| + if (status != RegistrationRequest::SUCCESS) |
| + return; |
| + |
| + UMA_HISTOGRAM_COUNTS("InstanceID.GetTokenRetryCount", retry_count); |
| + UMA_HISTOGRAM_TIMES("InstanceID.GetTokenCompleteTime", complete_time); |
|
Alexei Svitkine (slow)
2015/06/04 18:59:32
Nit: Suggest putting an extra delimiter in all of
jianli
2015/06/04 20:50:22
Done.
|
| +} |
| + |
| } // namespace gcm |