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

Side by Side Diff: remoting/host/heartbeat_sender.h

Issue 9447087: Revert 123635 - Implement timeouts for IQ requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/host/heartbeat_sender.cc » ('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/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, 96 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest,
97 DoSendStanzaWithExpectedSequenceId); 97 DoSendStanzaWithExpectedSequenceId);
98 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, CreateHeartbeatMessage); 98 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, CreateHeartbeatMessage);
99 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, ProcessResponseSetInterval); 99 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, ProcessResponseSetInterval);
100 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, 100 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest,
101 ProcessResponseExpectedSequenceId); 101 ProcessResponseExpectedSequenceId);
102 102
103 void SendStanza(); 103 void SendStanza();
104 void ResendStanza(); 104 void ResendStanza();
105 void DoSendStanza(); 105 void DoSendStanza();
106 void ProcessResponse(IqRequest* request, const buzz::XmlElement* response); 106 void ProcessResponse(const buzz::XmlElement* response);
107 void SetInterval(int interval); 107 void SetInterval(int interval);
108 void SetSequenceId(int sequence_id); 108 void SetSequenceId(int sequence_id);
109 109
110 // Helper methods used by DoSendStanza() to generate heartbeat stanzas. 110 // Helper methods used by DoSendStanza() to generate heartbeat stanzas.
111 scoped_ptr<buzz::XmlElement> CreateHeartbeatMessage(); 111 scoped_ptr<buzz::XmlElement> CreateHeartbeatMessage();
112 scoped_ptr<buzz::XmlElement> CreateSignature(); 112 scoped_ptr<buzz::XmlElement> CreateSignature();
113 113
114 std::string host_id_; 114 std::string host_id_;
115 SignalStrategy* signal_strategy_; 115 SignalStrategy* signal_strategy_;
116 HostKeyPair* key_pair_; 116 HostKeyPair* key_pair_;
117 scoped_ptr<IqSender> iq_sender_; 117 scoped_ptr<IqSender> iq_sender_;
118 scoped_ptr<IqRequest> request_; 118 scoped_ptr<IqRequest> request_;
119 int interval_ms_; 119 int interval_ms_;
120 base::RepeatingTimer<HeartbeatSender> timer_; 120 base::RepeatingTimer<HeartbeatSender> timer_;
121 base::OneShotTimer<HeartbeatSender> timer_resend_; 121 base::OneShotTimer<HeartbeatSender> timer_resend_;
122 int sequence_id_; 122 int sequence_id_;
123 bool sequence_id_was_set_; 123 bool sequence_id_was_set_;
124 int sequence_id_recent_set_num_; 124 int sequence_id_recent_set_num_;
125 125
126 DISALLOW_COPY_AND_ASSIGN(HeartbeatSender); 126 DISALLOW_COPY_AND_ASSIGN(HeartbeatSender);
127 }; 127 };
128 128
129 } // namespace remoting 129 } // namespace remoting
130 130
131 #endif // REMOTING_HOST_HEARTBEAT_SENDER_H_ 131 #endif // REMOTING_HOST_HEARTBEAT_SENDER_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/heartbeat_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698