| Index: google_apis/gcm/engine/instance_id_delete_token_request.h
|
| diff --git a/google_apis/gcm/engine/instance_id_delete_token_request.h b/google_apis/gcm/engine/instance_id_delete_token_request.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..01ca67399edccea9f1de4630fa999afec039b816
|
| --- /dev/null
|
| +++ b/google_apis/gcm/engine/instance_id_delete_token_request.h
|
| @@ -0,0 +1,52 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef GOOGLE_APIS_GCM_ENGINE_INSTANCE_ID_DELETE_TOKEN_REQUEST_H_
|
| +#define GOOGLE_APIS_GCM_ENGINE_INSTANCE_ID_DELETE_TOKEN_REQUEST_H_
|
| +
|
| +#include "google_apis/gcm/engine/unregistration_request.h"
|
| +
|
| +namespace gcm {
|
| +
|
| +// Used to revoke a token based on Instance ID.
|
| +class GCM_EXPORT InstanceIDDeleteTokenRequest : public UnregistrationRequest {
|
| + public:
|
| + // Additional info for DeleteToken requests of InstanceID.
|
| + struct GCM_EXPORT ExtraRequestInfo {
|
| + ExtraRequestInfo(const std::string& instance_id,
|
| + const std::string& authorized_entity,
|
| + const std::string& scope,
|
| + int gcm_version);
|
| + ~ExtraRequestInfo();
|
| +
|
| + std::string instance_id;
|
| + std::string authorized_entity;
|
| + std::string scope;
|
| + int gcm_version;
|
| + };
|
| +
|
| + InstanceIDDeleteTokenRequest(
|
| + const GURL& registration_url,
|
| + const RequestInfo& request_info,
|
| + const ExtraRequestInfo& extra_request_info,
|
| + const net::BackoffEntry::Policy& backoff_policy,
|
| + const UnregistrationCallback& callback,
|
| + scoped_refptr<net::URLRequestContextGetter> request_context_getter,
|
| + GCMStatsRecorder* recorder);
|
| + ~InstanceIDDeleteTokenRequest() override;
|
| +
|
| + // UnregistrationRequest overrides:
|
| + void BuildRequestBody(std::string* body) override;
|
| + bool ParseResponse(const net::URLFetcher* source,
|
| + UnregistrationRequest::Status* status) override;
|
| +
|
| + private:
|
| + ExtraRequestInfo extra_request_info_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(InstanceIDDeleteTokenRequest);
|
| +};
|
| +
|
| +} // namespace gcm
|
| +
|
| +#endif // GOOGLE_APIS_GCM_ENGINE_INSTANCE_ID_DELETE_TOKEN_REQUEST_H_
|
|
|