| 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" |
| 13 #include "net/quic/quic_spdy_session.h" | 14 #include "net/quic/quic_spdy_session.h" |
| 14 #include "net/quic/quic_time.h" | 15 #include "net/quic/quic_time.h" |
| 15 | 16 |
| 16 using base::StringPiece; | 17 using base::StringPiece; |
| 17 using net::HTTP2; | 18 using net::HTTP2; |
| 18 using net::SpdyFrameType; | 19 using net::SpdyFrameType; |
| 19 using std::string; | 20 using std::string; |
| 20 | 21 |
| 21 namespace net { | 22 namespace net { |
| 22 | 23 |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 if (promised_stream_id_ == kInvalidStreamId) { | 368 if (promised_stream_id_ == kInvalidStreamId) { |
| 368 spdy_session_->OnStreamHeaders(stream_id_, StringPiece(header_data, len)); | 369 spdy_session_->OnStreamHeaders(stream_id_, StringPiece(header_data, len)); |
| 369 } else { | 370 } else { |
| 370 spdy_session_->OnPromiseHeaders(stream_id_, | 371 spdy_session_->OnPromiseHeaders(stream_id_, |
| 371 StringPiece(header_data, len)); | 372 StringPiece(header_data, len)); |
| 372 } | 373 } |
| 373 } | 374 } |
| 374 } | 375 } |
| 375 | 376 |
| 376 void QuicHeadersStream::OnHeaderList(const QuicHeaderList& header_list) { | 377 void QuicHeadersStream::OnHeaderList(const QuicHeaderList& header_list) { |
| 377 DVLOG(1) << "Received header list for stream " << stream_id_ << ": " | |
| 378 << header_list.DebugString(); | |
| 379 if (measure_headers_hol_blocking_time_) { | 378 if (measure_headers_hol_blocking_time_) { |
| 380 if (prev_max_timestamp_ > cur_max_timestamp_) { | 379 if (prev_max_timestamp_ > cur_max_timestamp_) { |
| 381 // prev_max_timestamp_ > cur_max_timestamp_ implies that | 380 // prev_max_timestamp_ > cur_max_timestamp_ implies that |
| 382 // headers from lower numbered streams actually came off the | 381 // headers from lower numbered streams actually came off the |
| 383 // wire after headers for the current stream, hence there was | 382 // wire after headers for the current stream, hence there was |
| 384 // HOL blocking. | 383 // HOL blocking. |
| 385 QuicTime::Delta delta = prev_max_timestamp_.Subtract(cur_max_timestamp_); | 384 QuicTime::Delta delta = prev_max_timestamp_.Subtract(cur_max_timestamp_); |
| 386 DVLOG(1) << "stream " << stream_id_ | 385 DVLOG(1) << "stream " << stream_id_ |
| 387 << ": Net.QuicSession.HeadersHOLBlockedTime " | 386 << ": Net.QuicSession.HeadersHOLBlockedTime " |
| 388 << delta.ToMilliseconds(); | 387 << delta.ToMilliseconds(); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 412 | 411 |
| 413 bool QuicHeadersStream::IsConnected() { | 412 bool QuicHeadersStream::IsConnected() { |
| 414 return session()->connection()->connected(); | 413 return session()->connection()->connected(); |
| 415 } | 414 } |
| 416 | 415 |
| 417 void QuicHeadersStream::DisableHpackDynamicTable() { | 416 void QuicHeadersStream::DisableHpackDynamicTable() { |
| 418 spdy_framer_.UpdateHeaderEncoderTableSize(0); | 417 spdy_framer_.UpdateHeaderEncoderTableSize(0); |
| 419 } | 418 } |
| 420 | 419 |
| 421 } // namespace net | 420 } // namespace net |
| OLD | NEW |