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

Side by Side Diff: google_apis/gcm/engine/registration_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_REGISTRATION_REQUEST_H_ 5 #ifndef GOOGLE_APIS_GCM_ENGINE_REGISTRATION_REQUEST_H_
6 #define GOOGLE_APIS_GCM_ENGINE_REGISTRATION_REQUEST_H_ 6 #define GOOGLE_APIS_GCM_ENGINE_REGISTRATION_REQUEST_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // registration request. 80 // registration request.
81 class GCM_EXPORT CustomRequestHandler { 81 class GCM_EXPORT CustomRequestHandler {
82 public: 82 public:
83 CustomRequestHandler(); 83 CustomRequestHandler();
84 virtual ~CustomRequestHandler(); 84 virtual ~CustomRequestHandler();
85 85
86 // Builds the HTTP request body data. It is called after 86 // Builds the HTTP request body data. It is called after
87 // RegistrationRequest::BuildRequestBody to append more custom info to 87 // RegistrationRequest::BuildRequestBody to append more custom info to
88 // |body|. Note that the request body is encoded in HTTP form format. 88 // |body|. Note that the request body is encoded in HTTP form format.
89 virtual void BuildRequestBody(std::string* body) = 0; 89 virtual void BuildRequestBody(std::string* body) = 0;
90
91 // Reports various UMAs, including status, retry count and completion time.
92 virtual void ReportUMAs(Status status,
93 int retry_count,
94 base::TimeDelta complete_time) = 0;
90 }; 95 };
91 96
92 RegistrationRequest( 97 RegistrationRequest(
93 const GURL& registration_url, 98 const GURL& registration_url,
94 const RequestInfo& request_info, 99 const RequestInfo& request_info,
95 scoped_ptr<CustomRequestHandler> custom_request_handler, 100 scoped_ptr<CustomRequestHandler> custom_request_handler,
96 const net::BackoffEntry::Policy& backoff_policy, 101 const net::BackoffEntry::Policy& backoff_policy,
97 const RegistrationCallback& callback, 102 const RegistrationCallback& callback,
98 int max_retry_count, 103 int max_retry_count,
99 scoped_refptr<net::URLRequestContextGetter> request_context_getter, 104 scoped_refptr<net::URLRequestContextGetter> request_context_getter,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 std::string source_to_record_; 139 std::string source_to_record_;
135 140
136 base::WeakPtrFactory<RegistrationRequest> weak_ptr_factory_; 141 base::WeakPtrFactory<RegistrationRequest> weak_ptr_factory_;
137 142
138 DISALLOW_COPY_AND_ASSIGN(RegistrationRequest); 143 DISALLOW_COPY_AND_ASSIGN(RegistrationRequest);
139 }; 144 };
140 145
141 } // namespace gcm 146 } // namespace gcm
142 147
143 #endif // GOOGLE_APIS_GCM_ENGINE_REGISTRATION_REQUEST_H_ 148 #endif // GOOGLE_APIS_GCM_ENGINE_REGISTRATION_REQUEST_H_
OLDNEW
« no previous file with comments | « google_apis/gcm/engine/instance_id_get_token_request_handler.cc ('k') | google_apis/gcm/engine/registration_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698