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 CHROME_BROWSER_CHROMEOS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_H_ | 6 #define CHROME_BROWSER_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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 retry_sleep_on_server_error_ = value; | 60 retry_sleep_on_server_error_ = value; |
61 } | 61 } |
62 | 62 |
63 void set_retry_sleep_on_bad_response_for_testing( | 63 void set_retry_sleep_on_bad_response_for_testing( |
64 const base::TimeDelta value) { | 64 const base::TimeDelta value) { |
65 retry_sleep_on_bad_response_ = value; | 65 retry_sleep_on_bad_response_ = value; |
66 } | 66 } |
67 | 67 |
68 private: | 68 private: |
69 // net::URLFetcherDelegate | 69 // net::URLFetcherDelegate |
70 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; | 70 virtual void OnURLFetchComplete(const net::URLFetcher* source) override; |
71 | 71 |
72 // Start new request. | 72 // Start new request. |
73 void StartRequest(); | 73 void StartRequest(); |
74 | 74 |
75 // Schedules retry. | 75 // Schedules retry. |
76 void Retry(bool server_error); | 76 void Retry(bool server_error); |
77 | 77 |
78 // Run callback and destroy "this". | 78 // Run callback and destroy "this". |
79 void ReplyAndDestroySelf(const base::TimeDelta elapsed, bool server_error); | 79 void ReplyAndDestroySelf(const base::TimeDelta elapsed, bool server_error); |
80 | 80 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // CHROME_BROWSER_CHROMEOS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_H_ | 125 #endif // CHROME_BROWSER_CHROMEOS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_H_ |
OLD | NEW |