| 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 CHROMEOS_TIMEZONE_TIMEZONE_REQUEST_H_ | 5 #ifndef CHROMEOS_TIMEZONE_TIMEZONE_REQUEST_H_ |
| 6 #define CHROMEOS_TIMEZONE_TIMEZONE_REQUEST_H_ | 6 #define CHROMEOS_TIMEZONE_TIMEZONE_REQUEST_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 GURL request_url_; | 111 GURL request_url_; |
| 112 scoped_ptr<net::URLFetcher> url_fetcher_; | 112 scoped_ptr<net::URLFetcher> url_fetcher_; |
| 113 | 113 |
| 114 // When request was actually started. | 114 // When request was actually started. |
| 115 base::Time request_started_at_; | 115 base::Time request_started_at_; |
| 116 | 116 |
| 117 // Absolute time, when it is passed no more retry requests are allowed. | 117 // Absolute time, when it is passed no more retry requests are allowed. |
| 118 base::Time retry_timeout_abs_; | 118 base::Time retry_timeout_abs_; |
| 119 | 119 |
| 120 // Pending retry. | 120 // Pending retry. |
| 121 base::OneShotTimer<TimeZoneRequest> timezone_request_scheduled_; | 121 base::OneShotTimer timezone_request_scheduled_; |
| 122 | 122 |
| 123 base::TimeDelta retry_sleep_on_server_error_; | 123 base::TimeDelta retry_sleep_on_server_error_; |
| 124 | 124 |
| 125 base::TimeDelta retry_sleep_on_bad_response_; | 125 base::TimeDelta retry_sleep_on_bad_response_; |
| 126 | 126 |
| 127 // Number of retry attempts. | 127 // Number of retry attempts. |
| 128 unsigned retries_; | 128 unsigned retries_; |
| 129 | 129 |
| 130 // Creation and destruction should happen on the same thread. | 130 // Creation and destruction should happen on the same thread. |
| 131 base::ThreadChecker thread_checker_; | 131 base::ThreadChecker thread_checker_; |
| 132 | 132 |
| 133 DISALLOW_COPY_AND_ASSIGN(TimeZoneRequest); | 133 DISALLOW_COPY_AND_ASSIGN(TimeZoneRequest); |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 } // namespace chromeos | 136 } // namespace chromeos |
| 137 | 137 |
| 138 #endif // CHROMEOS_TIMEZONE_TIMEZONE_REQUEST_H_ | 138 #endif // CHROMEOS_TIMEZONE_TIMEZONE_REQUEST_H_ |
| OLD | NEW |