OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/quic/quic_headers_stream.h" | 5 #include "net/quic/quic_headers_stream.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "net/quic/quic_bug_tracker.h" | 10 #include "net/quic/quic_bug_tracker.h" |
11 #include "net/quic/quic_flags.h" | 11 #include "net/quic/quic_flags.h" |
12 #include "net/quic/quic_header_list.h" | 12 #include "net/quic/quic_header_list.h" |
13 #include "net/quic/quic_headers_stream.h" | |
14 #include "net/quic/quic_spdy_session.h" | 13 #include "net/quic/quic_spdy_session.h" |
15 #include "net/quic/quic_time.h" | 14 #include "net/quic/quic_time.h" |
16 | 15 |
17 using base::StringPiece; | 16 using base::StringPiece; |
18 using net::HTTP2; | 17 using net::HTTP2; |
19 using net::SpdyFrameType; | 18 using net::SpdyFrameType; |
20 using std::string; | 19 using std::string; |
21 | 20 |
22 namespace net { | 21 namespace net { |
23 | 22 |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 if (promised_stream_id_ == kInvalidStreamId) { | 405 if (promised_stream_id_ == kInvalidStreamId) { |
407 spdy_session_->OnStreamHeaders(stream_id_, StringPiece(header_data, len)); | 406 spdy_session_->OnStreamHeaders(stream_id_, StringPiece(header_data, len)); |
408 } else { | 407 } else { |
409 spdy_session_->OnPromiseHeaders(stream_id_, | 408 spdy_session_->OnPromiseHeaders(stream_id_, |
410 StringPiece(header_data, len)); | 409 StringPiece(header_data, len)); |
411 } | 410 } |
412 } | 411 } |
413 } | 412 } |
414 | 413 |
415 void QuicHeadersStream::OnHeaderList(const QuicHeaderList& header_list) { | 414 void QuicHeadersStream::OnHeaderList(const QuicHeaderList& header_list) { |
| 415 DVLOG(1) << "Received header list for stream " << stream_id_ << ": " |
| 416 << header_list.DebugString(); |
416 if (measure_headers_hol_blocking_time_) { | 417 if (measure_headers_hol_blocking_time_) { |
417 if (prev_max_timestamp_ > cur_max_timestamp_) { | 418 if (prev_max_timestamp_ > cur_max_timestamp_) { |
418 // prev_max_timestamp_ > cur_max_timestamp_ implies that | 419 // prev_max_timestamp_ > cur_max_timestamp_ implies that |
419 // headers from lower numbered streams actually came off the | 420 // headers from lower numbered streams actually came off the |
420 // wire after headers for the current stream, hence there was | 421 // wire after headers for the current stream, hence there was |
421 // HOL blocking. | 422 // HOL blocking. |
422 QuicTime::Delta delta = prev_max_timestamp_.Subtract(cur_max_timestamp_); | 423 QuicTime::Delta delta = prev_max_timestamp_.Subtract(cur_max_timestamp_); |
423 DVLOG(1) << "stream " << stream_id_ | 424 DVLOG(1) << "stream " << stream_id_ |
424 << ": Net.QuicSession.HeadersHOLBlockedTime " | 425 << ": Net.QuicSession.HeadersHOLBlockedTime " |
425 << delta.ToMilliseconds(); | 426 << delta.ToMilliseconds(); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 } | 464 } |
464 | 465 |
465 void QuicHeadersStream::SetHpackDecoderDebugVisitor( | 466 void QuicHeadersStream::SetHpackDecoderDebugVisitor( |
466 std::unique_ptr<HpackDebugVisitor> visitor) { | 467 std::unique_ptr<HpackDebugVisitor> visitor) { |
467 spdy_framer_.SetDecoderHeaderTableDebugVisitor( | 468 spdy_framer_.SetDecoderHeaderTableDebugVisitor( |
468 std::unique_ptr<HeaderTableDebugVisitor>(new HeaderTableDebugVisitor( | 469 std::unique_ptr<HeaderTableDebugVisitor>(new HeaderTableDebugVisitor( |
469 session()->connection()->helper()->GetClock(), std::move(visitor)))); | 470 session()->connection()->helper()->GetClock(), std::move(visitor)))); |
470 } | 471 } |
471 | 472 |
472 } // namespace net | 473 } // namespace net |
OLD | NEW |