Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(468)

Side by Side Diff: net/quic/quic_headers_stream.cc

Issue 1961573002: Avoids the "re-encode HPACK as SPDY3" step. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoids the "re-encode HPACK as SPDY3" step. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 if (promised_stream_id_ == kInvalidStreamId) { 367 if (promised_stream_id_ == kInvalidStreamId) {
369 spdy_session_->OnStreamHeaders(stream_id_, StringPiece(header_data, len)); 368 spdy_session_->OnStreamHeaders(stream_id_, StringPiece(header_data, len));
370 } else { 369 } else {
371 spdy_session_->OnPromiseHeaders(stream_id_, 370 spdy_session_->OnPromiseHeaders(stream_id_,
372 StringPiece(header_data, len)); 371 StringPiece(header_data, len));
373 } 372 }
374 } 373 }
375 } 374 }
376 375
377 void QuicHeadersStream::OnHeaderList(const QuicHeaderList& header_list) { 376 void QuicHeadersStream::OnHeaderList(const QuicHeaderList& header_list) {
377 DVLOG(1) << "Received header list for stream " << stream_id_ << ": "
378 << header_list.DebugString();
378 if (measure_headers_hol_blocking_time_) { 379 if (measure_headers_hol_blocking_time_) {
379 if (prev_max_timestamp_ > cur_max_timestamp_) { 380 if (prev_max_timestamp_ > cur_max_timestamp_) {
380 // prev_max_timestamp_ > cur_max_timestamp_ implies that 381 // prev_max_timestamp_ > cur_max_timestamp_ implies that
381 // headers from lower numbered streams actually came off the 382 // headers from lower numbered streams actually came off the
382 // wire after headers for the current stream, hence there was 383 // wire after headers for the current stream, hence there was
383 // HOL blocking. 384 // HOL blocking.
384 QuicTime::Delta delta = prev_max_timestamp_.Subtract(cur_max_timestamp_); 385 QuicTime::Delta delta = prev_max_timestamp_.Subtract(cur_max_timestamp_);
385 DVLOG(1) << "stream " << stream_id_ 386 DVLOG(1) << "stream " << stream_id_
386 << ": Net.QuicSession.HeadersHOLBlockedTime " 387 << ": Net.QuicSession.HeadersHOLBlockedTime "
387 << delta.ToMilliseconds(); 388 << delta.ToMilliseconds();
(...skipping 23 matching lines...) Expand all
411 412
412 bool QuicHeadersStream::IsConnected() { 413 bool QuicHeadersStream::IsConnected() {
413 return session()->connection()->connected(); 414 return session()->connection()->connected();
414 } 415 }
415 416
416 void QuicHeadersStream::DisableHpackDynamicTable() { 417 void QuicHeadersStream::DisableHpackDynamicTable() {
417 spdy_framer_.UpdateHeaderEncoderTableSize(0); 418 spdy_framer_.UpdateHeaderEncoderTableSize(0);
418 } 419 }
419 420
420 } // namespace net 421 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698