summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_websocket_stream.h
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-24 07:42:15 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-24 07:42:15 +0000
commit6d116e1a351d44ced9f14fa6f7a56b2be487c8a1 (patch)
treeb230d09942c3babacc2d1bf5e80f50064c653b90 /net/spdy/spdy_websocket_stream.h
parente87089dbddd82041c1cceab2a886e8cf1f528931 (diff)
downloadchromium_src-6d116e1a351d44ced9f14fa6f7a56b2be487c8a1.zip
chromium_src-6d116e1a351d44ced9f14fa6f7a56b2be487c8a1.tar.gz
chromium_src-6d116e1a351d44ced9f14fa6f7a56b2be487c8a1.tar.bz2
[SPDY] Refactor SpdyStream's handling of response headers
Rename OnResponseHeadersReceived() to OnResponseHeadersUpdated() and remove some of its extraneous parameters. Document its semantics and that of the other delegate functions. Fix bug in PushedStreamReplayData() where the stream being closed/deleted wasn't handled correctly. Also fix memory leaks of the pending frames. Use continue_buffering_data_ only for push streams. Rename request_/response_ to request_headers_/response_headers_. Keep track of whether all required response headers are complete, and send data to the delegate only after that becomes true. Rename OnResponseHeadersReceived() and OnHeaders() to On{Initial,Additional}ResponseHeadersReceived(), respectively. Add MergeWithResponseHeaders() utility function and call it from On{Initial,Additional}ResponseHeadersReceived(). Always convert ERR_INCOMPLETE_SPDY_HEADERS to OK for push streams. Rename ContainsUpperAscii() (ambiguous) to ContainsUppercaseAscii(). Move some tests from SpdyNetworkTransaction to SpdyStream. Some other miscellaneous renaming and cleanup. BUG=251442 R=rch@chromium.org Review URL: https://codereview.chromium.org/17382012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208169 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_websocket_stream.h')
-rw-r--r--net/spdy/spdy_websocket_stream.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/net/spdy/spdy_websocket_stream.h b/net/spdy/spdy_websocket_stream.h
index 903c0bc..6975461 100644
--- a/net/spdy/spdy_websocket_stream.h
+++ b/net/spdy/spdy_websocket_stream.h
@@ -38,13 +38,12 @@ class NET_EXPORT_PRIVATE SpdyWebSocketStream
// has been sent.
virtual void OnSentSpdyHeaders() = 0;
- // Called on corresponding to OnResponseHeadersReceived() or
+ // Called on corresponding to OnResponseHeadersUpdated() or
// SPDY's SYN_STREAM, SYN_REPLY, or HEADERS frames are
// received. This callback may be called multiple times as SPDY's
// delegate does.
- virtual int OnReceivedSpdyResponseHeader(
- const SpdyHeaderBlock& headers,
- int status) = 0;
+ virtual void OnSpdyResponseHeadersUpdated(
+ const SpdyHeaderBlock& response_headers) = 0;
// Called when data is sent.
virtual void OnSentSpdyData(size_t bytes_sent) = 0;
@@ -76,10 +75,9 @@ class NET_EXPORT_PRIVATE SpdyWebSocketStream
// SpdyStream::Delegate
virtual void OnRequestHeadersSent() OVERRIDE;
- virtual int OnResponseHeadersReceived(const SpdyHeaderBlock& response,
- base::Time response_time,
- int status) OVERRIDE;
- virtual int OnDataReceived(scoped_ptr<SpdyBuffer> buffer) OVERRIDE;
+ virtual SpdyResponseHeadersStatus OnResponseHeadersUpdated(
+ const SpdyHeaderBlock& response_headers) OVERRIDE;
+ virtual void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) OVERRIDE;
virtual void OnDataSent() OVERRIDE;
virtual void OnClose(int status) OVERRIDE;