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

Unified Diff: remoting/protocol/connection_tester.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/channel_multiplexer_unittest.cc ('k') | remoting/protocol/fake_authenticator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/connection_tester.cc
diff --git a/remoting/protocol/connection_tester.cc b/remoting/protocol/connection_tester.cc
index 1e8c2c394a817f57b86dfb8844956e640960a05f..bf1854a4c658d1cbce42460cadaa39e41ecab831 100644
--- a/remoting/protocol/connection_tester.cc
+++ b/remoting/protocol/connection_tester.cc
@@ -74,7 +74,8 @@ void StreamConnectionTester::DoWrite() {
int bytes_to_write = std::min(output_buffer_->BytesRemaining(),
message_size_);
result = client_socket_->Write(
- output_buffer_, bytes_to_write,
+ output_buffer_.get(),
+ bytes_to_write,
base::Bind(&StreamConnectionTester::OnWritten, base::Unretained(this)));
HandleWriteResult(result);
}
@@ -100,7 +101,8 @@ void StreamConnectionTester::DoRead() {
while (result > 0) {
input_buffer_->SetCapacity(input_buffer_->offset() + message_size_);
result = host_socket_->Read(
- input_buffer_, message_size_,
+ input_buffer_.get(),
+ message_size_,
base::Bind(&StreamConnectionTester::OnRead, base::Unretained(this)));
HandleReadResult(result);
};
@@ -185,7 +187,8 @@ void DatagramConnectionTester::DoWrite() {
memcpy(packet->data(), &packets_sent_, sizeof(packets_sent_));
int result = client_socket_->Write(
- packet, message_size_,
+ packet.get(),
+ message_size_,
base::Bind(&DatagramConnectionTester::OnWritten, base::Unretained(this)));
HandleWriteResult(result);
}
@@ -216,7 +219,8 @@ void DatagramConnectionTester::DoRead() {
read_buffer_ = new net::IOBuffer(kReadSize);
result = host_socket_->Read(
- read_buffer_, kReadSize,
+ read_buffer_.get(),
+ kReadSize,
base::Bind(&DatagramConnectionTester::OnRead, base::Unretained(this)));
HandleReadResult(result);
};
« no previous file with comments | « remoting/protocol/channel_multiplexer_unittest.cc ('k') | remoting/protocol/fake_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698