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

Unified Diff: remoting/host/heartbeat_sender.h

Issue 10106013: Chromoting: stopping the service if the host ID is permanently not recognized by the could. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feeback. Rebased. Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/constants.h ('k') | remoting/host/heartbeat_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/heartbeat_sender.h
diff --git a/remoting/host/heartbeat_sender.h b/remoting/host/heartbeat_sender.h
index f2f5a474aafe40056c59637b9c878bd0f035a7fd..daa7ed8dcd835431b8a6771293acd72db70ad12d 100644
--- a/remoting/host/heartbeat_sender.h
+++ b/remoting/host/heartbeat_sender.h
@@ -79,10 +79,18 @@ class IqSender;
// </iq>
class HeartbeatSender : public SignalStrategy::Listener {
public:
- // |signal_strategy| and |key_pair| must outlive this
+ class Listener {
+ public:
+ virtual ~Listener() { }
+ // Invoked when the host ID is permanently not recognized by the server.
+ virtual void OnUnknownHostIdError() = 0;
+ };
+
+ // |signal_strategy|, |key_pair| and |delegate| must outlive this
// object. Heartbeats will start when the supplied SignalStrategy
// enters the CONNECTED state.
- HeartbeatSender(const std::string& host_id,
+ HeartbeatSender(Listener* listener,
+ const std::string& host_id,
SignalStrategy* signal_strategy,
HostKeyPair* key_pair);
virtual ~HeartbeatSender();
@@ -111,6 +119,7 @@ class HeartbeatSender : public SignalStrategy::Listener {
scoped_ptr<buzz::XmlElement> CreateHeartbeatMessage();
scoped_ptr<buzz::XmlElement> CreateSignature();
+ Listener* listener_;
std::string host_id_;
SignalStrategy* signal_strategy_;
HostKeyPair* key_pair_;
« no previous file with comments | « remoting/host/constants.h ('k') | remoting/host/heartbeat_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698