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

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

Issue 2516033003: Landing Recent QUIC changes until Mon Nov 14 04:43:50 2016 +0000 (Closed)
Patch Set: Remove unused UpdatePacketGapSentHistogram() function. 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.h ('k') | net/quic/core/quic_tag.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/core/quic_stream_sequencer.h" 5 #include "net/quic/core/quic_stream_sequencer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 return; 53 return;
54 } 54 }
55 } 55 }
56 size_t bytes_written; 56 size_t bytes_written;
57 string error_details; 57 string error_details;
58 QuicErrorCode result = buffered_frames_.OnStreamData( 58 QuicErrorCode result = buffered_frames_.OnStreamData(
59 byte_offset, StringPiece(frame.data_buffer, frame.data_length), 59 byte_offset, StringPiece(frame.data_buffer, frame.data_length),
60 clock_->ApproximateNow(), &bytes_written, &error_details); 60 clock_->ApproximateNow(), &bytes_written, &error_details);
61 if (result != QUIC_NO_ERROR) { 61 if (result != QUIC_NO_ERROR) {
62 string details = "Stream" + base::Uint64ToString(stream_->id()) + ": " + 62 string details = "Stream" + base::Uint64ToString(stream_->id()) + ": " +
63 QuicUtils::ErrorToString(result) + ": " + error_details + 63 QuicErrorCodeToString(result) + ": " + error_details +
64 "\nPeer Address: " + 64 "\nPeer Address: " +
65 stream_->PeerAddressOfLatestPacket().ToString(); 65 stream_->PeerAddressOfLatestPacket().ToString();
66 DLOG(WARNING) << QuicUtils::ErrorToString(result); 66 DLOG(WARNING) << QuicErrorCodeToString(result);
67 DLOG(WARNING) << details; 67 DLOG(WARNING) << details;
68 stream_->CloseConnectionWithDetails(result, details); 68 stream_->CloseConnectionWithDetails(result, details);
69 return; 69 return;
70 } 70 }
71 71
72 if (bytes_written == 0) { 72 if (bytes_written == 0) {
73 ++num_duplicate_frames_received_; 73 ++num_duplicate_frames_received_;
74 // Silently ignore duplicates. 74 // Silently ignore duplicates.
75 return; 75 return;
76 } 76 }
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 "\n bytes buffered: " + IntToString(NumBytesBuffered()) + 227 "\n bytes buffered: " + IntToString(NumBytesBuffered()) +
228 "\n bytes consumed: " + IntToString( NumBytesConsumed()) + 228 "\n bytes consumed: " + IntToString( NumBytesConsumed()) +
229 "\n has bytes to read: " + (HasBytesToRead() ? "true" : "false") + 229 "\n has bytes to read: " + (HasBytesToRead() ? "true" : "false") +
230 "\n frames received: " + IntToString(num_frames_received()) + 230 "\n frames received: " + IntToString(num_frames_received()) +
231 "\n close offset bytes: " + IntToString( close_offset_) + 231 "\n close offset bytes: " + IntToString( close_offset_) +
232 "\n is closed: " + (IsClosed() ? "true" : "false"); 232 "\n is closed: " + (IsClosed() ? "true" : "false");
233 // clang-format on 233 // clang-format on
234 } 234 }
235 235
236 } // namespace net 236 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_stream.h ('k') | net/quic/core/quic_tag.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698