Commit a25d7e09 authored by bnc's avatar bnc Committed by Commit bot

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}
parent 16ebe5b1
......@@ -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());
......
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment