Index: google_apis/gcm/engine/instance_id_delete_token_request_handler.h |
diff --git a/google_apis/gcm/engine/instance_id_delete_token_request_handler.h b/google_apis/gcm/engine/instance_id_delete_token_request_handler.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e2a8e8e28997282281d2923449cd6f78865be733 |
--- /dev/null |
+++ b/google_apis/gcm/engine/instance_id_delete_token_request_handler.h |
@@ -0,0 +1,39 @@ |
+// 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_HANDLER_H_ |
+#define GOOGLE_APIS_GCM_ENGINE_INSTANCE_ID_DELETE_TOKEN_REQUEST_HANDLER_H_ |
+ |
+#include "google_apis/gcm/engine/unregistration_request.h" |
Nicolas Zea
2015/05/26 16:39:14
#include string
jianli
2015/05/26 20:49:38
Done.
|
+ |
+namespace gcm { |
+ |
+// Provides custom logic to handle DeleteToken request for InstanceID. |
+class GCM_EXPORT InstanceIDDeleteTokenRequestHandler : |
+ public UnregistrationRequest::CustomRequestHandler { |
+ public: |
+ InstanceIDDeleteTokenRequestHandler( |
+ const std::string& instance_id, |
+ const std::string& authorized_entity, |
+ const std::string& scope, |
+ int gcm_version); |
+ ~InstanceIDDeleteTokenRequestHandler() override; |
+ |
+ // UnregistrationRequest overrides: |
+ void BuildRequestBody(std::string* body) override; |
+ UnregistrationRequest::Status ParseResponse( |
+ const net::URLFetcher* source) override; |
+ |
+ private: |
+ std::string instance_id_; |
+ std::string authorized_entity_; |
+ std::string scope_; |
+ int gcm_version_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(InstanceIDDeleteTokenRequestHandler); |
+}; |
+ |
+} // namespace gcm |
+ |
+#endif // GOOGLE_APIS_GCM_ENGINE_INSTANCE_ID_DELETE_TOKEN_REQUEST_HANDLER_H_ |