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

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

Issue 1411063004: Remove insecure QUIC support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enough! Created 5 years, 1 month 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/quic_connection.h ('k') | net/quic/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/quic_connection.h" 5 #include "net/quic/quic_connection.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 #define ENDPOINT \ 256 #define ENDPOINT \
257 (perspective_ == Perspective::IS_SERVER ? "Server: " : "Client: ") 257 (perspective_ == Perspective::IS_SERVER ? "Server: " : "Client: ")
258 258
259 QuicConnection::QuicConnection(QuicConnectionId connection_id, 259 QuicConnection::QuicConnection(QuicConnectionId connection_id,
260 IPEndPoint address, 260 IPEndPoint address,
261 QuicConnectionHelperInterface* helper, 261 QuicConnectionHelperInterface* helper,
262 const PacketWriterFactory& writer_factory, 262 const PacketWriterFactory& writer_factory,
263 bool owns_writer, 263 bool owns_writer,
264 Perspective perspective, 264 Perspective perspective,
265 bool is_secure,
266 const QuicVersionVector& supported_versions) 265 const QuicVersionVector& supported_versions)
267 : framer_(supported_versions, 266 : framer_(supported_versions,
268 helper->GetClock()->ApproximateNow(), 267 helper->GetClock()->ApproximateNow(),
269 perspective), 268 perspective),
270 helper_(helper), 269 helper_(helper),
271 writer_(writer_factory.Create(this)), 270 writer_(writer_factory.Create(this)),
272 owns_writer_(owns_writer), 271 owns_writer_(owns_writer),
273 encryption_level_(ENCRYPTION_NONE), 272 encryption_level_(ENCRYPTION_NONE),
274 has_forward_secure_encrypter_(false), 273 has_forward_secure_encrypter_(false),
275 first_required_forward_secure_packet_(0), 274 first_required_forward_secure_packet_(0),
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 idle_network_timeout_(QuicTime::Delta::Infinite()), 307 idle_network_timeout_(QuicTime::Delta::Infinite()),
309 overall_connection_timeout_(QuicTime::Delta::Infinite()), 308 overall_connection_timeout_(QuicTime::Delta::Infinite()),
310 time_of_last_received_packet_(clock_->ApproximateNow()), 309 time_of_last_received_packet_(clock_->ApproximateNow()),
311 time_of_last_sent_new_packet_(clock_->ApproximateNow()), 310 time_of_last_sent_new_packet_(clock_->ApproximateNow()),
312 packet_number_of_last_sent_packet_(0), 311 packet_number_of_last_sent_packet_(0),
313 sent_packet_manager_( 312 sent_packet_manager_(
314 perspective, 313 perspective,
315 clock_, 314 clock_,
316 &stats_, 315 &stats_,
317 FLAGS_quic_use_bbr_congestion_control ? kBBR : kCubic, 316 FLAGS_quic_use_bbr_congestion_control ? kBBR : kCubic,
318 FLAGS_quic_use_time_loss_detection ? kTime : kNack, 317 FLAGS_quic_use_time_loss_detection ? kTime : kNack),
319 is_secure),
320 version_negotiation_state_(START_NEGOTIATION), 318 version_negotiation_state_(START_NEGOTIATION),
321 perspective_(perspective), 319 perspective_(perspective),
322 connected_(true), 320 connected_(true),
323 peer_ip_changed_(false), 321 peer_ip_changed_(false),
324 peer_port_changed_(false), 322 peer_port_changed_(false),
325 self_ip_changed_(false), 323 self_ip_changed_(false),
326 self_port_changed_(false), 324 self_port_changed_(false),
327 can_truncate_connection_ids_(true), 325 can_truncate_connection_ids_(true),
328 is_secure_(is_secure),
329 mtu_discovery_target_(0), 326 mtu_discovery_target_(0),
330 mtu_probe_count_(0), 327 mtu_probe_count_(0),
331 packets_between_mtu_probes_(kPacketsBetweenMtuProbesBase), 328 packets_between_mtu_probes_(kPacketsBetweenMtuProbesBase),
332 next_mtu_probe_at_(kPacketsBetweenMtuProbesBase), 329 next_mtu_probe_at_(kPacketsBetweenMtuProbesBase),
333 largest_received_packet_size_(0), 330 largest_received_packet_size_(0),
334 goaway_sent_(false), 331 goaway_sent_(false),
335 goaway_received_(false) { 332 goaway_received_(false) {
336 DVLOG(1) << ENDPOINT << "Created connection with connection_id: " 333 DVLOG(1) << ENDPOINT << "Created connection with connection_id: "
337 << connection_id; 334 << connection_id;
338 framer_.set_visitor(this); 335 framer_.set_visitor(this);
(...skipping 1985 matching lines...) Expand 10 before | Expand all | Expand 10 after
2324 packet_number_of_last_sent_packet_ + packets_between_mtu_probes_ + 1; 2321 packet_number_of_last_sent_packet_ + packets_between_mtu_probes_ + 1;
2325 ++mtu_probe_count_; 2322 ++mtu_probe_count_;
2326 2323
2327 DVLOG(2) << "Sending a path MTU discovery packet #" << mtu_probe_count_; 2324 DVLOG(2) << "Sending a path MTU discovery packet #" << mtu_probe_count_;
2328 SendMtuDiscoveryPacket(mtu_discovery_target_); 2325 SendMtuDiscoveryPacket(mtu_discovery_target_);
2329 2326
2330 DCHECK(!mtu_discovery_alarm_->IsSet()); 2327 DCHECK(!mtu_discovery_alarm_->IsSet());
2331 } 2328 }
2332 2329
2333 } // namespace net 2330 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698