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

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

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
« no previous file with comments | « no previous file | google_apis/gcm/engine/registration_request.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gcm/engine/registration_request.h
diff --git a/google_apis/gcm/engine/registration_request.h b/google_apis/gcm/engine/registration_request.h
index 293635001a6f326675ddfbf89d1e18eacf96bcda..40334d0e671946cb896b55c10196b68dd338de31 100644
--- a/google_apis/gcm/engine/registration_request.h
+++ b/google_apis/gcm/engine/registration_request.h
@@ -40,6 +40,9 @@ class GCM_EXPORT RegistrationRequest : public net::URLFetcherDelegate {
AUTHENTICATION_FAILED, // Authentication failed.
DEVICE_REGISTRATION_ERROR, // Chrome is not properly registered.
UNKNOWN_ERROR, // Unknown error.
+ URL_FETCHING_FAILED, // URL fetching failed.
+ HTTP_NOT_OK, // HTTP status was not OK.
+ RESPONSE_PARSING_FAILED, // Registration response parsing failed.
// NOTE: always keep this entry at the end. Add new status types only
// immediately above this line. Make sure to update the corresponding
// histogram enum accordingly.
@@ -91,6 +94,10 @@ class GCM_EXPORT RegistrationRequest : public net::URLFetcherDelegate {
// failure, when |update_backoff| is true.
void RetryWithBackoff(bool update_backoff);
+ // Parse the response returned by the URL fetcher into token, and returns the
+ // status.
+ Status ParseResponse(const net::URLFetcher* source, std::string* token);
+
RegistrationCallback callback_;
RequestInfo request_info_;
« no previous file with comments | « no previous file | google_apis/gcm/engine/registration_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698