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

Unified Diff: google_apis/gcm/engine/registration_request.cc

Issue 165903002: Add 3 more registartion status codes for UMA collection. Also added tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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
Index: google_apis/gcm/engine/registration_request.cc
diff --git a/google_apis/gcm/engine/registration_request.cc b/google_apis/gcm/engine/registration_request.cc
index f0de831545c6260a203e91816f4a042431d86e85..1cfb3352b5957e231ece8568208b9d2aea7c373c 100644
--- a/google_apis/gcm/engine/registration_request.cc
+++ b/google_apis/gcm/engine/registration_request.cc
@@ -183,6 +183,10 @@ void RegistrationRequest::OnURLFetchComplete(const net::URLFetcher* source) {
LOG(ERROR) << "Failed to get registration response: "
<< source->GetStatus().is_success() << " "
<< source->GetResponseCode();
+ RecordRegistrationStatusToUMA(
+ (!source->GetStatus().is_success() ? URL_FETCHING_FAILED :
fgorski 2014/02/14 06:18:04 Do you need that extra pair of braces?
jianli 2014/02/14 18:11:44 Double conditional statements seem to be bad for c
jianli 2014/02/14 18:14:18 I forgot to add LOG(ERROR) logic. Please also add
fgorski 2014/02/14 18:29:52 given that token is empty when you don't set it yo
juyik 2014/02/18 20:11:01 Done.
+ source->GetResponseCode() != net::HTTP_OK ? HTTP_NOT_OK :
+ RESPONSE_PARSING_FAILED));
RetryWithBackoff(true);
return;
}

Powered by Google App Engine
This is Rietveld 408576698