OLD | NEW |
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 // enters the CONNECTED state. | 95 // enters the CONNECTED state. |
96 HeartbeatSender(Listener* listener, | 96 HeartbeatSender(Listener* listener, |
97 const std::string& host_id, | 97 const std::string& host_id, |
98 SignalStrategy* signal_strategy, | 98 SignalStrategy* signal_strategy, |
99 scoped_refptr<RsaKeyPair> key_pair, | 99 scoped_refptr<RsaKeyPair> key_pair, |
100 const std::string& directory_bot_jid); | 100 const std::string& directory_bot_jid); |
101 virtual ~HeartbeatSender(); | 101 virtual ~HeartbeatSender(); |
102 | 102 |
103 // SignalStrategy::Listener interface. | 103 // SignalStrategy::Listener interface. |
104 virtual void OnSignalStrategyStateChange( | 104 virtual void OnSignalStrategyStateChange( |
105 SignalStrategy::State state) OVERRIDE; | 105 SignalStrategy::State state) override; |
106 virtual bool OnSignalStrategyIncomingStanza( | 106 virtual bool OnSignalStrategyIncomingStanza( |
107 const buzz::XmlElement* stanza) OVERRIDE; | 107 const buzz::XmlElement* stanza) override; |
108 | 108 |
109 private: | 109 private: |
110 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, DoSendStanza); | 110 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, DoSendStanza); |
111 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, | 111 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, |
112 DoSendStanzaWithExpectedSequenceId); | 112 DoSendStanzaWithExpectedSequenceId); |
113 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, CreateHeartbeatMessage); | 113 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, CreateHeartbeatMessage); |
114 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, ProcessResponseSetInterval); | 114 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, ProcessResponseSetInterval); |
115 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, | 115 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, |
116 ProcessResponseExpectedSequenceId); | 116 ProcessResponseExpectedSequenceId); |
117 | 117 |
(...skipping 23 matching lines...) Expand all Loading... |
141 int sequence_id_recent_set_num_; | 141 int sequence_id_recent_set_num_; |
142 bool heartbeat_succeeded_; | 142 bool heartbeat_succeeded_; |
143 int failed_startup_heartbeat_count_; | 143 int failed_startup_heartbeat_count_; |
144 | 144 |
145 DISALLOW_COPY_AND_ASSIGN(HeartbeatSender); | 145 DISALLOW_COPY_AND_ASSIGN(HeartbeatSender); |
146 }; | 146 }; |
147 | 147 |
148 } // namespace remoting | 148 } // namespace remoting |
149 | 149 |
150 #endif // REMOTING_HOST_HEARTBEAT_SENDER_H_ | 150 #endif // REMOTING_HOST_HEARTBEAT_SENDER_H_ |
OLD | NEW |