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

Side by Side Diff: google_apis/gcm/engine/instance_id_delete_token_request_handler.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_INSTANCE_ID_DELETE_TOKEN_REQUEST_HANDLER_H_ 5 #ifndef GOOGLE_APIS_GCM_ENGINE_INSTANCE_ID_DELETE_TOKEN_REQUEST_HANDLER_H_
6 #define GOOGLE_APIS_GCM_ENGINE_INSTANCE_ID_DELETE_TOKEN_REQUEST_HANDLER_H_ 6 #define GOOGLE_APIS_GCM_ENGINE_INSTANCE_ID_DELETE_TOKEN_REQUEST_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "google_apis/gcm/engine/unregistration_request.h" 10 #include "google_apis/gcm/engine/unregistration_request.h"
11 11
12 namespace gcm { 12 namespace gcm {
13 13
14 // Provides custom logic to handle DeleteToken request for InstanceID. 14 // Provides custom logic to handle DeleteToken request for InstanceID.
15 class GCM_EXPORT InstanceIDDeleteTokenRequestHandler : 15 class GCM_EXPORT InstanceIDDeleteTokenRequestHandler :
16 public UnregistrationRequest::CustomRequestHandler { 16 public UnregistrationRequest::CustomRequestHandler {
17 public: 17 public:
18 InstanceIDDeleteTokenRequestHandler( 18 InstanceIDDeleteTokenRequestHandler(
19 const std::string& instance_id, 19 const std::string& instance_id,
20 const std::string& authorized_entity, 20 const std::string& authorized_entity,
21 const std::string& scope, 21 const std::string& scope,
22 int gcm_version); 22 int gcm_version);
23 ~InstanceIDDeleteTokenRequestHandler() override; 23 ~InstanceIDDeleteTokenRequestHandler() override;
24 24
25 // UnregistrationRequest overrides: 25 // UnregistrationRequest overrides:
26 void BuildRequestBody(std::string* body) override; 26 void BuildRequestBody(std::string* body) override;
27 UnregistrationRequest::Status ParseResponse( 27 UnregistrationRequest::Status ParseResponse(
28 const net::URLFetcher* source) override; 28 const net::URLFetcher* source) override;
29 void ReportUMAs(UnregistrationRequest::Status status,
30 int retry_count,
31 base::TimeDelta complete_time) override;
29 32
30 private: 33 private:
31 std::string instance_id_; 34 std::string instance_id_;
32 std::string authorized_entity_; 35 std::string authorized_entity_;
33 std::string scope_; 36 std::string scope_;
34 int gcm_version_; 37 int gcm_version_;
35 38
36 DISALLOW_COPY_AND_ASSIGN(InstanceIDDeleteTokenRequestHandler); 39 DISALLOW_COPY_AND_ASSIGN(InstanceIDDeleteTokenRequestHandler);
37 }; 40 };
38 41
39 } // namespace gcm 42 } // namespace gcm
40 43
41 #endif // GOOGLE_APIS_GCM_ENGINE_INSTANCE_ID_DELETE_TOKEN_REQUEST_HANDLER_H_ 44 #endif // GOOGLE_APIS_GCM_ENGINE_INSTANCE_ID_DELETE_TOKEN_REQUEST_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698