OLD | NEW |
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_GCM_REGISTRATION_REQUEST_HANDLER_H_ | 5 #ifndef GOOGLE_APIS_GCM_ENGINE_GCM_REGISTRATION_REQUEST_HANDLER_H_ |
6 #define GOOGLE_APIS_GCM_ENGINE_GCM_REGISTRATION_REQUEST_HANDLER_H_ | 6 #define GOOGLE_APIS_GCM_ENGINE_GCM_REGISTRATION_REQUEST_HANDLER_H_ |
7 | 7 |
| 8 #include "base/macros.h" |
8 #include "google_apis/gcm/engine/registration_request.h" | 9 #include "google_apis/gcm/engine/registration_request.h" |
9 | 10 |
10 namespace gcm { | 11 namespace gcm { |
11 | 12 |
12 // Used to obtain the registration ID for applications that want to use GCM. | 13 // Used to obtain the registration ID for applications that want to use GCM. |
13 class GCM_EXPORT GCMRegistrationRequestHandler : | 14 class GCM_EXPORT GCMRegistrationRequestHandler : |
14 public RegistrationRequest::CustomRequestHandler { | 15 public RegistrationRequest::CustomRequestHandler { |
15 public: | 16 public: |
16 GCMRegistrationRequestHandler(const std::string& senders); | 17 GCMRegistrationRequestHandler(const std::string& senders); |
17 ~GCMRegistrationRequestHandler() override; | 18 ~GCMRegistrationRequestHandler() override; |
18 | 19 |
19 // RegistrationRequest::RequestHandler overrides: | 20 // RegistrationRequest::RequestHandler overrides: |
20 void BuildRequestBody(std::string* body) override; | 21 void BuildRequestBody(std::string* body) override; |
21 void ReportUMAs(RegistrationRequest::Status status, | 22 void ReportUMAs(RegistrationRequest::Status status, |
22 int retry_count, | 23 int retry_count, |
23 base::TimeDelta complete_time) override; | 24 base::TimeDelta complete_time) override; |
24 | 25 |
25 private: | 26 private: |
26 std::string senders_; | 27 std::string senders_; |
27 | 28 |
28 DISALLOW_COPY_AND_ASSIGN(GCMRegistrationRequestHandler); | 29 DISALLOW_COPY_AND_ASSIGN(GCMRegistrationRequestHandler); |
29 }; | 30 }; |
30 | 31 |
31 } // namespace gcm | 32 } // namespace gcm |
32 | 33 |
33 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_REGISTRATION_REQUEST_HANDLER_H_ | 34 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_REGISTRATION_REQUEST_HANDLER_H_ |
OLD | NEW |