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

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

Issue 9720019: Use scoped_ptr<> to pass ownership in more places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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/event_executor.h ('k') | remoting/host/host_mock_objects.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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // stanza of this form: 72 // stanza of this form:
73 // 73 //
74 // <iq type="set" from="remoting@bot.talk.google.com" 74 // <iq type="set" from="remoting@bot.talk.google.com"
75 // to="user@gmail.com/chromoting123123" id="5" xmlns="jabber:client"> 75 // to="user@gmail.com/chromoting123123" id="5" xmlns="jabber:client">
76 // <rem:heartbeat-result xmlns:rem="google:remoting"> 76 // <rem:heartbeat-result xmlns:rem="google:remoting">
77 // <rem:expected-sequence-id>654</rem:expected-sequence-id> 77 // <rem:expected-sequence-id>654</rem:expected-sequence-id>
78 // </rem:heartbeat-result> 78 // </rem:heartbeat-result>
79 // </iq> 79 // </iq>
80 class HeartbeatSender : public SignalStrategy::Listener { 80 class HeartbeatSender : public SignalStrategy::Listener {
81 public: 81 public:
82 // Doesn't take ownership of |signal_strategy| or |key_pair|. Both 82 // |signal_strategy| and |key_pair| must outlive this
83 // parameters must outlive this object. Heartbeats will start when 83 // object. Heartbeats will start when the supplied SignalStrategy
84 // the supplied SignalStrategy enters the CONNECTED state. 84 // enters the CONNECTED state.
85 HeartbeatSender(const std::string& host_id, 85 HeartbeatSender(const std::string& host_id,
86 SignalStrategy* signal_strategy, 86 SignalStrategy* signal_strategy,
87 HostKeyPair* key_pair); 87 HostKeyPair* key_pair);
88 virtual ~HeartbeatSender(); 88 virtual ~HeartbeatSender();
89 89
90 // SignalStrategy::Listener interface. 90 // SignalStrategy::Listener interface.
91 virtual void OnSignalStrategyStateChange( 91 virtual void OnSignalStrategyStateChange(
92 SignalStrategy::State state) OVERRIDE; 92 SignalStrategy::State state) OVERRIDE;
93 93
94 private: 94 private:
(...skipping 27 matching lines...) Expand all
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 | « remoting/host/event_executor.h ('k') | remoting/host/host_mock_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698