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

Side by Side Diff: net/quic/core/quic_stream_sequencer_buffer.cc

Issue 2464683002: adds std:: to stl types (#049) (Closed)
Patch Set: remove dead using std::foo declarations. Created 4 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/core/quic_stream_sequencer.cc ('k') | net/quic/core/quic_stream_sequencer_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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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/core/quic_stream_sequencer_buffer.h" 5 #include "net/quic/core/quic_stream_sequencer_buffer.h"
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 if (blocks_[i] != nullptr) { 68 if (blocks_[i] != nullptr) {
69 RetireBlock(i); 69 RetireBlock(i);
70 } 70 }
71 } 71 }
72 } 72 }
73 num_bytes_buffered_ = 0; 73 num_bytes_buffered_ = 0;
74 // Reset gaps_ so that buffer is in a state as if all data before 74 // Reset gaps_ so that buffer is in a state as if all data before
75 // total_bytes_read_ has been consumed, and those after total_bytes_read_ 75 // total_bytes_read_ has been consumed, and those after total_bytes_read_
76 // has never arrived. 76 // has never arrived.
77 gaps_ = std::list<Gap>( 77 gaps_ = std::list<Gap>(
78 1, Gap(total_bytes_read_, std::numeric_limits<QuicStreamOffset>::max())), 78 1, Gap(total_bytes_read_, std::numeric_limits<QuicStreamOffset>::max()));
79 frame_arrival_time_map_.clear(); 79 frame_arrival_time_map_.clear();
80 } 80 }
81 81
82 bool QuicStreamSequencerBuffer::RetireBlock(size_t idx) { 82 bool QuicStreamSequencerBuffer::RetireBlock(size_t idx) {
83 if (blocks_[idx] == nullptr) { 83 if (blocks_[idx] == nullptr) {
84 QUIC_BUG << "Try to retire block twice"; 84 QUIC_BUG << "Try to retire block twice";
85 return false; 85 return false;
86 } 86 }
87 delete blocks_[idx]; 87 delete blocks_[idx];
88 blocks_[idx] = nullptr; 88 blocks_[idx] = nullptr;
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 QuicStreamOffset current_frame_end_offset = 590 QuicStreamOffset current_frame_end_offset =
591 it.second.length + current_frame_begin_offset; 591 it.second.length + current_frame_begin_offset;
592 current_frames_string = string(StringPrintf( 592 current_frames_string = string(StringPrintf(
593 "%s[%" PRIu64 ", %" PRIu64 ") ", current_frames_string.c_str(), 593 "%s[%" PRIu64 ", %" PRIu64 ") ", current_frames_string.c_str(),
594 current_frame_begin_offset, current_frame_end_offset)); 594 current_frame_begin_offset, current_frame_end_offset));
595 } 595 }
596 return current_frames_string; 596 return current_frames_string;
597 } 597 }
598 598
599 } // namespace net 599 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_stream_sequencer.cc ('k') | net/quic/core/quic_stream_sequencer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698