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_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_H_ | 5 #ifndef CHROMEOS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_H_ |
6 #define CHROMEOS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_H_ | 6 #define CHROMEOS_GEOLOCATION_SIMPLE_GEOLOCATION_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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // When request was actually started. | 96 // When request was actually started. |
97 base::Time request_started_at_; | 97 base::Time request_started_at_; |
98 | 98 |
99 base::TimeDelta retry_sleep_on_server_error_; | 99 base::TimeDelta retry_sleep_on_server_error_; |
100 | 100 |
101 base::TimeDelta retry_sleep_on_bad_response_; | 101 base::TimeDelta retry_sleep_on_bad_response_; |
102 | 102 |
103 const base::TimeDelta timeout_; | 103 const base::TimeDelta timeout_; |
104 | 104 |
105 // Pending retry. | 105 // Pending retry. |
106 base::OneShotTimer<SimpleGeolocationRequest> request_scheduled_; | 106 base::OneShotTimer request_scheduled_; |
107 | 107 |
108 // Stop request on timeout. | 108 // Stop request on timeout. |
109 base::OneShotTimer<SimpleGeolocationRequest> timeout_timer_; | 109 base::OneShotTimer timeout_timer_; |
110 | 110 |
111 // Number of retry attempts. | 111 // Number of retry attempts. |
112 unsigned retries_; | 112 unsigned retries_; |
113 | 113 |
114 // This is updated on each retry. | 114 // This is updated on each retry. |
115 Geoposition position_; | 115 Geoposition position_; |
116 | 116 |
117 // Creation and destruction should happen on the same thread. | 117 // Creation and destruction should happen on the same thread. |
118 base::ThreadChecker thread_checker_; | 118 base::ThreadChecker thread_checker_; |
119 | 119 |
120 DISALLOW_COPY_AND_ASSIGN(SimpleGeolocationRequest); | 120 DISALLOW_COPY_AND_ASSIGN(SimpleGeolocationRequest); |
121 }; | 121 }; |
122 | 122 |
123 } // namespace chromeos | 123 } // namespace chromeos |
124 | 124 |
125 #endif // CHROMEOS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_H_ | 125 #endif // CHROMEOS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_H_ |
OLD | NEW |