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

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

Issue 2766603004: QUIC: mark QUIC handshake failed if connection is closed after CryptoConnect (Closed)
Patch Set: Created 3 years, 9 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 (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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 if (IsCryptoHandshakeConfirmed()) { 673 if (IsCryptoHandshakeConfirmed()) {
674 connect_timing_.connect_end = base::TimeTicks::Now(); 674 connect_timing_.connect_end = base::TimeTicks::Now();
675 return OK; 675 return OK;
676 } 676 }
677 677
678 // Unless we require handshake confirmation, activate the session if 678 // Unless we require handshake confirmation, activate the session if
679 // we have established initial encryption. 679 // we have established initial encryption.
680 if (!require_confirmation_ && IsEncryptionEstablished()) 680 if (!require_confirmation_ && IsEncryptionEstablished())
681 return OK; 681 return OK;
682 682
683 if (!connection()->connected())
684 return ERR_QUIC_HANDSHAKE_FAILED;
Ryan Hamilton 2017/03/22 02:38:48 Please move this to immediately after the call to
Zhongyi Shi 2017/03/22 07:00:11 Done.
685
683 callback_ = callback; 686 callback_ = callback;
684 return ERR_IO_PENDING; 687 return ERR_IO_PENDING;
685 } 688 }
686 689
687 int QuicChromiumClientSession::ResumeCryptoConnect( 690 int QuicChromiumClientSession::ResumeCryptoConnect(
688 const CompletionCallback& callback) { 691 const CompletionCallback& callback) {
689 if (IsCryptoHandshakeConfirmed()) { 692 if (IsCryptoHandshakeConfirmed()) {
690 connect_timing_.connect_end = base::TimeTicks::Now(); 693 connect_timing_.connect_end = base::TimeTicks::Now();
691 return OK; 694 return OK;
692 } 695 }
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
1520 } 1523 }
1521 1524
1522 size_t QuicChromiumClientSession::EstimateMemoryUsage() const { 1525 size_t QuicChromiumClientSession::EstimateMemoryUsage() const {
1523 // TODO(xunjieli): Estimate |crypto_stream_|, QuicSpdySession's 1526 // TODO(xunjieli): Estimate |crypto_stream_|, QuicSpdySession's
1524 // QuicHeaderList, QuicSession's QuiCWriteBlockedList, open streams and 1527 // QuicHeaderList, QuicSession's QuiCWriteBlockedList, open streams and
1525 // unacked packet map. 1528 // unacked packet map.
1526 return base::trace_event::EstimateMemoryUsage(packet_readers_); 1529 return base::trace_event::EstimateMemoryUsage(packet_readers_);
1527 } 1530 }
1528 1531
1529 } // namespace net 1532 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698