OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef GOOGLE_APIS_GCM_ENGINE_INSTANCE_ID_DELETE_TOKEN_REQUEST_H_ |
| 6 #define GOOGLE_APIS_GCM_ENGINE_INSTANCE_ID_DELETE_TOKEN_REQUEST_H_ |
| 7 |
| 8 #include "google_apis/gcm/engine/unregistration_request.h" |
| 9 |
| 10 namespace gcm { |
| 11 |
| 12 // Used to revoke a token based on Instance ID. |
| 13 class GCM_EXPORT InstanceIDDeleteTokenRequest : public UnregistrationRequest { |
| 14 public: |
| 15 // Additional info for DeleteToken requests of InstanceID. |
| 16 struct GCM_EXPORT ExtraRequestInfo { |
| 17 ExtraRequestInfo(const std::string& instance_id, |
| 18 const std::string& authorized_entity, |
| 19 const std::string& scope, |
| 20 int gcm_version); |
| 21 ~ExtraRequestInfo(); |
| 22 |
| 23 std::string instance_id; |
| 24 std::string authorized_entity; |
| 25 std::string scope; |
| 26 int gcm_version; |
| 27 }; |
| 28 |
| 29 InstanceIDDeleteTokenRequest( |
| 30 const GURL& registration_url, |
| 31 const RequestInfo& request_info, |
| 32 const ExtraRequestInfo& extra_request_info, |
| 33 const net::BackoffEntry::Policy& backoff_policy, |
| 34 const UnregistrationCallback& callback, |
| 35 scoped_refptr<net::URLRequestContextGetter> request_context_getter, |
| 36 GCMStatsRecorder* recorder); |
| 37 ~InstanceIDDeleteTokenRequest() override; |
| 38 |
| 39 // UnregistrationRequest overrides: |
| 40 void BuildRequestBody(std::string* body) override; |
| 41 bool ParseResponse(const net::URLFetcher* source, |
| 42 UnregistrationRequest::Status* status) override; |
| 43 |
| 44 private: |
| 45 ExtraRequestInfo extra_request_info_; |
| 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(InstanceIDDeleteTokenRequest); |
| 48 }; |
| 49 |
| 50 } // namespace gcm |
| 51 |
| 52 #endif // GOOGLE_APIS_GCM_ENGINE_INSTANCE_ID_DELETE_TOKEN_REQUEST_H_ |
OLD | NEW |