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

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

Issue 355573007: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added NET_EXPORT_PRIVATE for ContainsQuicTag Created 6 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_config_test.cc ('k') | net/quic/quic_connection_stats.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 1555 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 void QuicConnection::UpdateStopWaiting(QuicStopWaitingFrame* stop_waiting) { 1566 void QuicConnection::UpdateStopWaiting(QuicStopWaitingFrame* stop_waiting) {
1567 stop_waiting->least_unacked = GetLeastUnacked(); 1567 stop_waiting->least_unacked = GetLeastUnacked();
1568 stop_waiting->entropy_hash = sent_entropy_manager_.EntropyHash( 1568 stop_waiting->entropy_hash = sent_entropy_manager_.EntropyHash(
1569 stop_waiting->least_unacked - 1); 1569 stop_waiting->least_unacked - 1);
1570 } 1570 }
1571 1571
1572 void QuicConnection::SendPing() { 1572 void QuicConnection::SendPing() {
1573 if (retransmission_alarm_->IsSet()) { 1573 if (retransmission_alarm_->IsSet()) {
1574 return; 1574 return;
1575 } 1575 }
1576 if (version() <= QUIC_VERSION_17) { 1576 if (version() <= QUIC_VERSION_16) {
1577 // TODO(rch): remove this when we remove version 17. 1577 // TODO(rch): remove this when we remove version 15 and 16.
1578 // This is a horrible hideous hack which we should not support. 1578 // This is a horrible hideous hack which we should not support.
1579 IOVector data; 1579 IOVector data;
1580 char c_data[] = "C"; 1580 char c_data[] = "C";
1581 data.Append(c_data, 1); 1581 data.Append(c_data, 1);
1582 QuicConsumedData consumed_data = 1582 QuicConsumedData consumed_data =
1583 packet_generator_.ConsumeData(kCryptoStreamId, data, 0, false, 1583 packet_generator_.ConsumeData(kCryptoStreamId, data, 0, false,
1584 MAY_FEC_PROTECT, NULL); 1584 MAY_FEC_PROTECT, NULL);
1585 if (consumed_data.bytes_consumed == 0) { 1585 if (consumed_data.bytes_consumed == 0) {
1586 DLOG(ERROR) << "Unable to send ping!?"; 1586 DLOG(ERROR) << "Unable to send ping!?";
1587 } 1587 }
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1977 // If we changed the generator's batch state, restore original batch state. 1977 // If we changed the generator's batch state, restore original batch state.
1978 if (!already_in_batch_mode_) { 1978 if (!already_in_batch_mode_) {
1979 DVLOG(1) << "Leaving Batch Mode."; 1979 DVLOG(1) << "Leaving Batch Mode.";
1980 connection_->packet_generator_.FinishBatchOperations(); 1980 connection_->packet_generator_.FinishBatchOperations();
1981 } 1981 }
1982 DCHECK_EQ(already_in_batch_mode_, 1982 DCHECK_EQ(already_in_batch_mode_,
1983 connection_->packet_generator_.InBatchMode()); 1983 connection_->packet_generator_.InBatchMode());
1984 } 1984 }
1985 1985
1986 } // namespace net 1986 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_config_test.cc ('k') | net/quic/quic_connection_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698