| 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 |
| 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 "base/time/time.h" |
| 16 #include "google_apis/gcm/base/gcm_export.h" | 17 #include "google_apis/gcm/base/gcm_export.h" |
| 17 #include "net/base/backoff_entry.h" | 18 #include "net/base/backoff_entry.h" |
| 18 #include "net/url_request/url_fetcher_delegate.h" | 19 #include "net/url_request/url_fetcher_delegate.h" |
| 19 #include "url/gurl.h" | 20 #include "url/gurl.h" |
| 20 | 21 |
| 21 namespace net { | 22 namespace net { |
| 22 class URLRequestContextGetter; | 23 class URLRequestContextGetter; |
| 23 } | 24 } |
| 24 | 25 |
| 25 namespace gcm { | 26 namespace gcm { |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 Status ParseResponse(const net::URLFetcher* source, std::string* token); | 106 Status ParseResponse(const net::URLFetcher* source, std::string* token); |
| 106 | 107 |
| 107 RegistrationCallback callback_; | 108 RegistrationCallback callback_; |
| 108 RequestInfo request_info_; | 109 RequestInfo request_info_; |
| 109 GURL registration_url_; | 110 GURL registration_url_; |
| 110 | 111 |
| 111 net::BackoffEntry backoff_entry_; | 112 net::BackoffEntry backoff_entry_; |
| 112 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; | 113 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; |
| 113 scoped_ptr<net::URLFetcher> url_fetcher_; | 114 scoped_ptr<net::URLFetcher> url_fetcher_; |
| 114 int retries_left_; | 115 int retries_left_; |
| 116 base::TimeTicks request_start_time_; |
| 115 | 117 |
| 116 // Recorder that records GCM activities for debugging purpose. Not owned. | 118 // Recorder that records GCM activities for debugging purpose. Not owned. |
| 117 GCMStatsRecorder* recorder_; | 119 GCMStatsRecorder* recorder_; |
| 118 | 120 |
| 119 base::WeakPtrFactory<RegistrationRequest> weak_ptr_factory_; | 121 base::WeakPtrFactory<RegistrationRequest> weak_ptr_factory_; |
| 120 | 122 |
| 121 DISALLOW_COPY_AND_ASSIGN(RegistrationRequest); | 123 DISALLOW_COPY_AND_ASSIGN(RegistrationRequest); |
| 122 }; | 124 }; |
| 123 | 125 |
| 124 } // namespace gcm | 126 } // namespace gcm |
| 125 | 127 |
| 126 #endif // GOOGLE_APIS_GCM_ENGINE_REGISTRATION_REQUEST_H_ | 128 #endif // GOOGLE_APIS_GCM_ENGINE_REGISTRATION_REQUEST_H_ |
| OLD | NEW |