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

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

Issue 1572353002: QuicAlarms are now allocated out of an arena in QuicConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge recent changes. Created 4 years, 11 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/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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 save_crypto_packets_as_termination_packets_(false), 267 save_crypto_packets_as_termination_packets_(false),
268 silent_close_enabled_(false), 268 silent_close_enabled_(false),
269 received_packet_manager_(&stats_), 269 received_packet_manager_(&stats_),
270 ack_queued_(false), 270 ack_queued_(false),
271 num_retransmittable_packets_received_since_last_ack_sent_(0), 271 num_retransmittable_packets_received_since_last_ack_sent_(0),
272 num_packets_received_since_last_ack_sent_(0), 272 num_packets_received_since_last_ack_sent_(0),
273 stop_waiting_count_(0), 273 stop_waiting_count_(0),
274 ack_decimation_enabled_(false), 274 ack_decimation_enabled_(false),
275 delay_setting_retransmission_alarm_(false), 275 delay_setting_retransmission_alarm_(false),
276 pending_retransmission_alarm_(false), 276 pending_retransmission_alarm_(false),
277 ack_alarm_(helper->CreateAlarm(new AckAlarm(this))), 277 arena_(),
278 retransmission_alarm_(helper->CreateAlarm(new RetransmissionAlarm(this))), 278 ack_alarm_(helper->CreateAlarm(arena_.New<AckAlarm>(this), &arena_)),
279 send_alarm_(helper->CreateAlarm(new SendAlarm(this))), 279 retransmission_alarm_(
280 resume_writes_alarm_(helper->CreateAlarm(new SendAlarm(this))), 280 helper->CreateAlarm(arena_.New<RetransmissionAlarm>(this), &arena_)),
281 timeout_alarm_(helper->CreateAlarm(new TimeoutAlarm(this))), 281 send_alarm_(helper->CreateAlarm(arena_.New<SendAlarm>(this), &arena_)),
282 ping_alarm_(helper->CreateAlarm(new PingAlarm(this))), 282 resume_writes_alarm_(
283 mtu_discovery_alarm_(helper->CreateAlarm(new MtuDiscoveryAlarm(this))), 283 helper->CreateAlarm(arena_.New<SendAlarm>(this), &arena_)),
284 timeout_alarm_(
285 helper->CreateAlarm(arena_.New<TimeoutAlarm>(this), &arena_)),
286 ping_alarm_(helper->CreateAlarm(arena_.New<PingAlarm>(this), &arena_)),
287 mtu_discovery_alarm_(
288 helper->CreateAlarm(arena_.New<MtuDiscoveryAlarm>(this), &arena_)),
284 visitor_(nullptr), 289 visitor_(nullptr),
285 debug_visitor_(nullptr), 290 debug_visitor_(nullptr),
286 packet_generator_(connection_id_, 291 packet_generator_(connection_id_,
287 &framer_, 292 &framer_,
288 random_generator_, 293 random_generator_,
289 helper->GetBufferAllocator(), 294 helper->GetBufferAllocator(),
290 this), 295 this),
291 fec_alarm_(helper->CreateAlarm(new FecAlarm(&packet_generator_))), 296 fec_alarm_(helper->CreateAlarm(arena_.New<FecAlarm>(&packet_generator_),
297 &arena_)),
292 idle_network_timeout_(QuicTime::Delta::Infinite()), 298 idle_network_timeout_(QuicTime::Delta::Infinite()),
293 overall_connection_timeout_(QuicTime::Delta::Infinite()), 299 overall_connection_timeout_(QuicTime::Delta::Infinite()),
294 time_of_last_received_packet_(clock_->ApproximateNow()), 300 time_of_last_received_packet_(clock_->ApproximateNow()),
295 time_of_last_sent_new_packet_(clock_->ApproximateNow()), 301 time_of_last_sent_new_packet_(clock_->ApproximateNow()),
296 last_send_for_timeout_(clock_->ApproximateNow()), 302 last_send_for_timeout_(clock_->ApproximateNow()),
297 packet_number_of_last_sent_packet_(0), 303 packet_number_of_last_sent_packet_(0),
298 sent_packet_manager_( 304 sent_packet_manager_(
299 perspective, 305 perspective,
300 kDefaultPathId, 306 kDefaultPathId,
301 clock_, 307 clock_,
(...skipping 2101 matching lines...) Expand 10 before | Expand all | Expand 10 after
2403 SendMtuDiscoveryPacket(mtu_discovery_target_); 2409 SendMtuDiscoveryPacket(mtu_discovery_target_);
2404 2410
2405 DCHECK(!mtu_discovery_alarm_->IsSet()); 2411 DCHECK(!mtu_discovery_alarm_->IsSet());
2406 } 2412 }
2407 2413
2408 bool QuicConnection::ack_frame_updated() const { 2414 bool QuicConnection::ack_frame_updated() const {
2409 return received_packet_manager_.ack_frame_updated(); 2415 return received_packet_manager_.ack_frame_updated();
2410 } 2416 }
2411 2417
2412 } // namespace net 2418 } // 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