| 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_CHECKIN_REQUEST_H_ | 5 #ifndef GOOGLE_APIS_GCM_ENGINE_CHECKIN_REQUEST_H_ |
| 6 #define GOOGLE_APIS_GCM_ENGINE_CHECKIN_REQUEST_H_ | 6 #define GOOGLE_APIS_GCM_ENGINE_CHECKIN_REQUEST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 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/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/time/time.h" |
| 14 #include "google_apis/gcm/base/gcm_export.h" | 15 #include "google_apis/gcm/base/gcm_export.h" |
| 15 #include "google_apis/gcm/protocol/android_checkin.pb.h" | 16 #include "google_apis/gcm/protocol/android_checkin.pb.h" |
| 16 #include "google_apis/gcm/protocol/checkin.pb.h" | 17 #include "google_apis/gcm/protocol/checkin.pb.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 } |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // failure when |update_backoff| is true. | 77 // failure when |update_backoff| is true. |
| 77 void RetryWithBackoff(bool update_backoff); | 78 void RetryWithBackoff(bool update_backoff); |
| 78 | 79 |
| 79 net::URLRequestContextGetter* request_context_getter_; | 80 net::URLRequestContextGetter* request_context_getter_; |
| 80 CheckinRequestCallback callback_; | 81 CheckinRequestCallback callback_; |
| 81 | 82 |
| 82 net::BackoffEntry backoff_entry_; | 83 net::BackoffEntry backoff_entry_; |
| 83 GURL checkin_url_; | 84 GURL checkin_url_; |
| 84 scoped_ptr<net::URLFetcher> url_fetcher_; | 85 scoped_ptr<net::URLFetcher> url_fetcher_; |
| 85 const RequestInfo request_info_; | 86 const RequestInfo request_info_; |
| 87 base::TimeTicks request_start_time_; |
| 86 | 88 |
| 87 // Recorder that records GCM activities for debugging purpose. Not owned. | 89 // Recorder that records GCM activities for debugging purpose. Not owned. |
| 88 GCMStatsRecorder* recorder_; | 90 GCMStatsRecorder* recorder_; |
| 89 | 91 |
| 90 base::WeakPtrFactory<CheckinRequest> weak_ptr_factory_; | 92 base::WeakPtrFactory<CheckinRequest> weak_ptr_factory_; |
| 91 | 93 |
| 92 DISALLOW_COPY_AND_ASSIGN(CheckinRequest); | 94 DISALLOW_COPY_AND_ASSIGN(CheckinRequest); |
| 93 }; | 95 }; |
| 94 | 96 |
| 95 } // namespace gcm | 97 } // namespace gcm |
| 96 | 98 |
| 97 #endif // GOOGLE_APIS_GCM_ENGINE_CHECKIN_REQUEST_H_ | 99 #endif // GOOGLE_APIS_GCM_ENGINE_CHECKIN_REQUEST_H_ |
| OLD | NEW |