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

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

Issue 1670863002: QUIC - minor cleanup changes to keep code in sync with the internal source. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0204
Patch Set: Created 4 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/quic_protocol.h ('k') | net/tools/quic/quic_dispatcher.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_protocol.h" 5 #include "net/quic/quic_protocol.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "net/quic/quic_flags.h" 8 #include "net/quic/quic_flags.h"
9 #include "net/quic/quic_utils.h" 9 #include "net/quic/quic_utils.h"
10 10
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 ostream& operator<<(ostream& os, const QuicStopWaitingFrame& sent_info) { 361 ostream& operator<<(ostream& os, const QuicStopWaitingFrame& sent_info) {
362 os << "entropy_hash: " << static_cast<int>(sent_info.entropy_hash) 362 os << "entropy_hash: " << static_cast<int>(sent_info.entropy_hash)
363 << " least_unacked: " << sent_info.least_unacked; 363 << " least_unacked: " << sent_info.least_unacked;
364 return os; 364 return os;
365 } 365 }
366 366
367 PacketNumberQueue::const_iterator::const_iterator( 367 PacketNumberQueue::const_iterator::const_iterator(
368 IntervalSet<QuicPacketNumber>::const_iterator interval_set_iter, 368 IntervalSet<QuicPacketNumber>::const_iterator interval_set_iter,
369 QuicPacketNumber first, 369 QuicPacketNumber first,
370 QuicPacketNumber last) 370 QuicPacketNumber last)
371 : interval_set_iter_(interval_set_iter), current_(first), last_(last) {} 371 : interval_set_iter_(std::move(interval_set_iter)),
372 current_(first),
373 last_(last) {}
372 374
373 PacketNumberQueue::const_iterator::const_iterator(const const_iterator& other) = 375 PacketNumberQueue::const_iterator::const_iterator(const const_iterator& other) =
374 default; 376 default;
375 // TODO(rtenneti): on windows RValue reference gives errors. 377 // TODO(rtenneti): on windows RValue reference gives errors.
376 // PacketNumberQueue::const_iterator::const_iterator(const_iterator&& other) = 378 // PacketNumberQueue::const_iterator::const_iterator(const_iterator&& other) =
377 // default; 379 // default;
378 PacketNumberQueue::const_iterator::~const_iterator() {} 380 PacketNumberQueue::const_iterator::~const_iterator() {}
379 381
380 PacketNumberQueue::const_iterator& PacketNumberQueue::const_iterator::operator=( 382 PacketNumberQueue::const_iterator& PacketNumberQueue::const_iterator::operator=(
381 const const_iterator& other) = default; 383 const const_iterator& other) = default;
382 // TODO(rtenneti): on windows RValue reference gives errors. 384 // TODO(rtenneti): on windows RValue reference gives errors.
383 // PacketNumberQueue::const_iterator& 385 // PacketNumberQueue::const_iterator&
384 // PacketNumberQueue::const_iterator::operator=( 386 // PacketNumberQueue::const_iterator::operator=(
385 // const_iterator&& other) = default; 387 // const_iterator&& other) = default;
386 388
387 bool PacketNumberQueue::const_iterator::operator!=( 389 bool PacketNumberQueue::const_iterator::operator!=(
388 const const_iterator& other) const { 390 const const_iterator& other) const {
389 return current_ != other.current_; 391 return current_ != other.current_;
390 } 392 }
391 393
392 bool PacketNumberQueue::const_iterator::operator==( 394 bool PacketNumberQueue::const_iterator::operator==(
393 const const_iterator& other) const { 395 const const_iterator& other) const {
394 return current_ == other.current_; 396 return current_ == other.current_;
395 } 397 }
396 398
397 PacketNumberQueue::const_iterator::value_type 399 PacketNumberQueue::const_iterator::value_type
398 PacketNumberQueue::const_iterator:: 400 PacketNumberQueue::const_iterator::operator*() const {
399 operator*() const {
400 return current_; 401 return current_;
401 } 402 }
402 403
403 PacketNumberQueue::const_iterator& PacketNumberQueue::const_iterator:: 404 PacketNumberQueue::const_iterator& PacketNumberQueue::const_iterator::
404 operator++() { 405 operator++() {
405 ++current_; 406 ++current_;
406 if (current_ < last_) { 407 if (current_ < last_) {
407 if (current_ >= interval_set_iter_->max()) { 408 if (current_ >= interval_set_iter_->max()) {
408 ++interval_set_iter_; 409 ++interval_set_iter_;
409 current_ = interval_set_iter_->min(); 410 current_ = interval_set_iter_->min();
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 in_flight(false), 798 in_flight(false),
798 is_unackable(false), 799 is_unackable(false),
799 is_fec_packet(is_fec_packet), 800 is_fec_packet(is_fec_packet),
800 has_crypto_handshake(has_crypto_handshake), 801 has_crypto_handshake(has_crypto_handshake),
801 needs_padding(needs_padding), 802 needs_padding(needs_padding),
802 retransmission(0) {} 803 retransmission(0) {}
803 804
804 TransmissionInfo::~TransmissionInfo() {} 805 TransmissionInfo::~TransmissionInfo() {}
805 806
806 } // namespace net 807 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/tools/quic/quic_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698