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

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

Issue 9005034: Refactor SignalStrategy so that it can be reused for multiple connections. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 8 years, 11 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 | « remoting/host/chromoting_host.cc ('k') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 public: 68 public:
69 HeartbeatSender(base::MessageLoopProxy* main_loop, 69 HeartbeatSender(base::MessageLoopProxy* main_loop,
70 MutableHostConfig* config); 70 MutableHostConfig* config);
71 virtual ~HeartbeatSender(); 71 virtual ~HeartbeatSender();
72 72
73 // Initializes heart-beating for |jingle_client_| with |config_|. Returns 73 // Initializes heart-beating for |jingle_client_| with |config_|. Returns
74 // false if the config is invalid (e.g. private key cannot be parsed). 74 // false if the config is invalid (e.g. private key cannot be parsed).
75 bool Init(); 75 bool Init();
76 76
77 // HostStatusObserver implementation. 77 // HostStatusObserver implementation.
78 virtual void OnSignallingConnected(SignalStrategy* signal_strategy, 78 virtual void OnSignallingConnected(SignalStrategy* signal_strategy) OVERRIDE;
79 const std::string& full_jid) OVERRIDE;
80 virtual void OnSignallingDisconnected() OVERRIDE; 79 virtual void OnSignallingDisconnected() OVERRIDE;
81 virtual void OnClientAuthenticated(const std::string& jid) OVERRIDE; 80 virtual void OnClientAuthenticated(const std::string& jid) OVERRIDE;
82 virtual void OnClientDisconnected(const std::string& jid) OVERRIDE; 81 virtual void OnClientDisconnected(const std::string& jid) OVERRIDE;
83 virtual void OnAccessDenied() OVERRIDE; 82 virtual void OnAccessDenied() OVERRIDE;
84 virtual void OnShutdown() OVERRIDE; 83 virtual void OnShutdown() OVERRIDE;
85 84
86 private: 85 private:
87 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, DoSendStanza); 86 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, DoSendStanza);
88 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, CreateHeartbeatMessage); 87 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, CreateHeartbeatMessage);
89 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, ProcessResponse); 88 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, ProcessResponse);
(...skipping 24 matching lines...) Expand all
114 scoped_ptr<IqRequest> request_; 113 scoped_ptr<IqRequest> request_;
115 int interval_ms_; 114 int interval_ms_;
116 base::RepeatingTimer<HeartbeatSender> timer_; 115 base::RepeatingTimer<HeartbeatSender> timer_;
117 116
118 DISALLOW_COPY_AND_ASSIGN(HeartbeatSender); 117 DISALLOW_COPY_AND_ASSIGN(HeartbeatSender);
119 }; 118 };
120 119
121 } // namespace remoting 120 } // namespace remoting
122 121
123 #endif // REMOTING_HOST_HEARTBEAT_SENDER_H_ 122 #endif // REMOTING_HOST_HEARTBEAT_SENDER_H_
OLDNEW
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/heartbeat_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698