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

Unified Diff: remoting/protocol/rtp_reader.cc

Issue 8116021: Switch remoting/protocol to new callbacks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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
Index: remoting/protocol/rtp_reader.cc
diff --git a/remoting/protocol/rtp_reader.cc b/remoting/protocol/rtp_reader.cc
index e99472fdc625187e995c8cbcef0538dc1bd66a52..50c2d82049273e4d4eacf46d1c9fbcf3be0f7593 100644
--- a/remoting/protocol/rtp_reader.cc
+++ b/remoting/protocol/rtp_reader.cc
@@ -36,8 +36,9 @@ RtpReader::~RtpReader() {
}
void RtpReader::Init(net::Socket* socket,
- OnMessageCallback* on_message_callback) {
- on_message_callback_.reset(on_message_callback);
+ const OnMessageCallback& on_message_callback) {
+ DCHECK(!on_message_callback.is_null());
+ on_message_callback_ = on_message_callback;
SocketReaderBase::Init(socket);
}
@@ -90,7 +91,7 @@ void RtpReader::OnDataReceived(net::IOBuffer* buffer, int data_size) {
++total_packets_received_;
- on_message_callback_->Run(packet);
+ on_message_callback_.Run(packet);
}
void RtpReader::GetReceiverReport(RtcpReceiverReport* report) {

Powered by Google App Engine
This is Rietveld 408576698