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

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

Issue 1327923002: Migrates QUIC sessions to a new network when old network is (about to be) disconnected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@home
Patch Set: More tests added and some fixes. Created 4 years, 11 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
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 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 RETURN_STRING_LITERAL(QUIC_CRYPTO_UPDATE_BEFORE_HANDSHAKE_COMPLETE); 223 RETURN_STRING_LITERAL(QUIC_CRYPTO_UPDATE_BEFORE_HANDSHAKE_COMPLETE);
224 RETURN_STRING_LITERAL(QUIC_VERSION_NEGOTIATION_MISMATCH); 224 RETURN_STRING_LITERAL(QUIC_VERSION_NEGOTIATION_MISMATCH);
225 RETURN_STRING_LITERAL(QUIC_TOO_MANY_OUTSTANDING_SENT_PACKETS); 225 RETURN_STRING_LITERAL(QUIC_TOO_MANY_OUTSTANDING_SENT_PACKETS);
226 RETURN_STRING_LITERAL(QUIC_TOO_MANY_OUTSTANDING_RECEIVED_PACKETS); 226 RETURN_STRING_LITERAL(QUIC_TOO_MANY_OUTSTANDING_RECEIVED_PACKETS);
227 RETURN_STRING_LITERAL(QUIC_CONNECTION_CANCELLED); 227 RETURN_STRING_LITERAL(QUIC_CONNECTION_CANCELLED);
228 RETURN_STRING_LITERAL(QUIC_BAD_PACKET_LOSS_RATE); 228 RETURN_STRING_LITERAL(QUIC_BAD_PACKET_LOSS_RATE);
229 RETURN_STRING_LITERAL(QUIC_PUBLIC_RESETS_POST_HANDSHAKE); 229 RETURN_STRING_LITERAL(QUIC_PUBLIC_RESETS_POST_HANDSHAKE);
230 RETURN_STRING_LITERAL(QUIC_TIMEOUTS_WITH_OPEN_STREAMS); 230 RETURN_STRING_LITERAL(QUIC_TIMEOUTS_WITH_OPEN_STREAMS);
231 RETURN_STRING_LITERAL(QUIC_FAILED_TO_SERIALIZE_PACKET); 231 RETURN_STRING_LITERAL(QUIC_FAILED_TO_SERIALIZE_PACKET);
232 RETURN_STRING_LITERAL(QUIC_TOO_MANY_AVAILABLE_STREAMS); 232 RETURN_STRING_LITERAL(QUIC_TOO_MANY_AVAILABLE_STREAMS);
233 RETURN_STRING_LITERAL(QUIC_IP_ADDRESS_CHANGED);
234 RETURN_STRING_LITERAL(QUIC_CONNECTION_MIGRATION_NO_MIGRATABLE_STREAMS);
235 RETURN_STRING_LITERAL(QUIC_CONNECTION_MIGRATION_TOO_MANY_CHANGES);
236 RETURN_STRING_LITERAL(QUIC_CONNECTION_MIGRATION_NO_NEW_NETWORK);
233 RETURN_STRING_LITERAL(QUIC_LAST_ERROR); 237 RETURN_STRING_LITERAL(QUIC_LAST_ERROR);
234 // Intentionally have no default case, so we'll break the build 238 // Intentionally have no default case, so we'll break the build
235 // if we add errors and don't put them here. 239 // if we add errors and don't put them here.
236 } 240 }
237 // Return a default value so that we return this when |error| doesn't match 241 // Return a default value so that we return this when |error| doesn't match
238 // any of the QuicErrorCodes. This can happen when the ConnectionClose 242 // any of the QuicErrorCodes. This can happen when the ConnectionClose
239 // frame sent by the peer (attacker) has invalid error code. 243 // frame sent by the peer (attacker) has invalid error code.
240 return "INVALID_ERROR_CODE"; 244 return "INVALID_ERROR_CODE";
241 } 245 }
242 246
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 340
337 bytes_remaining -= line_bytes; 341 bytes_remaining -= line_bytes;
338 offset += line_bytes; 342 offset += line_bytes;
339 p += line_bytes; 343 p += line_bytes;
340 s += '\n'; 344 s += '\n';
341 } 345 }
342 return s; 346 return s;
343 } 347 }
344 348
345 } // namespace net 349 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698