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

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

Issue 2073323003: QUIC - Added a histogram to track number of times session_ is null when (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments Created 4 years, 6 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 | « no previous file | tools/metrics/histograms/histograms.xml » ('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/quic_http_stream.h" 5 #include "net/quic/quic_http_stream.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/metrics/histogram_macros.h" 8 #include "base/metrics/histogram_macros.h"
9 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 NOTREACHED() << "next_state_: " << next_state_; 604 NOTREACHED() << "next_state_: " << next_state_;
605 break; 605 break;
606 } 606 }
607 } while (next_state_ != STATE_NONE && next_state_ != STATE_OPEN && 607 } while (next_state_ != STATE_NONE && next_state_ != STATE_OPEN &&
608 rv != ERR_IO_PENDING); 608 rv != ERR_IO_PENDING);
609 609
610 return rv; 610 return rv;
611 } 611 }
612 612
613 int QuicHttpStream::DoStreamRequest() { 613 int QuicHttpStream::DoStreamRequest() {
614 if (session_.get() == nullptr) { 614 // TODO(rtenneti) Bug: b/28676259 - a temporary fix until we find out why
615 // TODO(rtenneti) Bug: b/28676259 - a temporary fix until we find out why 615 // |session_| could be a nullptr. Delete |null_session| check and histogram if
616 // |session_| could be a nullptr. 616 // session is never a nullptr.
617 bool null_session = session_ == nullptr;
618 if (null_session) {
619 UMA_HISTOGRAM_BOOLEAN("Net.QuicHttpStream::DoStreamRequest.IsNullSession",
620 null_session);
617 return was_handshake_confirmed_ ? ERR_CONNECTION_CLOSED 621 return was_handshake_confirmed_ ? ERR_CONNECTION_CLOSED
618 : ERR_QUIC_HANDSHAKE_FAILED; 622 : ERR_QUIC_HANDSHAKE_FAILED;
619 } 623 }
620 int rv = stream_request_.StartRequest( 624 int rv = stream_request_.StartRequest(
621 session_, &stream_, 625 session_, &stream_,
622 base::Bind(&QuicHttpStream::OnStreamReady, weak_factory_.GetWeakPtr())); 626 base::Bind(&QuicHttpStream::OnStreamReady, weak_factory_.GetWeakPtr()));
623 if (rv == OK) { 627 if (rv == OK) {
624 stream_->SetDelegate(this); 628 stream_->SetDelegate(this);
625 if (request_info_->load_flags & LOAD_DISABLE_CONNECTION_MIGRATION) { 629 if (request_info_->load_flags & LOAD_DISABLE_CONNECTION_MIGRATION) {
626 stream_->DisableConnectionMigration(); 630 stream_->DisableConnectionMigration();
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 closed_stream_sent_bytes_ = stream_->stream_bytes_written(); 812 closed_stream_sent_bytes_ = stream_->stream_bytes_written();
809 stream_ = nullptr; 813 stream_ = nullptr;
810 814
811 // If |request_body_stream_| is non-NULL, Reset it, to abort any in progress 815 // If |request_body_stream_| is non-NULL, Reset it, to abort any in progress
812 // read. 816 // read.
813 if (request_body_stream_) 817 if (request_body_stream_)
814 request_body_stream_->Reset(); 818 request_body_stream_->Reset();
815 } 819 }
816 820
817 } // namespace net 821 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698