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

Unified Diff: remoting/jingle_glue/stream_socket_adapter_unittest.cc

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 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
« no previous file with comments | « remoting/jingle_glue/ssl_socket_adapter.cc ('k') | remoting/protocol/host_message_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/jingle_glue/stream_socket_adapter_unittest.cc
diff --git a/remoting/jingle_glue/stream_socket_adapter_unittest.cc b/remoting/jingle_glue/stream_socket_adapter_unittest.cc
index 7d1dd62204aead0b504507d5d2403b6978f9c8d2..01997dc2b132e4b72d97bb60826657e29e920588 100644
--- a/remoting/jingle_glue/stream_socket_adapter_unittest.cc
+++ b/remoting/jingle_glue/stream_socket_adapter_unittest.cc
@@ -54,7 +54,7 @@ class StreamSocketAdapterTest : public testing::Test {
// Verify that Read() calls Read() in stream.
TEST_F(StreamSocketAdapterTest, Read) {
- scoped_refptr<IOBuffer> buffer = new IOBuffer(kBufferSize);
+ scoped_refptr<IOBuffer> buffer(new IOBuffer(kBufferSize));
EXPECT_CALL(*stream_, Read(buffer->data(), kBufferSize, _, _))
.WillOnce(DoAll(SetArgumentPointee<2>(kTestDataSize),
@@ -67,7 +67,7 @@ TEST_F(StreamSocketAdapterTest, Read) {
// Verify that read callback is called for pending reads.
TEST_F(StreamSocketAdapterTest, ReadPending) {
- scoped_refptr<IOBuffer> buffer = new IOBuffer(kBufferSize);
+ scoped_refptr<IOBuffer> buffer(new IOBuffer(kBufferSize));
EXPECT_CALL(*stream_, Read(buffer->data(), kBufferSize, _, _))
.Times(2)
@@ -84,7 +84,7 @@ TEST_F(StreamSocketAdapterTest, ReadPending) {
// Verify that Read() returns error after Close().
TEST_F(StreamSocketAdapterTest, ReadClose) {
- scoped_refptr<IOBuffer> buffer = new IOBuffer(kBufferSize);
+ scoped_refptr<IOBuffer> buffer(new IOBuffer(kBufferSize));
EXPECT_CALL(*stream_, Read(buffer->data(), kBufferSize, _, _))
.WillOnce(Return(talk_base::SR_BLOCK));
@@ -102,7 +102,7 @@ TEST_F(StreamSocketAdapterTest, ReadClose) {
// Verify that Write() calls stream's Write() and returns result.
TEST_F(StreamSocketAdapterTest, Write) {
- scoped_refptr<IOBuffer> buffer = new IOBuffer(kTestDataSize);
+ scoped_refptr<IOBuffer> buffer(new IOBuffer(kTestDataSize));
EXPECT_CALL(*stream_, Write(buffer->data(), kTestDataSize, _, _))
.WillOnce(DoAll(SetArgumentPointee<2>(kTestDataSize),
@@ -115,7 +115,7 @@ TEST_F(StreamSocketAdapterTest, Write) {
// Verify that write callback is called for pending writes.
TEST_F(StreamSocketAdapterTest, WritePending) {
- scoped_refptr<IOBuffer> buffer = new IOBuffer(kTestDataSize);
+ scoped_refptr<IOBuffer> buffer(new IOBuffer(kTestDataSize));
EXPECT_CALL(*stream_, Write(buffer->data(), kTestDataSize, _, _))
.Times(2)
@@ -132,7 +132,7 @@ TEST_F(StreamSocketAdapterTest, WritePending) {
// Verify that Write() returns error after Close().
TEST_F(StreamSocketAdapterTest, WriteClose) {
- scoped_refptr<IOBuffer> buffer = new IOBuffer(kTestDataSize);
+ scoped_refptr<IOBuffer> buffer(new IOBuffer(kTestDataSize));
EXPECT_CALL(*stream_, Write(buffer->data(), kTestDataSize, _, _))
.WillOnce(Return(talk_base::SR_BLOCK));
« no previous file with comments | « remoting/jingle_glue/ssl_socket_adapter.cc ('k') | remoting/protocol/host_message_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698