OLD | NEW |
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_crypto_client_stream.h" | 5 #include "net/quic/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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 } | 303 } |
304 num_client_hellos_++; | 304 num_client_hellos_++; |
305 | 305 |
306 CryptoHandshakeMessage out; | 306 CryptoHandshakeMessage out; |
307 DCHECK(session() != nullptr); | 307 DCHECK(session() != nullptr); |
308 DCHECK(session()->config() != nullptr); | 308 DCHECK(session()->config() != nullptr); |
309 // Send all the options, regardless of whether we're sending an | 309 // Send all the options, regardless of whether we're sending an |
310 // inchoate or subsequent hello. | 310 // inchoate or subsequent hello. |
311 session()->config()->ToHandshakeMessage(&out); | 311 session()->config()->ToHandshakeMessage(&out); |
312 | 312 |
313 // This call and function should be removed after removing QUIC_VERSION_25. | 313 // This call and function should be removed when |
| 314 // FLAGS_quic_deprecate_kfixd is removed. |
314 AppendFixed(&out); | 315 AppendFixed(&out); |
315 | 316 |
316 // Send a local timestamp to the server. | 317 // Send a local timestamp to the server. |
317 out.SetValue(kCTIM, | 318 out.SetValue(kCTIM, |
318 session()->connection()->clock()->WallNow().ToUNIXSeconds()); | 319 session()->connection()->clock()->WallNow().ToUNIXSeconds()); |
319 | 320 |
320 if (!cached->IsComplete(session()->connection()->clock()->WallNow())) { | 321 if (!cached->IsComplete(session()->connection()->clock()->WallNow())) { |
321 crypto_config_->FillInchoateClientHello( | 322 crypto_config_->FillInchoateClientHello( |
322 server_id_, session()->connection()->supported_versions().front(), | 323 server_id_, session()->connection()->supported_versions().front(), |
323 cached, session()->connection()->random_generator(), | 324 cached, session()->connection()->random_generator(), |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 } | 686 } |
686 for (size_t i = 0; i < num_their_proof_demands; i++) { | 687 for (size_t i = 0; i < num_their_proof_demands; i++) { |
687 if (their_proof_demands[i] == kCHID) { | 688 if (their_proof_demands[i] == kCHID) { |
688 return true; | 689 return true; |
689 } | 690 } |
690 } | 691 } |
691 return false; | 692 return false; |
692 } | 693 } |
693 | 694 |
694 } // namespace net | 695 } // namespace net |
OLD | NEW |