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

Side by Side Diff: remoting/host/heartbeat_sender.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 | « remoting/host/desktop_session_win.h ('k') | remoting/host/linux/audio_pipe_reader.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 REMOTING_HOST_HEARTBEAT_SENDER_H_ 5 #ifndef REMOTING_HOST_HEARTBEAT_SENDER_H_
6 #define REMOTING_HOST_HEARTBEAT_SENDER_H_ 6 #define REMOTING_HOST_HEARTBEAT_SENDER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 base::Closure on_heartbeat_successful_callback_; 152 base::Closure on_heartbeat_successful_callback_;
153 base::Closure on_unknown_host_id_error_; 153 base::Closure on_unknown_host_id_error_;
154 std::string host_id_; 154 std::string host_id_;
155 SignalStrategy* signal_strategy_; 155 SignalStrategy* signal_strategy_;
156 scoped_refptr<const RsaKeyPair> host_key_pair_; 156 scoped_refptr<const RsaKeyPair> host_key_pair_;
157 std::string directory_bot_jid_; 157 std::string directory_bot_jid_;
158 scoped_ptr<IqSender> iq_sender_; 158 scoped_ptr<IqSender> iq_sender_;
159 scoped_ptr<IqRequest> request_; 159 scoped_ptr<IqRequest> request_;
160 int interval_ms_; 160 int interval_ms_;
161 base::RepeatingTimer<HeartbeatSender> timer_; 161 base::RepeatingTimer timer_;
162 base::OneShotTimer<HeartbeatSender> timer_resend_; 162 base::OneShotTimer timer_resend_;
163 int sequence_id_; 163 int sequence_id_;
164 bool sequence_id_was_set_; 164 bool sequence_id_was_set_;
165 int sequence_id_recent_set_num_; 165 int sequence_id_recent_set_num_;
166 bool heartbeat_succeeded_; 166 bool heartbeat_succeeded_;
167 int failed_startup_heartbeat_count_; 167 int failed_startup_heartbeat_count_;
168 168
169 // Fields to send and indicate completion of sending host-offline-reason. 169 // Fields to send and indicate completion of sending host-offline-reason.
170 std::string host_offline_reason_; 170 std::string host_offline_reason_;
171 base::Callback<void(bool success)> host_offline_reason_ack_callback_; 171 base::Callback<void(bool success)> host_offline_reason_ack_callback_;
172 base::OneShotTimer<HeartbeatSender> host_offline_reason_timeout_timer_; 172 base::OneShotTimer host_offline_reason_timeout_timer_;
173 173
174 base::ThreadChecker thread_checker_; 174 base::ThreadChecker thread_checker_;
175 175
176 DISALLOW_COPY_AND_ASSIGN(HeartbeatSender); 176 DISALLOW_COPY_AND_ASSIGN(HeartbeatSender);
177 }; 177 };
178 178
179 } // namespace remoting 179 } // namespace remoting
180 180
181 #endif // REMOTING_HOST_HEARTBEAT_SENDER_H_ 181 #endif // REMOTING_HOST_HEARTBEAT_SENDER_H_
OLDNEW
« no previous file with comments | « remoting/host/desktop_session_win.h ('k') | remoting/host/linux/audio_pipe_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698