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

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

Issue 479543004: Convert QUIC's SentEntropyManager to use a deque instead of a map in (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@send_updated_bandwidth_estimates_73579021
Patch Set: Created 6 years, 4 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 | « no previous file | net/quic/quic_sent_entropy_manager.h » ('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 #include <algorithm> 9 #include <algorithm>
10 #include <iterator> 10 #include <iterator>
(...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 delete packet.packet; 1569 delete packet.packet;
1570 return true; 1570 return true;
1571 } 1571 }
1572 queued_packet.type = QUEUED; 1572 queued_packet.type = QUEUED;
1573 queued_packets_.push_back(queued_packet); 1573 queued_packets_.push_back(queued_packet);
1574 return false; 1574 return false;
1575 } 1575 }
1576 1576
1577 void QuicConnection::UpdateStopWaiting(QuicStopWaitingFrame* stop_waiting) { 1577 void QuicConnection::UpdateStopWaiting(QuicStopWaitingFrame* stop_waiting) {
1578 stop_waiting->least_unacked = GetLeastUnacked(); 1578 stop_waiting->least_unacked = GetLeastUnacked();
1579 stop_waiting->entropy_hash = sent_entropy_manager_.EntropyHash( 1579 stop_waiting->entropy_hash = sent_entropy_manager_.GetCumulativeEntropy(
1580 stop_waiting->least_unacked - 1); 1580 stop_waiting->least_unacked - 1);
1581 } 1581 }
1582 1582
1583 void QuicConnection::SendPing() { 1583 void QuicConnection::SendPing() {
1584 if (retransmission_alarm_->IsSet()) { 1584 if (retransmission_alarm_->IsSet()) {
1585 return; 1585 return;
1586 } 1586 }
1587 if (version() == QUIC_VERSION_16) { 1587 if (version() == QUIC_VERSION_16) {
1588 // TODO(rch): remove this when we remove version 15 and 16. 1588 // TODO(rch): remove this when we remove version 15 and 16.
1589 // This is a horrible hideous hack which we should not support. 1589 // This is a horrible hideous hack which we should not support.
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
2014 // If we changed the generator's batch state, restore original batch state. 2014 // If we changed the generator's batch state, restore original batch state.
2015 if (!already_in_batch_mode_) { 2015 if (!already_in_batch_mode_) {
2016 DVLOG(1) << "Leaving Batch Mode."; 2016 DVLOG(1) << "Leaving Batch Mode.";
2017 connection_->packet_generator_.FinishBatchOperations(); 2017 connection_->packet_generator_.FinishBatchOperations();
2018 } 2018 }
2019 DCHECK_EQ(already_in_batch_mode_, 2019 DCHECK_EQ(already_in_batch_mode_,
2020 connection_->packet_generator_.InBatchMode()); 2020 connection_->packet_generator_.InBatchMode());
2021 } 2021 }
2022 2022
2023 } // namespace net 2023 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_sent_entropy_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698