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

Unified Diff: google_apis/gcm/engine/unregistration_request.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/unregistration_request.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gcm/engine/unregistration_request.cc
diff --git a/google_apis/gcm/engine/unregistration_request.cc b/google_apis/gcm/engine/unregistration_request.cc
index 931a5e9479cd8283c5d7c85ec473e402ed80b6ab..bb68c72c09c4e637aa823ff8057dd01818bc3437 100644
--- a/google_apis/gcm/engine/unregistration_request.cc
+++ b/google_apis/gcm/engine/unregistration_request.cc
@@ -6,7 +6,6 @@
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
-#include "base/metrics/histogram.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_piece.h"
#include "base/values.h"
@@ -169,9 +168,13 @@ void UnregistrationRequest::OnURLFetchComplete(const net::URLFetcher* source) {
UnregistrationRequest::Status status = ParseResponse(source);
DVLOG(1) << "UnregistrationRequestStauts: " << status;
- UMA_HISTOGRAM_ENUMERATION("GCM.UnregistrationRequestStatus",
- status,
- UNREGISTRATION_STATUS_COUNT);
+
+ DCHECK(custom_request_handler_.get());
+ custom_request_handler_->ReportUMAs(
+ status,
+ backoff_entry_.failure_count(),
+ base::TimeTicks::Now() - request_start_time_);
+
recorder_->RecordUnregistrationResponse(request_info_.app_id, status);
if (status == URL_FETCHING_FAILED ||
@@ -186,13 +189,6 @@ void UnregistrationRequest::OnURLFetchComplete(const net::URLFetcher* source) {
// status == SUCCESS || HTTP_NOT_OK || NO_RESPONSE_BODY ||
// INVALID_PARAMETERS || UNKNOWN_ERROR
- if (status == SUCCESS) {
- UMA_HISTOGRAM_COUNTS("GCM.UnregistrationRetryCount",
- backoff_entry_.failure_count());
- UMA_HISTOGRAM_TIMES("GCM.UnregistrationCompleteTime",
- base::TimeTicks::Now() - request_start_time_);
- }
-
callback_.Run(status);
}
« no previous file with comments | « google_apis/gcm/engine/unregistration_request.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698