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

Unified Diff: net/spdy/spdy_proxy_client_socket.cc

Issue 17382012: [SPDY] Refactor SpdyStream's handling of response headers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More updates from rebase Created 7 years, 6 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 | « net/spdy/spdy_proxy_client_socket.h ('k') | net/spdy/spdy_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 641637ad9f85addd5741c41e18563bdd619bddc0..d7b97c2e6b1a2c648c11bef6fc3f9cb1be1a9966 100644
--- a/net/spdy/spdy_proxy_client_socket.cc
+++ b/net/spdy/spdy_proxy_client_socket.cc
@@ -439,27 +439,25 @@ void SpdyProxyClientSocket::OnRequestHeadersSent() {
OnIOComplete(OK);
}
-int SpdyProxyClientSocket::OnResponseHeadersReceived(
- const SpdyHeaderBlock& response,
- base::Time response_time,
- int status) {
+SpdyResponseHeadersStatus SpdyProxyClientSocket::OnResponseHeadersUpdated(
+ const SpdyHeaderBlock& response_headers) {
// If we've already received the reply, existing headers are too late.
// TODO(mbelshe): figure out a way to make HEADERS frames useful after the
// initial response.
if (next_state_ != STATE_READ_REPLY_COMPLETE)
- return OK;
+ return RESPONSE_HEADERS_ARE_COMPLETE;
// Save the response
if (!SpdyHeadersToHttpResponse(
- response, spdy_stream_->GetProtocolVersion(), &response_))
- return ERR_INCOMPLETE_SPDY_HEADERS;
+ response_headers, spdy_stream_->GetProtocolVersion(), &response_))
+ return RESPONSE_HEADERS_ARE_INCOMPLETE;
- OnIOComplete(status);
- return OK;
+ OnIOComplete(OK);
+ return RESPONSE_HEADERS_ARE_COMPLETE;
}
// Called when data is received or on EOF (if |buffer| is NULL).
-int SpdyProxyClientSocket::OnDataReceived(scoped_ptr<SpdyBuffer> buffer) {
+void SpdyProxyClientSocket::OnDataReceived(scoped_ptr<SpdyBuffer> buffer) {
if (buffer) {
net_log_.AddByteTransferEvent(NetLog::TYPE_SOCKET_BYTES_RECEIVED,
buffer->GetRemainingSize(),
@@ -477,7 +475,6 @@ int SpdyProxyClientSocket::OnDataReceived(scoped_ptr<SpdyBuffer> buffer) {
user_buffer_len_ = 0;
c.Run(rv);
}
- return OK;
}
void SpdyProxyClientSocket::OnDataSent() {
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.h ('k') | net/spdy/spdy_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698