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.
5 #ifndef GOOGLE_APIS_GCM_ENGINE_INSTANCE_ID_GET_TOKEN_REQUEST_HANDLER_H_
6 #define GOOGLE_APIS_GCM_ENGINE_INSTANCE_ID_GET_TOKEN_REQUEST_HANDLER_H_
11 #include "google_apis/gcm/engine/registration_request.h"
15 // Used to obtain a token based on Instance ID.
16 class GCM_EXPORT InstanceIDGetTokenRequestHandler
:
17 public RegistrationRequest::CustomRequestHandler
{
19 InstanceIDGetTokenRequestHandler(
20 const std::string
& instance_id
,
21 const std::string
& authorized_entity
,
22 const std::string
& scope
,
24 const std::map
<std::string
, std::string
>& options
);
25 ~InstanceIDGetTokenRequestHandler() override
;
27 // RegistrationRequest overrides:
28 void BuildRequestBody(std::string
* body
) override
;
29 void ReportUMAs(RegistrationRequest::Status status
,
31 base::TimeDelta complete_time
) override
;
34 std::string instance_id_
;
35 std::string authorized_entity_
;
38 std::map
<std::string
, std::string
> options_
;
40 DISALLOW_COPY_AND_ASSIGN(InstanceIDGetTokenRequestHandler
);
45 #endif // GOOGLE_APIS_GCM_ENGINE_INSTANCE_ID_GET_TOKEN_REQUEST_HANDLER_H_