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> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 const net::BackoffEntry::Policy& backoff_policy, | 87 const net::BackoffEntry::Policy& backoff_policy, |
88 const RegistrationCallback& callback, | 88 const RegistrationCallback& callback, |
89 int max_retry_count, | 89 int max_retry_count, |
90 scoped_refptr<net::URLRequestContextGetter> request_context_getter, | 90 scoped_refptr<net::URLRequestContextGetter> request_context_getter, |
91 GCMStatsRecorder* recorder); | 91 GCMStatsRecorder* recorder); |
92 virtual ~RegistrationRequest(); | 92 virtual ~RegistrationRequest(); |
93 | 93 |
94 void Start(); | 94 void Start(); |
95 | 95 |
96 // URLFetcherDelegate implementation. | 96 // URLFetcherDelegate implementation. |
97 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; | 97 virtual void OnURLFetchComplete(const net::URLFetcher* source) override; |
98 | 98 |
99 private: | 99 private: |
100 // Schedules a retry attempt, informs the backoff of a previous request's | 100 // Schedules a retry attempt, informs the backoff of a previous request's |
101 // failure, when |update_backoff| is true. | 101 // failure, when |update_backoff| is true. |
102 void RetryWithBackoff(bool update_backoff); | 102 void RetryWithBackoff(bool update_backoff); |
103 | 103 |
104 // Parse the response returned by the URL fetcher into token, and returns the | 104 // Parse the response returned by the URL fetcher into token, and returns the |
105 // status. | 105 // status. |
106 Status ParseResponse(const net::URLFetcher* source, std::string* token); | 106 Status ParseResponse(const net::URLFetcher* source, std::string* token); |
107 | 107 |
(...skipping 11 matching lines...) Expand all Loading... |
119 GCMStatsRecorder* recorder_; | 119 GCMStatsRecorder* recorder_; |
120 | 120 |
121 base::WeakPtrFactory<RegistrationRequest> weak_ptr_factory_; | 121 base::WeakPtrFactory<RegistrationRequest> weak_ptr_factory_; |
122 | 122 |
123 DISALLOW_COPY_AND_ASSIGN(RegistrationRequest); | 123 DISALLOW_COPY_AND_ASSIGN(RegistrationRequest); |
124 }; | 124 }; |
125 | 125 |
126 } // namespace gcm | 126 } // namespace gcm |
127 | 127 |
128 #endif // GOOGLE_APIS_GCM_ENGINE_REGISTRATION_REQUEST_H_ | 128 #endif // GOOGLE_APIS_GCM_ENGINE_REGISTRATION_REQUEST_H_ |
OLD | NEW |