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

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

Issue 2236973002: Landing Recent QUIC changes until 4AM, Aug 7, 2016 UTC-4 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: flip quic_sequencer_buffer_retire_block_in_time to true Created 4 years, 4 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/core/quic_connection_test.cc ('k') | net/quic/core/quic_crypto_client_stream_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) 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_crypto_client_stream.h" 5 #include "net/quic/core/quic_crypto_client_stream.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 << ") has no room for framing overhead."; 335 << ") has no room for framing overhead.";
336 CloseConnectionWithDetails(QUIC_INTERNAL_ERROR, 336 CloseConnectionWithDetails(QUIC_INTERNAL_ERROR,
337 "max_packet_size too smalll"); 337 "max_packet_size too smalll");
338 return; 338 return;
339 } 339 }
340 if (kClientHelloMinimumSize > max_packet_size - kFramingOverhead) { 340 if (kClientHelloMinimumSize > max_packet_size - kFramingOverhead) {
341 DLOG(DFATAL) << "Client hello won't fit in a single packet."; 341 DLOG(DFATAL) << "Client hello won't fit in a single packet.";
342 CloseConnectionWithDetails(QUIC_INTERNAL_ERROR, "CHLO too large"); 342 CloseConnectionWithDetails(QUIC_INTERNAL_ERROR, "CHLO too large");
343 return; 343 return;
344 } 344 }
345 // TODO(rch): Remove this when we remove:
346 // FLAGS_quic_use_chlo_packet_size
345 out.set_minimum_size( 347 out.set_minimum_size(
346 static_cast<size_t>(max_packet_size - kFramingOverhead)); 348 static_cast<size_t>(max_packet_size - kFramingOverhead));
347 next_state_ = STATE_RECV_REJ; 349 next_state_ = STATE_RECV_REJ;
348 CryptoUtils::HashHandshakeMessage(out, &chlo_hash_); 350 CryptoUtils::HashHandshakeMessage(out, &chlo_hash_);
349 SendHandshakeMessage(out); 351 SendHandshakeMessage(out);
350 return; 352 return;
351 } 353 }
352 354
353 // If the server nonce is empty, copy over the server nonce from a previous 355 // If the server nonce is empty, copy over the server nonce from a previous
354 // SREJ, if there is one. 356 // SREJ, if there is one.
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 } 692 }
691 for (size_t i = 0; i < num_their_proof_demands; i++) { 693 for (size_t i = 0; i < num_their_proof_demands; i++) {
692 if (their_proof_demands[i] == kCHID) { 694 if (their_proof_demands[i] == kCHID) {
693 return true; 695 return true;
694 } 696 }
695 } 697 }
696 return false; 698 return false;
697 } 699 }
698 700
699 } // namespace net 701 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_connection_test.cc ('k') | net/quic/core/quic_crypto_client_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698