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

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

Issue 23587004: If the stream is being closed locally (for example in the case of a (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 7 years, 3 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_stream_factory_test.cc ('k') | no next file » | 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_utils.h" 5 #include "net/quic/quic_utils.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/port.h" 10 #include "base/port.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 117
118 // static 118 // static
119 const char* QuicUtils::StreamErrorToString(QuicRstStreamErrorCode error) { 119 const char* QuicUtils::StreamErrorToString(QuicRstStreamErrorCode error) {
120 switch (error) { 120 switch (error) {
121 RETURN_STRING_LITERAL(QUIC_STREAM_NO_ERROR); 121 RETURN_STRING_LITERAL(QUIC_STREAM_NO_ERROR);
122 RETURN_STRING_LITERAL(QUIC_STREAM_CONNECTION_ERROR); 122 RETURN_STRING_LITERAL(QUIC_STREAM_CONNECTION_ERROR);
123 RETURN_STRING_LITERAL(QUIC_SERVER_ERROR_PROCESSING_STREAM); 123 RETURN_STRING_LITERAL(QUIC_SERVER_ERROR_PROCESSING_STREAM);
124 RETURN_STRING_LITERAL(QUIC_MULTIPLE_TERMINATION_OFFSETS); 124 RETURN_STRING_LITERAL(QUIC_MULTIPLE_TERMINATION_OFFSETS);
125 RETURN_STRING_LITERAL(QUIC_BAD_APPLICATION_PAYLOAD); 125 RETURN_STRING_LITERAL(QUIC_BAD_APPLICATION_PAYLOAD);
126 RETURN_STRING_LITERAL(QUIC_STREAM_PEER_GOING_AWAY); 126 RETURN_STRING_LITERAL(QUIC_STREAM_PEER_GOING_AWAY);
127 RETURN_STRING_LITERAL(QUIC_STREAM_CANCELLED);
127 RETURN_STRING_LITERAL(QUIC_STREAM_LAST_ERROR); 128 RETURN_STRING_LITERAL(QUIC_STREAM_LAST_ERROR);
128 } 129 }
129 // Return a default value so that we return this when |error| doesn't match 130 // Return a default value so that we return this when |error| doesn't match
130 // any of the QuicRstStreamErrorCodes. This can happen when the RstStream 131 // any of the QuicRstStreamErrorCodes. This can happen when the RstStream
131 // frame sent by the peer (attacker) has invalid error code. 132 // frame sent by the peer (attacker) has invalid error code.
132 return "INVALID_RST_STREAM_ERROR_CODE"; 133 return "INVALID_RST_STREAM_ERROR_CODE";
133 } 134 }
134 135
135 // static 136 // static
136 const char* QuicUtils::ErrorToString(QuicErrorCode error) { 137 const char* QuicUtils::ErrorToString(QuicErrorCode error) {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 257
257 bytes_remaining -= line_bytes; 258 bytes_remaining -= line_bytes;
258 offset += line_bytes; 259 offset += line_bytes;
259 p += line_bytes; 260 p += line_bytes;
260 s += '\n'; 261 s += '\n';
261 } 262 }
262 return s; 263 return s;
263 } 264 }
264 265
265 } // namespace net 266 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_stream_factory_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698