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

Side by Side Diff: net/quic/chromium/quic_chromium_client_session.cc

Issue 2609493002: Landing Recent QUIC changes until 05:15 PM, Dec 24, 2016 UTC (Closed)
Patch Set: Fix random. Created 3 years, 11 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
« no previous file with comments | « net/net.gypi ('k') | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chromium/quic_chromium_client_session.h" 5 #include "net/quic/chromium/quic_chromium_client_session.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 SpdyStreamId stream_id, 140 SpdyStreamId stream_id,
141 SpdyStreamId promised_stream_id, 141 SpdyStreamId promised_stream_id,
142 NetLogCaptureMode capture_mode) { 142 NetLogCaptureMode capture_mode) {
143 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 143 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
144 dict->Set("headers", ElideSpdyHeaderBlockForNetLog(*headers, capture_mode)); 144 dict->Set("headers", ElideSpdyHeaderBlockForNetLog(*headers, capture_mode));
145 dict->SetInteger("id", stream_id); 145 dict->SetInteger("id", stream_id);
146 dict->SetInteger("promised_stream_id", promised_stream_id); 146 dict->SetInteger("promised_stream_id", promised_stream_id);
147 return std::move(dict); 147 return std::move(dict);
148 } 148 }
149 149
150 class HpackEncoderDebugVisitor : public QuicHeadersStream::HpackDebugVisitor { 150 class HpackEncoderDebugVisitor : public QuicHpackDebugVisitor {
151 void OnUseEntry(QuicTime::Delta elapsed) override { 151 void OnUseEntry(QuicTime::Delta elapsed) override {
152 UMA_HISTOGRAM_TIMES( 152 UMA_HISTOGRAM_TIMES(
153 "Net.QuicHpackEncoder.IndexedEntryAge", 153 "Net.QuicHpackEncoder.IndexedEntryAge",
154 base::TimeDelta::FromMicroseconds(elapsed.ToMicroseconds())); 154 base::TimeDelta::FromMicroseconds(elapsed.ToMicroseconds()));
155 } 155 }
156 }; 156 };
157 157
158 class HpackDecoderDebugVisitor : public QuicHeadersStream::HpackDebugVisitor { 158 class HpackDecoderDebugVisitor : public QuicHpackDebugVisitor {
159 void OnUseEntry(QuicTime::Delta elapsed) override { 159 void OnUseEntry(QuicTime::Delta elapsed) override {
160 UMA_HISTOGRAM_TIMES( 160 UMA_HISTOGRAM_TIMES(
161 "Net.QuicHpackDecoder.IndexedEntryAge", 161 "Net.QuicHpackDecoder.IndexedEntryAge",
162 base::TimeDelta::FromMicroseconds(elapsed.ToMicroseconds())); 162 base::TimeDelta::FromMicroseconds(elapsed.ToMicroseconds()));
163 } 163 }
164 }; 164 };
165 165
166 class QuicServerPushHelper : public ServerPushDelegate::ServerPushHelper { 166 class QuicServerPushHelper : public ServerPushDelegate::ServerPushHelper {
167 public: 167 public:
168 explicit QuicServerPushHelper( 168 explicit QuicServerPushHelper(
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTimeLongRtt", 422 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTimeLongRtt",
423 reordering, 1, kMaxReordering, 50); 423 reordering, 1, kMaxReordering, 50);
424 } 424 }
425 UMA_HISTOGRAM_COUNTS( 425 UMA_HISTOGRAM_COUNTS(
426 "Net.QuicSession.MaxReordering", 426 "Net.QuicSession.MaxReordering",
427 static_cast<base::HistogramBase::Sample>(stats.max_sequence_reordering)); 427 static_cast<base::HistogramBase::Sample>(stats.max_sequence_reordering));
428 } 428 }
429 429
430 void QuicChromiumClientSession::Initialize() { 430 void QuicChromiumClientSession::Initialize() {
431 QuicClientSessionBase::Initialize(); 431 QuicClientSessionBase::Initialize();
432 headers_stream()->SetHpackEncoderDebugVisitor( 432 SetHpackEncoderDebugVisitor(
433 base::MakeUnique<HpackEncoderDebugVisitor>()); 433 base::MakeUnique<HpackEncoderDebugVisitor>());
434 headers_stream()->SetHpackDecoderDebugVisitor( 434 SetHpackDecoderDebugVisitor(
435 base::MakeUnique<HpackDecoderDebugVisitor>()); 435 base::MakeUnique<HpackDecoderDebugVisitor>());
436 } 436 }
437 437
438 void QuicChromiumClientSession::OnHeadersHeadOfLineBlocking( 438 void QuicChromiumClientSession::OnHeadersHeadOfLineBlocking(
439 QuicTime::Delta delta) { 439 QuicTime::Delta delta) {
440 UMA_HISTOGRAM_TIMES( 440 UMA_HISTOGRAM_TIMES(
441 "Net.QuicSession.HeadersHOLBlockedTime", 441 "Net.QuicSession.HeadersHOLBlockedTime",
442 base::TimeDelta::FromMicroseconds(delta.ToMicroseconds())); 442 base::TimeDelta::FromMicroseconds(delta.ToMicroseconds()));
443 } 443 }
444 444
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
1513 connect_timing_.ssl_start = connect_timing_.connect_start; 1513 connect_timing_.ssl_start = connect_timing_.connect_start;
1514 connect_timing_.ssl_end = connect_timing_.connect_end; 1514 connect_timing_.ssl_end = connect_timing_.connect_end;
1515 return connect_timing_; 1515 return connect_timing_;
1516 } 1516 }
1517 1517
1518 QuicVersion QuicChromiumClientSession::GetQuicVersion() const { 1518 QuicVersion QuicChromiumClientSession::GetQuicVersion() const {
1519 return connection()->version(); 1519 return connection()->version();
1520 } 1520 }
1521 1521
1522 } // namespace net 1522 } // namespace net
OLDNEW
« no previous file with comments | « net/net.gypi ('k') | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698