diff options
author | asanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-29 16:43:58 +0000 |
---|---|---|
committer | asanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-29 16:43:58 +0000 |
commit | d609f284ee4b5ff4bec43858d411c135ad951285 (patch) | |
tree | 349fc2943146581c2ebd797ab2e9e47205861570 | |
parent | 52bb01d16fb6427ddad5c4656c704c4a376e8267 (diff) | |
download | chromium_src-d609f284ee4b5ff4bec43858d411c135ad951285.zip chromium_src-d609f284ee4b5ff4bec43858d411c135ad951285.tar.gz chromium_src-d609f284ee4b5ff4bec43858d411c135ad951285.tar.bz2 |
Revert 83524 - Re-connect if Keep-Alive connection has been closed by the time we get around to reusing it. BUG=none TEST=net_unittests --gtest_filter=HttpNetworkTransactionTest.BasicAuthKeepAliveImpatientServer:*.BasicAuthKeepAliveNoBody:*.BasicAuthKeepAliveLargeBody && unit_tests --gtest_filter=*TransportClientSocketTest.IsConnected*Review URL: http://codereview.chromium.org/6878055
TBR=asanka@chromium.org
Review URL: http://codereview.chromium.org/6880318
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83530 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | net/http/http_basic_stream.cc | 6 | ||||
-rw-r--r-- | net/http/http_basic_stream.h | 35 | ||||
-rw-r--r-- | net/http/http_network_transaction.cc | 7 | ||||
-rw-r--r-- | net/http/http_network_transaction_unittest.cc | 31 | ||||
-rw-r--r-- | net/http/http_response_body_drainer_unittest.cc | 36 | ||||
-rw-r--r-- | net/http/http_stream.h | 6 | ||||
-rw-r--r-- | net/http/http_stream_parser.cc | 6 | ||||
-rw-r--r-- | net/http/http_stream_parser.h | 4 | ||||
-rw-r--r-- | net/socket/socket_test_util.cc | 8 | ||||
-rw-r--r-- | net/socket/socket_test_util.h | 1 | ||||
-rw-r--r-- | net/socket/transport_client_socket_unittest.cc | 104 | ||||
-rw-r--r-- | net/spdy/spdy_http_stream.cc | 7 | ||||
-rw-r--r-- | net/spdy/spdy_http_stream.h | 48 |
13 files changed, 83 insertions, 216 deletions
diff --git a/net/http/http_basic_stream.cc b/net/http/http_basic_stream.cc index 6501a59..ef4d777 100644 --- a/net/http/http_basic_stream.cc +++ b/net/http/http_basic_stream.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -102,10 +102,6 @@ void HttpBasicStream::SetConnectionReused() { parser_->SetConnectionReused(); } -bool HttpBasicStream::IsConnectionReusable() const { - return parser_->IsConnectionReusable(); -} - void HttpBasicStream::GetSSLInfo(SSLInfo* ssl_info) { parser_->GetSSLInfo(ssl_info); } diff --git a/net/http/http_basic_stream.h b/net/http/http_basic_stream.h index 267c7c1..2c26315 100644 --- a/net/http/http_basic_stream.h +++ b/net/http/http_basic_stream.h @@ -42,44 +42,41 @@ class HttpBasicStream : public HttpStream { // HttpStream methods: virtual int InitializeStream(const HttpRequestInfo* request_info, const BoundNetLog& net_log, - CompletionCallback* callback) OVERRIDE; + CompletionCallback* callback); virtual int SendRequest(const HttpRequestHeaders& headers, UploadDataStream* request_body, HttpResponseInfo* response, - CompletionCallback* callback) OVERRIDE; + CompletionCallback* callback); - virtual uint64 GetUploadProgress() const OVERRIDE; + virtual uint64 GetUploadProgress() const; - virtual int ReadResponseHeaders(CompletionCallback* callback) OVERRIDE; + virtual int ReadResponseHeaders(CompletionCallback* callback); - virtual const HttpResponseInfo* GetResponseInfo() const OVERRIDE; + virtual const HttpResponseInfo* GetResponseInfo() const; virtual int ReadResponseBody(IOBuffer* buf, int buf_len, - CompletionCallback* callback) OVERRIDE; + CompletionCallback* callback); - virtual void Close(bool not_reusable) OVERRIDE; + virtual void Close(bool not_reusable); - virtual HttpStream* RenewStreamForAuth() OVERRIDE; + virtual HttpStream* RenewStreamForAuth(); - virtual bool IsResponseBodyComplete() const OVERRIDE; + virtual bool IsResponseBodyComplete() const; - virtual bool CanFindEndOfResponse() const OVERRIDE; + virtual bool CanFindEndOfResponse() const; - virtual bool IsMoreDataBuffered() const OVERRIDE; + virtual bool IsMoreDataBuffered() const; - virtual bool IsConnectionReused() const OVERRIDE; + virtual bool IsConnectionReused() const; - virtual void SetConnectionReused() OVERRIDE; + virtual void SetConnectionReused(); - virtual bool IsConnectionReusable() const OVERRIDE; + virtual void GetSSLInfo(SSLInfo* ssl_info); - virtual void GetSSLInfo(SSLInfo* ssl_info) OVERRIDE; + virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info); - virtual void GetSSLCertRequestInfo( - SSLCertRequestInfo* cert_request_info) OVERRIDE; - - virtual bool IsSpdyHttpStream() const OVERRIDE; + virtual bool IsSpdyHttpStream() const; private: scoped_refptr<GrowableIOBuffer> read_buf_; diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index 5cd2f92..46858e6 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -273,7 +273,7 @@ void HttpNetworkTransaction::DidDrainBodyForAuthRestart(bool keep_alive) { if (stream_.get()) { HttpStream* new_stream = NULL; - if (keep_alive && stream_->IsConnectionReusable()) { + if (keep_alive) { // We should call connection_->set_idle_time(), but this doesn't occur // often enough to be worth the trouble. stream_->SetConnectionReused(); @@ -281,10 +281,7 @@ void HttpNetworkTransaction::DidDrainBodyForAuthRestart(bool keep_alive) { } if (!new_stream) { - // Close the stream and mark it as not_reusable. Even in the - // keep_alive case, we've determined that the stream_ is not - // reusable if new_stream is NULL. - stream_->Close(true); + stream_->Close(!keep_alive); next_state_ = STATE_CREATE_STREAM; } else { next_state_ = STATE_INIT_STREAM; diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc index e11860c..64d53ba 100644 --- a/net/http/http_network_transaction_unittest.cc +++ b/net/http/http_network_transaction_unittest.cc @@ -1192,18 +1192,9 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthKeepAlive) { MockRead("Hello"), }; - // If there is a regression where we disconnect a Keep-Alive - // connection during an auth roundtrip, we'll end up reading this. - MockRead data_reads2[] = { - MockRead(false, ERR_FAILED), - }; - StaticSocketDataProvider data1(data_reads1, arraysize(data_reads1), data_writes1, arraysize(data_writes1)); - StaticSocketDataProvider data2(data_reads2, arraysize(data_reads2), - NULL, 0); session_deps.socket_factory.AddSocketDataProvider(&data1); - session_deps.socket_factory.AddSocketDataProvider(&data2); TestCompletionCallback callback1; @@ -1233,7 +1224,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthKeepAlive) { EXPECT_EQ(OK, rv); response = trans->GetResponseInfo(); - ASSERT_FALSE(response == NULL); + EXPECT_FALSE(response == NULL); EXPECT_TRUE(response->auth_challenge.get() == NULL); EXPECT_EQ(5, response->headers->GetContentLength()); } @@ -1274,17 +1265,9 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthKeepAliveNoBody) { MockRead("hello"), }; - // An incorrect reconnect would cause this to be read. - MockRead data_reads2[] = { - MockRead(false, ERR_FAILED), - }; - StaticSocketDataProvider data1(data_reads1, arraysize(data_reads1), data_writes1, arraysize(data_writes1)); - StaticSocketDataProvider data2(data_reads2, arraysize(data_reads2), - NULL, 0); session_deps.socket_factory.AddSocketDataProvider(&data1); - session_deps.socket_factory.AddSocketDataProvider(&data2); TestCompletionCallback callback1; @@ -1314,7 +1297,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthKeepAliveNoBody) { EXPECT_EQ(OK, rv); response = trans->GetResponseInfo(); - ASSERT_FALSE(response == NULL); + EXPECT_FALSE(response == NULL); EXPECT_TRUE(response->auth_challenge.get() == NULL); EXPECT_EQ(5, response->headers->GetContentLength()); } @@ -1363,17 +1346,9 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthKeepAliveLargeBody) { MockRead("hello"), }; - // An incorrect reconnect would cause this to be read. - MockRead data_reads2[] = { - MockRead(false, ERR_FAILED), - }; - StaticSocketDataProvider data1(data_reads1, arraysize(data_reads1), data_writes1, arraysize(data_writes1)); - StaticSocketDataProvider data2(data_reads2, arraysize(data_reads2), - NULL, 0); session_deps.socket_factory.AddSocketDataProvider(&data1); - session_deps.socket_factory.AddSocketDataProvider(&data2); TestCompletionCallback callback1; @@ -1403,7 +1378,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthKeepAliveLargeBody) { EXPECT_EQ(OK, rv); response = trans->GetResponseInfo(); - ASSERT_FALSE(response == NULL); + EXPECT_FALSE(response == NULL); EXPECT_TRUE(response->auth_challenge.get() == NULL); EXPECT_EQ(5, response->headers->GetContentLength()); } diff --git a/net/http/http_response_body_drainer_unittest.cc b/net/http/http_response_body_drainer_unittest.cc index 45c826e..9feed17 100644 --- a/net/http/http_response_body_drainer_unittest.cc +++ b/net/http/http_response_body_drainer_unittest.cc @@ -74,48 +74,44 @@ class MockHttpStream : public HttpStream { // HttpStream implementation: virtual int InitializeStream(const HttpRequestInfo* request_info, const BoundNetLog& net_log, - CompletionCallback* callback) OVERRIDE { + CompletionCallback* callback) { return ERR_UNEXPECTED; } virtual int SendRequest(const HttpRequestHeaders& request_headers, UploadDataStream* request_body, HttpResponseInfo* response, - CompletionCallback* callback) OVERRIDE { + CompletionCallback* callback) { return ERR_UNEXPECTED; } - virtual uint64 GetUploadProgress() const OVERRIDE { return 0; } - virtual int ReadResponseHeaders(CompletionCallback* callback) OVERRIDE { + virtual uint64 GetUploadProgress() const { return 0; } + virtual int ReadResponseHeaders(CompletionCallback* callback) { return ERR_UNEXPECTED; } - virtual const HttpResponseInfo* GetResponseInfo() const OVERRIDE { - return NULL; - } + virtual const HttpResponseInfo* GetResponseInfo() const { return NULL; } - virtual bool CanFindEndOfResponse() const OVERRIDE { return true; } - virtual bool IsMoreDataBuffered() const OVERRIDE { return false; } - virtual bool IsConnectionReused() const OVERRIDE { return false; } - virtual void SetConnectionReused() OVERRIDE {} - virtual bool IsConnectionReusable() const OVERRIDE { return false; } - virtual void GetSSLInfo(SSLInfo* ssl_info) OVERRIDE {} - virtual void GetSSLCertRequestInfo( - SSLCertRequestInfo* cert_request_info) OVERRIDE {} + virtual bool CanFindEndOfResponse() const { return true; } + virtual bool IsMoreDataBuffered() const { return false; } + virtual bool IsConnectionReused() const { return false; } + virtual void SetConnectionReused() {} + virtual void GetSSLInfo(SSLInfo* ssl_info) {} + virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) {} // Mocked API virtual int ReadResponseBody(IOBuffer* buf, int buf_len, - CompletionCallback* callback) OVERRIDE; - virtual void Close(bool not_reusable) OVERRIDE { + CompletionCallback* callback); + virtual void Close(bool not_reusable) { DCHECK(!closed_); closed_ = true; result_waiter_->set_result(not_reusable); } - virtual HttpStream* RenewStreamForAuth() OVERRIDE { + virtual HttpStream* RenewStreamForAuth() { return NULL; } - virtual bool IsResponseBodyComplete() const OVERRIDE { return is_complete_; } + virtual bool IsResponseBodyComplete() const { return is_complete_; } - virtual bool IsSpdyHttpStream() const OVERRIDE { return false; } + virtual bool IsSpdyHttpStream() const { return false; } // Methods to tweak/observer mock behavior: void StallReadsForever() { stall_reads_forever_ = true; } diff --git a/net/http/http_stream.h b/net/http/http_stream.h index fed64655..e262038 100644 --- a/net/http/http_stream.h +++ b/net/http/http_stream.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -116,10 +116,6 @@ class HttpStream { virtual bool IsConnectionReused() const = 0; virtual void SetConnectionReused() = 0; - // Checks whether the current state of the underlying connection - // allows it to be reused. - virtual bool IsConnectionReusable() const = 0; - // Get the SSLInfo associated with this stream's connection. This should // only be called for streams over SSL sockets, otherwise the behavior is // undefined. diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc index 0649bce..eb1ed35 100644 --- a/net/http/http_stream_parser.cc +++ b/net/http/http_stream_parser.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -700,10 +700,6 @@ void HttpStreamParser::SetConnectionReused() { connection_->set_is_reused(true); } -bool HttpStreamParser::IsConnectionReusable() const { - return connection_->socket() && connection_->socket()->IsConnectedAndIdle(); -} - void HttpStreamParser::GetSSLInfo(SSLInfo* ssl_info) { if (request_->url.SchemeIs("https") && connection_->socket()) { SSLClientSocket* ssl_socket = diff --git a/net/http/http_stream_parser.h b/net/http/http_stream_parser.h index 2192eff..d9241a6 100644 --- a/net/http/http_stream_parser.h +++ b/net/http/http_stream_parser.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -67,8 +67,6 @@ class HttpStreamParser : public ChunkCallback { void SetConnectionReused(); - bool IsConnectionReusable() const; - void GetSSLInfo(SSLInfo* ssl_info); void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info); diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc index ab10549..577c7d2 100644 --- a/net/socket/socket_test_util.cc +++ b/net/socket/socket_test_util.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -786,12 +786,6 @@ bool MockTCPClientSocket::IsConnectedAndIdle() const { return IsConnected(); } -int MockTCPClientSocket::GetPeerAddress(AddressList* address) const { - if (!IsConnected()) - return ERR_SOCKET_NOT_CONNECTED; - return MockClientSocket::GetPeerAddress(address); -} - bool MockTCPClientSocket::WasEverUsed() const { return was_used_to_convey_data_; } diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h index 42d4a46..823c3b8 100644 --- a/net/socket/socket_test_util.h +++ b/net/socket/socket_test_util.h @@ -622,7 +622,6 @@ class MockTCPClientSocket : public MockClientSocket { virtual void Disconnect(); virtual bool IsConnected() const; virtual bool IsConnectedAndIdle() const; - virtual int GetPeerAddress(AddressList* address) const; virtual bool WasEverUsed() const; virtual bool UsingTCPFastOpen() const; diff --git a/net/socket/transport_client_socket_unittest.cc b/net/socket/transport_client_socket_unittest.cc index 28b70d4..837749e 100644 --- a/net/socket/transport_client_socket_unittest.cc +++ b/net/socket/transport_client_socket_unittest.cc @@ -48,7 +48,9 @@ class TransportClientSocketTest } virtual void DidRead(ListenSocket*, const char* str, int len) { // TODO(dkegel): this might not be long enough to tickle some bugs. - SendServerReply(); + connected_sock_->Send(kServerReply, + arraysize(kServerReply) - 1, + false /* don't append line feed */); } virtual void DidClose(ListenSocket* sock) {} @@ -68,16 +70,6 @@ class TransportClientSocketTest connected_sock_->ResumeReads(); } - void SendServerReply() { - connected_sock_->Send(kServerReply, arraysize(kServerReply) - 1, - false /* Don't append line feed */); - } - - uint32 DrainClientSocket(IOBuffer* buf, - uint32 buf_len, - uint32 bytes_to_read, - TestCompletionCallback* callback); - protected: int listen_port_; CapturingNetLog net_log_; @@ -123,26 +115,6 @@ void TransportClientSocketTest::SetUp() { NetLog::Source())); } -uint32 TransportClientSocketTest::DrainClientSocket( - IOBuffer* buf, uint32 buf_len, - uint32 bytes_to_read, TestCompletionCallback* callback) { - int rv = OK; - uint32 bytes_read = 0; - - while (bytes_read < bytes_to_read) { - rv = sock_->Read(buf, buf_len, callback); - EXPECT_TRUE(rv >= 0 || rv == ERR_IO_PENDING); - - if (rv == ERR_IO_PENDING) - rv = callback->WaitForResult(); - - EXPECT_GE(rv, 0); - bytes_read += rv; - } - - return bytes_read; -} - // TODO(leighton): Add SCTP to this list when it is ready. INSTANTIATE_TEST_CASE_P(ClientSocket, TransportClientSocketTest, @@ -175,59 +147,9 @@ TEST_P(TransportClientSocketTest, Connect) { EXPECT_FALSE(sock_->IsConnected()); } -TEST_P(TransportClientSocketTest, IsConnected) { - scoped_refptr<IOBuffer> buf(new IOBuffer(4096)); - TestCompletionCallback callback; - uint32 bytes_read; - - EXPECT_FALSE(sock_->IsConnected()); - int rv = sock_->Connect(&callback); - if (rv != OK) { - ASSERT_EQ(rv, ERR_IO_PENDING); - - rv = callback.WaitForResult(); - EXPECT_EQ(rv, OK); - } - - EXPECT_TRUE(sock_->IsConnected()); - EXPECT_TRUE(sock_->IsConnectedAndIdle()); - - // Server sends some data - SendServerReply(); - // Drain a single byte so we know we've received some data. - bytes_read = DrainClientSocket(buf, 1, 1, &callback); - ASSERT_EQ(bytes_read, 1u); - - // Socket should be considered connected, but not idle, - EXPECT_TRUE(sock_->IsConnected()); - EXPECT_FALSE(sock_->IsConnectedAndIdle()); - - bytes_read = DrainClientSocket(buf, 4096, arraysize(kServerReply) - 2, - &callback); - ASSERT_EQ(bytes_read, arraysize(kServerReply) - 2); - - // After draining the data, the socket should be back to connected - // and idle. - EXPECT_TRUE(sock_->IsConnected()); - EXPECT_TRUE(sock_->IsConnectedAndIdle()); - - // This time close the server socket immediately after sending. - SendServerReply(); - CloseServerSocket(); - - // As above because of data. - EXPECT_TRUE(sock_->IsConnected()); - EXPECT_FALSE(sock_->IsConnectedAndIdle()); - - bytes_read = DrainClientSocket(buf, 4096, arraysize(kServerReply) - 1, - &callback); - ASSERT_EQ(bytes_read, arraysize(kServerReply) - 1); - - // Once the data is drained, the socket should now be seen as - // closed. - EXPECT_FALSE(sock_->IsConnected()); - EXPECT_FALSE(sock_->IsConnectedAndIdle()); -} +// TODO(wtc): Add unit tests for IsConnectedAndIdle: +// - Server closes a connection. +// - Server sends data unexpectedly. TEST_P(TransportClientSocketTest, Read) { TestCompletionCallback callback; @@ -253,9 +175,17 @@ TEST_P(TransportClientSocketTest, Read) { } scoped_refptr<IOBuffer> buf(new IOBuffer(4096)); - uint32 bytes_read = DrainClientSocket(buf, 4096, arraysize(kServerReply) - 1, - &callback); - ASSERT_EQ(bytes_read, arraysize(kServerReply) - 1); + uint32 bytes_read = 0; + while (bytes_read < arraysize(kServerReply) - 1) { + rv = sock_->Read(buf, 4096, &callback); + EXPECT_TRUE(rv >= 0 || rv == ERR_IO_PENDING); + + if (rv == ERR_IO_PENDING) + rv = callback.WaitForResult(); + + ASSERT_GE(rv, 0); + bytes_read += rv; + } // All data has been read now. Read once more to force an ERR_IO_PENDING, and // then close the server socket, and note the close. diff --git a/net/spdy/spdy_http_stream.cc b/net/spdy/spdy_http_stream.cc index ac0c4ce..130a818 100644 --- a/net/spdy/spdy_http_stream.cc +++ b/net/spdy/spdy_http_stream.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -177,11 +177,6 @@ void SpdyHttpStream::SetConnectionReused() { // SPDY doesn't need an indicator here. } -bool SpdyHttpStream::IsConnectionReusable() const { - // SPDY streams aren't considered reusable. - return false; -} - void SpdyHttpStream::set_chunk_callback(ChunkCallback* callback) { if (request_body_stream_ != NULL) request_body_stream_->set_chunk_callback(callback); diff --git a/net/spdy/spdy_http_stream.h b/net/spdy/spdy_http_stream.h index 31f62f6..6bc5053 100644 --- a/net/spdy/spdy_http_stream.h +++ b/net/spdy/spdy_http_stream.h @@ -45,41 +45,39 @@ class SpdyHttpStream : public SpdyStream::Delegate, public HttpStream { // HttpStream methods: virtual int InitializeStream(const HttpRequestInfo* request_info, const BoundNetLog& net_log, - CompletionCallback* callback) OVERRIDE; + CompletionCallback* callback); virtual int SendRequest(const HttpRequestHeaders& headers, UploadDataStream* request_body, HttpResponseInfo* response, - CompletionCallback* callback) OVERRIDE; - virtual uint64 GetUploadProgress() const OVERRIDE; - virtual int ReadResponseHeaders(CompletionCallback* callback) OVERRIDE; + CompletionCallback* callback); + virtual uint64 GetUploadProgress() const; + virtual int ReadResponseHeaders(CompletionCallback* callback); virtual const HttpResponseInfo* GetResponseInfo() const; virtual int ReadResponseBody(IOBuffer* buf, int buf_len, - CompletionCallback* callback) OVERRIDE; - virtual void Close(bool not_reusable) OVERRIDE; - virtual HttpStream* RenewStreamForAuth() OVERRIDE; - virtual bool IsResponseBodyComplete() const OVERRIDE; - virtual bool CanFindEndOfResponse() const OVERRIDE; - virtual bool IsMoreDataBuffered() const OVERRIDE; - virtual bool IsConnectionReused() const OVERRIDE; - virtual void SetConnectionReused() OVERRIDE; - virtual bool IsConnectionReusable() const OVERRIDE; - virtual void GetSSLInfo(SSLInfo* ssl_info) OVERRIDE; - virtual void GetSSLCertRequestInfo( - SSLCertRequestInfo* cert_request_info) OVERRIDE; - virtual bool IsSpdyHttpStream() const OVERRIDE; + CompletionCallback* callback); + virtual void Close(bool not_reusable); + virtual HttpStream* RenewStreamForAuth(); + virtual bool IsResponseBodyComplete() const; + virtual bool CanFindEndOfResponse() const; + virtual bool IsMoreDataBuffered() const; + virtual bool IsConnectionReused() const; + virtual void SetConnectionReused(); + virtual void GetSSLInfo(SSLInfo* ssl_info); + virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info); + virtual bool IsSpdyHttpStream() const; // SpdyStream::Delegate methods: - virtual bool OnSendHeadersComplete(int status) OVERRIDE; - virtual int OnSendBody() OVERRIDE; - virtual int OnSendBodyComplete(int status, bool* eof) OVERRIDE; + virtual bool OnSendHeadersComplete(int status); + virtual int OnSendBody(); + virtual int OnSendBodyComplete(int status, bool* eof); virtual int OnResponseReceived(const spdy::SpdyHeaderBlock& response, base::Time response_time, - int status) OVERRIDE; - virtual void OnDataReceived(const char* buffer, int bytes) OVERRIDE; - virtual void OnDataSent(int length) OVERRIDE; - virtual void OnClose(int status) OVERRIDE; - virtual void set_chunk_callback(ChunkCallback* callback) OVERRIDE; + int status); + virtual void OnDataReceived(const char* buffer, int bytes); + virtual void OnDataSent(int length); + virtual void OnClose(int status); + virtual void set_chunk_callback(ChunkCallback* callback); private: FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, FlowControlStallResume); |