diff options
author | bnc <bnc@chromium.org> | 2015-02-26 08:51:46 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-26 16:52:43 +0000 |
commit | a25d7e09c74505a08160143dcd5b2e9d6b88874e (patch) | |
tree | 134e505f96b147e512c14da65edec540e6577393 /net | |
parent | 16ebe5b1584ec660893f8890f21a6c1d5cab80fe (diff) | |
download | chromium_src-a25d7e09c74505a08160143dcd5b2e9d6b88874e.zip chromium_src-a25d7e09c74505a08160143dcd5b2e9d6b88874e.tar.gz chromium_src-a25d7e09c74505a08160143dcd5b2e9d6b88874e.tar.bz2 |
Log sending HTTP/2 HEADERS frames correctly.
This CL changes the event type logged when HTTP/2 HEADERS frame is sent to
reflect that fact that it is not a SYN_STREAM (which does not even exist in
HTTP2).
BUG=456986
Review URL: https://codereview.chromium.org/959903002
Cr-Commit-Position: refs/heads/master@{#318249}
Diffstat (limited to 'net')
-rw-r--r-- | net/spdy/spdy_network_transaction_unittest.cc | 9 | ||||
-rw-r--r-- | net/spdy/spdy_session.cc | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc index 83f6bc0..a79d76a 100644 --- a/net/spdy/spdy_network_transaction_unittest.cc +++ b/net/spdy/spdy_network_transaction_unittest.cc @@ -3779,9 +3779,12 @@ TEST_P(SpdyNetworkTransactionTest, NetLog) { net::NetLog::PHASE_END); // Check that we logged all the headers correctly - pos = net::ExpectLogContainsSomewhere( - entries, 0, net::NetLog::TYPE_HTTP2_SESSION_SYN_STREAM, - net::NetLog::PHASE_NONE); + const NetLog::EventType type = + (GetParam().protocol <= kProtoSPDY31) + ? net::NetLog::TYPE_HTTP2_SESSION_SYN_STREAM + : net::NetLog::TYPE_HTTP2_SESSION_SEND_HEADERS; + pos = net::ExpectLogContainsSomewhere(entries, 0, type, + net::NetLog::PHASE_NONE); base::ListValue* header_list; ASSERT_TRUE(entries[pos].params.get()); diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc index b6318e0..a5a1ea6 100644 --- a/net/spdy/spdy_session.cc +++ b/net/spdy/spdy_session.cc @@ -1083,7 +1083,11 @@ scoped_ptr<SpdyFrame> SpdySession::CreateSynStream( streams_initiated_count_++; if (net_log().IsLogging()) { - net_log().AddEvent(NetLog::TYPE_HTTP2_SESSION_SYN_STREAM, + const NetLog::EventType type = + (GetProtocolVersion() <= SPDY3) + ? NetLog::TYPE_HTTP2_SESSION_SYN_STREAM + : NetLog::TYPE_HTTP2_SESSION_SEND_HEADERS; + net_log().AddEvent(type, base::Bind(&NetLogSpdySynStreamSentCallback, &block, (flags & CONTROL_FLAG_FIN) != 0, (flags & CONTROL_FLAG_UNIDIRECTIONAL) != 0, |