diff options
author | bnc <bnc@chromium.org> | 2015-06-23 14:38:26 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-23 21:39:01 +0000 |
commit | d8ad9a7c88b978ebcb655c5e0a389fde9b169dbc (patch) | |
tree | 7db516568cdbe9a7ed5955c4830a34f1b0cd567f /net/tools/flip_server | |
parent | c5d9a0ea754aba8264a36e59d2a60a6722fd56b3 (diff) | |
download | chromium_src-d8ad9a7c88b978ebcb655c5e0a389fde9b169dbc.zip chromium_src-d8ad9a7c88b978ebcb655c5e0a389fde9b169dbc.tar.gz chromium_src-d8ad9a7c88b978ebcb655c5e0a389fde9b169dbc.tar.bz2 |
Parse stream dependency values carried in HTTP/2 headers frame.
Modify SpdyFramer to parse stream dependency values present in HTTP/2 headers
frames, and pass them to SpdyFramerVisitorInterface::OnHeaders() via two newly
added parameters, |parent_stream_id| and |exclusive|. Modify existing
implementations of SpdyFramerVisitorInterface::OnHeaders() to accept and ignore
the new arguments.
This CL lands server change 95217891 by mpw.
BUG=500673
Review URL: https://codereview.chromium.org/1196473003
Cr-Commit-Position: refs/heads/master@{#335754}
Diffstat (limited to 'net/tools/flip_server')
-rw-r--r-- | net/tools/flip_server/spdy_interface.cc | 2 | ||||
-rw-r--r-- | net/tools/flip_server/spdy_interface.h | 2 | ||||
-rw-r--r-- | net/tools/flip_server/spdy_interface_test.cc | 29 |
3 files changed, 21 insertions, 12 deletions
diff --git a/net/tools/flip_server/spdy_interface.cc b/net/tools/flip_server/spdy_interface.cc index facbe5b..6217afb 100644 --- a/net/tools/flip_server/spdy_interface.cc +++ b/net/tools/flip_server/spdy_interface.cc @@ -292,6 +292,8 @@ void SpdySM::OnSynReply(SpdyStreamId stream_id, void SpdySM::OnHeaders(SpdyStreamId stream_id, bool has_priority, SpdyPriority priority, + SpdyStreamId parent_stream_id, + bool exclusive, bool fin, const SpdyHeaderBlock& headers) { VLOG(2) << ACCEPTOR_CLIENT_IDENT << "SpdySM: OnHeaders(" << stream_id << ")"; diff --git a/net/tools/flip_server/spdy_interface.h b/net/tools/flip_server/spdy_interface.h index 20bc0c9..8055635 100644 --- a/net/tools/flip_server/spdy_interface.h +++ b/net/tools/flip_server/spdy_interface.h @@ -83,6 +83,8 @@ class SpdySM : public BufferedSpdyFramerVisitorInterface, public SMInterface { void OnHeaders(SpdyStreamId stream_id, bool has_priority, SpdyPriority priority, + SpdyStreamId parent_stream_id, + bool exclusive, bool fin, const SpdyHeaderBlock& headers) override; diff --git a/net/tools/flip_server/spdy_interface_test.cc b/net/tools/flip_server/spdy_interface_test.cc index 5f89a2b..412401c 100644 --- a/net/tools/flip_server/spdy_interface_test.cc +++ b/net/tools/flip_server/spdy_interface_test.cc @@ -52,12 +52,14 @@ class SpdyFramerVisitor : public BufferedSpdyFramerVisitorInterface { bool, const SpdyHeaderBlock&)); MOCK_METHOD3(OnSynReply, void(SpdyStreamId, bool, const SpdyHeaderBlock&)); - MOCK_METHOD5(OnHeaders, - void(SpdyStreamId, - bool, - SpdyPriority, - bool, - const SpdyHeaderBlock&)); + MOCK_METHOD7(OnHeaders, + void(SpdyStreamId stream_id, + bool has_priority, + SpdyPriority priority, + SpdyStreamId parent_stream_id, + bool exclusive, + bool fin, + const SpdyHeaderBlock& headers)); MOCK_METHOD3(OnDataFrameHeader, void(SpdyStreamId, size_t, bool)); MOCK_METHOD4(OnStreamFrameData, void(SpdyStreamId, const char*, @@ -367,8 +369,9 @@ TEST_P(SpdySMProxyTest, SendErrorNotFound) { .WillOnce(SaveArg<2>(&actual_header_block)); } else { EXPECT_CALL(*spdy_framer_visitor_, - OnHeaders(stream_id, false, 0, false, _)) - .WillOnce(SaveArg<4>(&actual_header_block)); + OnHeaders(stream_id, /*has_priority=*/false, _, _, _, + /*fin=*/false, _)) + .WillOnce(SaveArg<6>(&actual_header_block)); } EXPECT_CALL(checkpoint, Call(0)); EXPECT_CALL(*spdy_framer_visitor_, @@ -446,8 +449,9 @@ TEST_P(SpdySMProxyTest, SendSynReply) { .WillOnce(SaveArg<2>(&actual_header_block)); } else { EXPECT_CALL(*spdy_framer_visitor_, - OnHeaders(stream_id, false, 0, false, _)) - .WillOnce(SaveArg<4>(&actual_header_block)); + OnHeaders(stream_id, /*has_priority=*/false, _, _, _, + /*fin=*/false, _)) + .WillOnce(SaveArg<6>(&actual_header_block)); } } @@ -572,8 +576,9 @@ TEST_P(SpdySMServerTest, NewStreamError) { .WillOnce(SaveArg<2>(&actual_header_block)); } else { EXPECT_CALL(*spdy_framer_visitor_, - OnHeaders(stream_id, false, 0, false, _)) - .WillOnce(SaveArg<4>(&actual_header_block)); + OnHeaders(stream_id, /*has_priority=*/false, _, _, _, + /*fin=*/false, _)) + .WillOnce(SaveArg<6>(&actual_header_block)); } EXPECT_CALL(checkpoint, Call(0)); EXPECT_CALL(*spdy_framer_visitor_, |