Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: chromeos/geolocation/simple_geolocation_request.h

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chromeos/audio/cras_audio_handler.h ('k') | chromeos/timezone/timezone_request.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « chromeos/audio/cras_audio_handler.h ('k') | chromeos/timezone/timezone_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698