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

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

Issue 2124753005: Implements migration of a QUIC connection to a different destination address if specified by the se… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@write-error
Patch Set: Comments addressed. Created 4 years, 5 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/quic_chromium_client_session.h" 5 #include "net/quic/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 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 StreamRequest* request = stream_requests_.front(); 730 StreamRequest* request = stream_requests_.front();
731 stream_requests_.pop_front(); 731 stream_requests_.pop_front();
732 request->OnRequestCompleteSuccess(CreateOutgoingReliableStreamImpl()); 732 request->OnRequestCompleteSuccess(CreateOutgoingReliableStreamImpl());
733 } 733 }
734 734
735 if (GetNumOpenOutgoingStreams() == 0 && stream_factory_) { 735 if (GetNumOpenOutgoingStreams() == 0 && stream_factory_) {
736 stream_factory_->OnIdleSession(this); 736 stream_factory_->OnIdleSession(this);
737 } 737 }
738 } 738 }
739 739
740 void QuicChromiumClientSession::OnConfigNegotiated() {
741 QuicClientSessionBase::OnConfigNegotiated();
742 if (stream_factory_ && config()->HasReceivedAlternateServerAddress()) {
743 // Server has sent an alternate address to connect to.
744 stream_factory_->MigrateSessionToNewPeerAddress(
745 this, config()->ReceivedAlternateServerAddress(), net_log_, nullptr);
746 }
747 }
748
740 void QuicChromiumClientSession::OnCryptoHandshakeEvent( 749 void QuicChromiumClientSession::OnCryptoHandshakeEvent(
741 CryptoHandshakeEvent event) { 750 CryptoHandshakeEvent event) {
742 if (stream_factory_ && event == HANDSHAKE_CONFIRMED && 751 if (stream_factory_ && event == HANDSHAKE_CONFIRMED &&
743 (stream_factory_->OnHandshakeConfirmed( 752 (stream_factory_->OnHandshakeConfirmed(
744 this, logger_->ReceivedPacketLossRate()))) { 753 this, logger_->ReceivedPacketLossRate()))) {
745 return; 754 return;
746 } 755 }
747 756
748 if (!callback_.is_null() && 757 if (!callback_.is_null() &&
749 (!require_confirmation_ || event == HANDSHAKE_CONFIRMED || 758 (!require_confirmation_ || event == HANDSHAKE_CONFIRMED ||
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 } 1236 }
1228 1237
1229 void QuicChromiumClientSession::DeletePromised( 1238 void QuicChromiumClientSession::DeletePromised(
1230 QuicClientPromisedInfo* promised) { 1239 QuicClientPromisedInfo* promised) {
1231 if (IsOpenStream(promised->id())) 1240 if (IsOpenStream(promised->id()))
1232 streams_pushed_and_claimed_count_++; 1241 streams_pushed_and_claimed_count_++;
1233 QuicClientSessionBase::DeletePromised(promised); 1242 QuicClientSessionBase::DeletePromised(promised);
1234 } 1243 }
1235 1244
1236 } // namespace net 1245 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698