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

Side by Side Diff: net/tools/quic/quic_dispatcher.cc

Issue 2713773005: Deprecating FLAGS_quic_reloadable_flag_quic_fix_version_manager (Closed)
Patch Set: Created 3 years, 10 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/quic/core/quic_flags_list.h ('k') | net/tools/quic/quic_dispatcher_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/tools/quic/quic_dispatcher.h" 5 #include "net/tools/quic/quic_dispatcher.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "net/quic/core/crypto/quic_random.h" 10 #include "net/quic/core/crypto/quic_random.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 return HandlePacketForTimeWait(header); 300 return HandlePacketForTimeWait(header);
301 } 301 }
302 302
303 // The packet has an unknown connection ID. 303 // The packet has an unknown connection ID.
304 304
305 // Unless the packet provides a version, assume that we can continue 305 // Unless the packet provides a version, assume that we can continue
306 // processing using our preferred version. 306 // processing using our preferred version.
307 QuicVersion version = GetSupportedVersions().front(); 307 QuicVersion version = GetSupportedVersions().front();
308 if (header.version_flag) { 308 if (header.version_flag) {
309 QuicVersion packet_version = header.versions.front(); 309 QuicVersion packet_version = header.versions.front();
310 if (FLAGS_quic_reloadable_flag_quic_fix_version_manager && 310 if (framer_.supported_versions() != GetSupportedVersions()) {
311 framer_.supported_versions() != GetSupportedVersions()) {
312 // Reset framer's version if version flags change in flight. 311 // Reset framer's version if version flags change in flight.
313 framer_.SetSupportedVersions(GetSupportedVersions()); 312 framer_.SetSupportedVersions(GetSupportedVersions());
314 } 313 }
315 if (!framer_.IsSupportedVersion(packet_version)) { 314 if (!framer_.IsSupportedVersion(packet_version)) {
316 if (ShouldCreateSessionForUnknownVersion(framer_.last_version_tag())) { 315 if (ShouldCreateSessionForUnknownVersion(framer_.last_version_tag())) {
317 return true; 316 return true;
318 } 317 }
319 // Since the version is not supported, send a version negotiation 318 // Since the version is not supported, send a version negotiation
320 // packet and stop processing the current packet. 319 // packet and stop processing the current packet.
321 time_wait_list_manager()->SendVersionNegotiationPacket( 320 time_wait_list_manager()->SendVersionNegotiationPacket(
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 void QuicDispatcher::DeliverPacketsToSession( 985 void QuicDispatcher::DeliverPacketsToSession(
987 const std::list<BufferedPacket>& packets, 986 const std::list<BufferedPacket>& packets,
988 QuicSession* session) { 987 QuicSession* session) {
989 for (const BufferedPacket& packet : packets) { 988 for (const BufferedPacket& packet : packets) {
990 session->ProcessUdpPacket(packet.server_address, packet.client_address, 989 session->ProcessUdpPacket(packet.server_address, packet.client_address,
991 *(packet.packet)); 990 *(packet.packet));
992 } 991 }
993 } 992 }
994 993
995 } // namespace net 994 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_flags_list.h ('k') | net/tools/quic/quic_dispatcher_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698