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

Unified Diff: remoting/protocol/buffered_socket_writer.cc

Issue 15782010: Update remoting/ and jingle/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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/protocol/authenticator_test_base.cc ('k') | remoting/protocol/channel_multiplexer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/buffered_socket_writer.cc
diff --git a/remoting/protocol/buffered_socket_writer.cc b/remoting/protocol/buffered_socket_writer.cc
index de1135640c8403fd9042692cdc2dcfe6dddd14a3..8ebe593143cd75195a5e0122c98911ed6c5e328e 100644
--- a/remoting/protocol/buffered_socket_writer.cc
+++ b/remoting/protocol/buffered_socket_writer.cc
@@ -175,16 +175,16 @@ BufferedSocketWriter::BufferedSocketWriter() {
void BufferedSocketWriter::GetNextPacket(
net::IOBuffer** buffer, int* size) {
- if (!current_buf_) {
+ if (!current_buf_.get()) {
if (queue_.empty()) {
*buffer = NULL;
return; // Nothing to write.
}
- current_buf_ = new net::DrainableIOBuffer(
- queue_.front()->data, queue_.front()->data->size());
+ current_buf_ = new net::DrainableIOBuffer(queue_.front()->data.get(),
+ queue_.front()->data->size());
}
- *buffer = current_buf_;
+ *buffer = current_buf_.get();
*size = current_buf_->BytesRemaining();
}
@@ -215,7 +215,7 @@ void BufferedDatagramWriter::GetNextPacket(
*buffer = NULL;
return; // Nothing to write.
}
- *buffer = queue_.front()->data;
+ *buffer = queue_.front()->data.get();
*size = queue_.front()->data->size();
}
« no previous file with comments | « remoting/protocol/authenticator_test_base.cc ('k') | remoting/protocol/channel_multiplexer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698