Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_REGISTRATION_REQUEST_H_ | 5 #ifndef GOOGLE_APIS_GCM_ENGINE_REGISTRATION_REQUEST_H_ |
| 6 #define GOOGLE_APIS_GCM_ENGINE_REGISTRATION_REQUEST_H_ | 6 #define GOOGLE_APIS_GCM_ENGINE_REGISTRATION_REQUEST_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
|
jianli
2014/03/03 21:29:31
nit: this also seems not to be used at all
fgorski
2014/03/03 23:14:16
Done.
| |
| 9 #include <vector> | 9 #include <vector> |
|
jianli
2014/03/03 21:29:31
nit: this can be removed
fgorski
2014/03/03 23:14:16
Done.
| |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "google_apis/gcm/base/gcm_export.h" | 16 #include "google_apis/gcm/base/gcm_export.h" |
| 17 #include "net/base/backoff_entry.h" | 17 #include "net/base/backoff_entry.h" |
| 18 #include "net/url_request/url_fetcher_delegate.h" | 18 #include "net/url_request/url_fetcher_delegate.h" |
| 19 | 19 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 RegistrationCallback; | 56 RegistrationCallback; |
| 57 | 57 |
| 58 // Details of the of the Registration Request. Only user's android ID and | 58 // Details of the of the Registration Request. Only user's android ID and |
| 59 // its serial number are optional and can be set to 0. All other parameters | 59 // its serial number are optional and can be set to 0. All other parameters |
| 60 // have to be specified to successfully complete the call. | 60 // have to be specified to successfully complete the call. |
| 61 struct GCM_EXPORT RequestInfo { | 61 struct GCM_EXPORT RequestInfo { |
| 62 RequestInfo(uint64 android_id, | 62 RequestInfo(uint64 android_id, |
| 63 uint64 security_token, | 63 uint64 security_token, |
| 64 const std::string& app_id, | 64 const std::string& app_id, |
| 65 const std::string& cert, | 65 const std::string& cert, |
| 66 const std::vector<std::string>& sender_ids); | 66 const std::string& sender_id); |
| 67 ~RequestInfo(); | 67 ~RequestInfo(); |
| 68 | 68 |
| 69 // Android ID of the device. | 69 // Android ID of the device. |
| 70 uint64 android_id; | 70 uint64 android_id; |
| 71 // Security token of the device. | 71 // Security token of the device. |
| 72 uint64 security_token; | 72 uint64 security_token; |
| 73 // Application ID. | 73 // Application ID. |
| 74 std::string app_id; | 74 std::string app_id; |
| 75 // Certificate of the application. | 75 // Certificate of the application. |
| 76 std::string cert; | 76 std::string cert; |
| 77 // List of IDs of senders. Allowed up to 100. | 77 // A sender ID the registration is for. |
| 78 std::vector<std::string> sender_ids; | 78 std::string sender_id; |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 RegistrationRequest( | 81 RegistrationRequest( |
| 82 const RequestInfo& request_info, | 82 const RequestInfo& request_info, |
| 83 const net::BackoffEntry::Policy& backoff_policy, | 83 const net::BackoffEntry::Policy& backoff_policy, |
| 84 const RegistrationCallback& callback, | 84 const RegistrationCallback& callback, |
| 85 int max_retry_count, | 85 int max_retry_count, |
| 86 scoped_refptr<net::URLRequestContextGetter> request_context_getter); | 86 scoped_refptr<net::URLRequestContextGetter> request_context_getter); |
| 87 virtual ~RegistrationRequest(); | 87 virtual ~RegistrationRequest(); |
| 88 | 88 |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 109 int retries_left_; | 109 int retries_left_; |
| 110 | 110 |
| 111 base::WeakPtrFactory<RegistrationRequest> weak_ptr_factory_; | 111 base::WeakPtrFactory<RegistrationRequest> weak_ptr_factory_; |
| 112 | 112 |
| 113 DISALLOW_COPY_AND_ASSIGN(RegistrationRequest); | 113 DISALLOW_COPY_AND_ASSIGN(RegistrationRequest); |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 } // namespace gcm | 116 } // namespace gcm |
| 117 | 117 |
| 118 #endif // GOOGLE_APIS_GCM_ENGINE_REGISTRATION_REQUEST_H_ | 118 #endif // GOOGLE_APIS_GCM_ENGINE_REGISTRATION_REQUEST_H_ |
| OLD | NEW |