| Index: net/spdy/spdy_proxy_client_socket.cc
|
| diff --git a/net/spdy/spdy_proxy_client_socket.cc b/net/spdy/spdy_proxy_client_socket.cc
|
| index 0d62ce7a500846f364ef6fa83e414370aa3140a0..0ddde8c8a77ed26714666d4736c21a411bcd1565 100644
|
| --- a/net/spdy/spdy_proxy_client_socket.cc
|
| +++ b/net/spdy/spdy_proxy_client_socket.cc
|
| @@ -56,7 +56,7 @@ SpdyProxyClientSocket::~SpdyProxyClientSocket() {
|
| }
|
|
|
| const HttpResponseInfo* SpdyProxyClientSocket::GetConnectResponseInfo() const {
|
| - return response_.headers ? &response_ : NULL;
|
| + return response_.headers.get() ? &response_ : NULL;
|
| }
|
|
|
| const scoped_refptr<HttpAuthController>&
|
| @@ -126,7 +126,7 @@ void SpdyProxyClientSocket::Disconnect() {
|
|
|
| next_state_ = STATE_DISCONNECTED;
|
|
|
| - if (spdy_stream_)
|
| + if (spdy_stream_.get())
|
| // This will cause OnClose to be invoked, which takes care of
|
| // cleaning up all the internal state.
|
| spdy_stream_->Cancel();
|
| @@ -153,7 +153,7 @@ void SpdyProxyClientSocket::SetOmniboxSpeculation() {
|
| }
|
|
|
| bool SpdyProxyClientSocket::WasEverUsed() const {
|
| - return was_ever_used_ || (spdy_stream_ && spdy_stream_->WasEverUsed());
|
| + return was_ever_used_ || (spdy_stream_.get() && spdy_stream_->WasEverUsed());
|
| }
|
|
|
| bool SpdyProxyClientSocket::UsingTCPFastOpen() const {
|
| @@ -186,7 +186,7 @@ bool SpdyProxyClientSocket::GetSSLInfo(SSLInfo* ssl_info) {
|
| int SpdyProxyClientSocket::Read(IOBuffer* buf, int buf_len,
|
| const CompletionCallback& callback) {
|
| DCHECK(read_callback_.is_null());
|
| - DCHECK(!user_buffer_);
|
| + DCHECK(!user_buffer_.get());
|
|
|
| if (next_state_ == STATE_DISCONNECTED)
|
| return ERR_SOCKET_NOT_CONNECTED;
|
| @@ -209,7 +209,7 @@ int SpdyProxyClientSocket::Read(IOBuffer* buf, int buf_len,
|
| }
|
|
|
| int SpdyProxyClientSocket::PopulateUserReadBuffer() {
|
| - if (!user_buffer_)
|
| + if (!user_buffer_.get())
|
| return ERR_IO_PENDING;
|
|
|
| int bytes_read = 0;
|
| @@ -228,7 +228,7 @@ int SpdyProxyClientSocket::PopulateUserReadBuffer() {
|
| }
|
| }
|
|
|
| - if (bytes_read > 0 && spdy_stream_)
|
| + if (bytes_read > 0 && spdy_stream_.get())
|
| spdy_stream_->IncreaseRecvWindowSize(bytes_read);
|
|
|
| return user_buffer_->BytesConsumed();
|
| @@ -257,7 +257,7 @@ int SpdyProxyClientSocket::Write(IOBuffer* buf, int buf_len,
|
| int len = std::min(kMaxSpdyFrameChunkSize, buf_len - i);
|
| scoped_refptr<DrainableIOBuffer> iobuf(new DrainableIOBuffer(buf, i + len));
|
| iobuf->SetOffset(i);
|
| - int rv = spdy_stream_->WriteStreamData(iobuf, len, DATA_FLAG_NONE);
|
| + int rv = spdy_stream_->WriteStreamData(iobuf.get(), len, DATA_FLAG_NONE);
|
| if (rv > 0) {
|
| write_bytes_outstanding_ -= rv;
|
| } else if (rv != ERR_IO_PENDING) {
|
| @@ -443,7 +443,7 @@ int SpdyProxyClientSocket::DoReadReplyComplete(int result) {
|
| // SpdyHttpStream so that any subsequent SpdyFrames are processed in
|
| // the context of the HttpStream, not the socket.
|
| DCHECK(spdy_stream_);
|
| - SpdyStream* stream = spdy_stream_;
|
| + SpdyStream* stream = spdy_stream_.get();
|
| spdy_stream_ = NULL;
|
| response_stream_.reset(new SpdyHttpStream(NULL, false));
|
| response_stream_->InitializeWithExistingStream(stream);
|
| @@ -456,7 +456,7 @@ int SpdyProxyClientSocket::DoReadReplyComplete(int result) {
|
|
|
| case 407: // Proxy Authentication Required
|
| next_state_ = STATE_OPEN;
|
| - return HandleProxyAuthChallenge(auth_, &response_, net_log_);
|
| + return HandleProxyAuthChallenge(auth_.get(), &response_, net_log_);
|
|
|
| default:
|
| // Ignore response to avoid letting the proxy impersonate the target
|
| @@ -524,7 +524,7 @@ int SpdyProxyClientSocket::OnDataReceived(const char* data, int length) {
|
| scoped_refptr<IOBuffer> io_buffer(new IOBuffer(length));
|
| memcpy(io_buffer->data(), data, length);
|
| read_buffer_.push_back(
|
| - make_scoped_refptr(new DrainableIOBuffer(io_buffer, length)));
|
| + make_scoped_refptr(new DrainableIOBuffer(io_buffer.get(), length)));
|
| }
|
|
|
| if (!read_callback_.is_null()) {
|
|
|