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

Side by Side Diff: google_apis/gcm/engine/unregistration_request.h

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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GOOGLE_APIS_GCM_ENGINE_UNREGISTRATION_REQUEST_H_ 5 #ifndef GOOGLE_APIS_GCM_ENGINE_UNREGISTRATION_REQUEST_H_
6 #define GOOGLE_APIS_GCM_ENGINE_UNREGISTRATION_REQUEST_H_ 6 #define GOOGLE_APIS_GCM_ENGINE_UNREGISTRATION_REQUEST_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 virtual ~CustomRequestHandler(); 79 virtual ~CustomRequestHandler();
80 80
81 // Builds the HTTP request body data. It is called after 81 // Builds the HTTP request body data. It is called after
82 // UnregistrationRequest::BuildRequestBody to append more custom info to 82 // UnregistrationRequest::BuildRequestBody to append more custom info to
83 // |body|. Note that the request body is encoded in HTTP form format. 83 // |body|. Note that the request body is encoded in HTTP form format.
84 virtual void BuildRequestBody(std::string* body) = 0; 84 virtual void BuildRequestBody(std::string* body) = 0;
85 85
86 // Parses the HTTP response. It is called after 86 // Parses the HTTP response. It is called after
87 // UnregistrationRequest::ParseResponse to proceed the parsing. 87 // UnregistrationRequest::ParseResponse to proceed the parsing.
88 virtual Status ParseResponse(const net::URLFetcher* source) = 0; 88 virtual Status ParseResponse(const net::URLFetcher* source) = 0;
89
90 // Reports various UMAs, including status, retry count and completion time.
91 virtual void ReportUMAs(Status status,
92 int retry_count,
93 base::TimeDelta complete_time) = 0;
89 }; 94 };
90 95
91 // Creates an instance of UnregistrationRequest. |callback| will be called 96 // Creates an instance of UnregistrationRequest. |callback| will be called
92 // once registration has been revoked or there has been an error that makes 97 // once registration has been revoked or there has been an error that makes
93 // further retries pointless. 98 // further retries pointless.
94 UnregistrationRequest( 99 UnregistrationRequest(
95 const GURL& registration_url, 100 const GURL& registration_url,
96 const RequestInfo& request_info, 101 const RequestInfo& request_info,
97 scoped_ptr<CustomRequestHandler> custom_request_handler, 102 scoped_ptr<CustomRequestHandler> custom_request_handler,
98 const net::BackoffEntry::Policy& backoff_policy, 103 const net::BackoffEntry::Policy& backoff_policy,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 GCMStatsRecorder* recorder_; 135 GCMStatsRecorder* recorder_;
131 136
132 base::WeakPtrFactory<UnregistrationRequest> weak_ptr_factory_; 137 base::WeakPtrFactory<UnregistrationRequest> weak_ptr_factory_;
133 138
134 DISALLOW_COPY_AND_ASSIGN(UnregistrationRequest); 139 DISALLOW_COPY_AND_ASSIGN(UnregistrationRequest);
135 }; 140 };
136 141
137 } // namespace gcm 142 } // namespace gcm
138 143
139 #endif // GOOGLE_APIS_GCM_ENGINE_UNREGISTRATION_REQUEST_H_ 144 #endif // GOOGLE_APIS_GCM_ENGINE_UNREGISTRATION_REQUEST_H_
OLDNEW
« no previous file with comments | « google_apis/gcm/engine/registration_request.cc ('k') | google_apis/gcm/engine/unregistration_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698