| Index: net/socket/ssl_client_socket_unittest.cc
|
| diff --git a/net/socket/ssl_client_socket_unittest.cc b/net/socket/ssl_client_socket_unittest.cc
|
| index c251b997e316fa862efce3e0621098a2fa5f9ae5..12fe130108de54d82d1c662d53a95d88a2c1e7ac 100644
|
| --- a/net/socket/ssl_client_socket_unittest.cc
|
| +++ b/net/socket/ssl_client_socket_unittest.cc
|
| @@ -361,7 +361,7 @@ TEST_F(SSLClientSocketTest, Read) {
|
| new net::IOBuffer(arraysize(request_text) - 1));
|
| memcpy(request_buffer->data(), request_text, arraysize(request_text) - 1);
|
|
|
| - rv = sock->Write(request_buffer, arraysize(request_text) - 1,
|
| + rv = sock->Write(request_buffer.get(), arraysize(request_text) - 1,
|
| callback.callback());
|
| EXPECT_TRUE(rv >= 0 || rv == net::ERR_IO_PENDING);
|
|
|
| @@ -371,7 +371,7 @@ TEST_F(SSLClientSocketTest, Read) {
|
|
|
| scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(4096));
|
| for (;;) {
|
| - rv = sock->Read(buf, 4096, callback.callback());
|
| + rv = sock->Read(buf.get(), 4096, callback.callback());
|
| EXPECT_TRUE(rv >= 0 || rv == net::ERR_IO_PENDING);
|
|
|
| if (rv == net::ERR_IO_PENDING)
|
| @@ -415,7 +415,7 @@ TEST_F(SSLClientSocketTest, Read_FullDuplex) {
|
|
|
| // Issue a "hanging" Read first.
|
| scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(4096));
|
| - rv = sock->Read(buf, 4096, callback.callback());
|
| + rv = sock->Read(buf.get(), 4096, callback.callback());
|
| // We haven't written the request, so there should be no response yet.
|
| ASSERT_EQ(net::ERR_IO_PENDING, rv);
|
|
|
| @@ -431,7 +431,8 @@ TEST_F(SSLClientSocketTest, Read_FullDuplex) {
|
| new net::StringIOBuffer(request_text));
|
|
|
| net::TestCompletionCallback callback2; // Used for Write only.
|
| - rv = sock->Write(request_buffer, request_text.size(), callback2.callback());
|
| + rv = sock->
|
| + Write(request_buffer.get(), request_text.size(), callback2.callback());
|
| EXPECT_TRUE(rv >= 0 || rv == net::ERR_IO_PENDING);
|
|
|
| if (rv == net::ERR_IO_PENDING)
|
| @@ -474,7 +475,7 @@ TEST_F(SSLClientSocketTest, Read_SmallChunks) {
|
| new net::IOBuffer(arraysize(request_text) - 1));
|
| memcpy(request_buffer->data(), request_text, arraysize(request_text) - 1);
|
|
|
| - rv = sock->Write(request_buffer, arraysize(request_text) - 1,
|
| + rv = sock->Write(request_buffer.get(), arraysize(request_text) - 1,
|
| callback.callback());
|
| EXPECT_TRUE(rv >= 0 || rv == net::ERR_IO_PENDING);
|
|
|
| @@ -484,7 +485,7 @@ TEST_F(SSLClientSocketTest, Read_SmallChunks) {
|
|
|
| scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(1));
|
| for (;;) {
|
| - rv = sock->Read(buf, 1, callback.callback());
|
| + rv = sock->Read(buf.get(), 1, callback.callback());
|
| EXPECT_TRUE(rv >= 0 || rv == net::ERR_IO_PENDING);
|
|
|
| if (rv == net::ERR_IO_PENDING)
|
| @@ -527,7 +528,7 @@ TEST_F(SSLClientSocketTest, Read_Interrupted) {
|
| new net::IOBuffer(arraysize(request_text) - 1));
|
| memcpy(request_buffer->data(), request_text, arraysize(request_text) - 1);
|
|
|
| - rv = sock->Write(request_buffer, arraysize(request_text) - 1,
|
| + rv = sock->Write(request_buffer.get(), arraysize(request_text) - 1,
|
| callback.callback());
|
| EXPECT_TRUE(rv >= 0 || rv == net::ERR_IO_PENDING);
|
|
|
| @@ -537,7 +538,7 @@ TEST_F(SSLClientSocketTest, Read_Interrupted) {
|
|
|
| // Do a partial read and then exit. This test should not crash!
|
| scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(512));
|
| - rv = sock->Read(buf, 512, callback.callback());
|
| + rv = sock->Read(buf.get(), 512, callback.callback());
|
| EXPECT_TRUE(rv > 0 || rv == net::ERR_IO_PENDING);
|
|
|
| if (rv == net::ERR_IO_PENDING)
|
| @@ -580,7 +581,7 @@ TEST_F(SSLClientSocketTest, Read_FullLogging) {
|
| new net::IOBuffer(arraysize(request_text) - 1));
|
| memcpy(request_buffer->data(), request_text, arraysize(request_text) - 1);
|
|
|
| - rv = sock->Write(request_buffer, arraysize(request_text) - 1,
|
| + rv = sock->Write(request_buffer.get(), arraysize(request_text) - 1,
|
| callback.callback());
|
| EXPECT_TRUE(rv >= 0 || rv == net::ERR_IO_PENDING);
|
|
|
| @@ -596,7 +597,7 @@ TEST_F(SSLClientSocketTest, Read_FullLogging) {
|
|
|
| scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(4096));
|
| for (;;) {
|
| - rv = sock->Read(buf, 4096, callback.callback());
|
| + rv = sock->Read(buf.get(), 4096, callback.callback());
|
| EXPECT_TRUE(rv >= 0 || rv == net::ERR_IO_PENDING);
|
|
|
| if (rv == net::ERR_IO_PENDING)
|
| @@ -869,14 +870,14 @@ TEST_F(SSLClientSocketTest, VerifyReturnChainProperlyOrdered) {
|
|
|
| // Add a rule that maps the server cert (A) to the chain of A->B->C2
|
| // rather than A->B->C.
|
| - cert_verifier_->AddResultForCert(certs[0], verify_result, net::OK);
|
| + cert_verifier_->AddResultForCert(certs[0].get(), verify_result, net::OK);
|
|
|
| // Load and install the root for the validated chain.
|
| scoped_refptr<net::X509Certificate> root_cert =
|
| net::ImportCertFromFile(net::GetTestCertsDirectory(),
|
| "redundant-validated-chain-root.pem");
|
| ASSERT_NE(static_cast<net::X509Certificate*>(NULL), root_cert);
|
| - net::ScopedTestRoot scoped_root(root_cert);
|
| + net::ScopedTestRoot scoped_root(root_cert.get());
|
|
|
| // Set up a test server with CERT_CHAIN_WRONG_ROOT.
|
| net::TestServer::SSLOptions ssl_options(
|
|
|