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

Unified Diff: jingle/glue/pseudotcp_adapter.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 | « jingle/glue/proxy_resolving_client_socket.cc ('k') | jingle/glue/pseudotcp_adapter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/glue/pseudotcp_adapter.cc
diff --git a/jingle/glue/pseudotcp_adapter.cc b/jingle/glue/pseudotcp_adapter.cc
index a2da2ae56def6fb1760dfeeab923d98704da2928..484ed2e0d833eb9366d44c89dcf1873b22e877ad 100644
--- a/jingle/glue/pseudotcp_adapter.cc
+++ b/jingle/glue/pseudotcp_adapter.cc
@@ -360,9 +360,10 @@ cricket::IPseudoTcpNotify::WriteResult PseudoTcpAdapter::Core::TcpWritePacket(
// send exactly as many bytes as we requested, or fail.
int result;
if (socket_.get()) {
- result = socket_->Write(write_buffer, len,
- base::Bind(&PseudoTcpAdapter::Core::OnWritten,
- base::Unretained(this)));
+ result = socket_->Write(
+ write_buffer.get(),
+ len,
+ base::Bind(&PseudoTcpAdapter::Core::OnWritten, base::Unretained(this)));
} else {
result = net::ERR_CONNECTION_CLOSED;
}
@@ -379,14 +380,15 @@ cricket::IPseudoTcpNotify::WriteResult PseudoTcpAdapter::Core::TcpWritePacket(
}
void PseudoTcpAdapter::Core::DoReadFromSocket() {
- if (!socket_read_buffer_)
+ if (!socket_read_buffer_.get())
socket_read_buffer_ = new net::IOBuffer(kReadBufferSize);
int result = 1;
while (socket_.get() && result > 0) {
- result = socket_->Read(socket_read_buffer_, kReadBufferSize,
- base::Bind(&PseudoTcpAdapter::Core::OnRead,
- base::Unretained(this)));
+ result = socket_->Read(
+ socket_read_buffer_.get(),
+ kReadBufferSize,
+ base::Bind(&PseudoTcpAdapter::Core::OnRead, base::Unretained(this)));
if (result != net::ERR_IO_PENDING)
HandleReadResults(result);
}
« no previous file with comments | « jingle/glue/proxy_resolving_client_socket.cc ('k') | jingle/glue/pseudotcp_adapter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698