| 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_server_stream.h" | 5 #include "net/quic/quic_crypto_server_stream.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "crypto/secure_hash.h" | 10 #include "crypto/secure_hash.h" |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 session()->connection()->random_generator(), compressed_certs_cache_, | 231 session()->connection()->random_generator(), compressed_certs_cache_, |
| 232 crypto_negotiated_params_, cached_network_params, | 232 crypto_negotiated_params_, cached_network_params, |
| 233 &server_config_update_message)) { | 233 &server_config_update_message)) { |
| 234 DVLOG(1) << "Server: Failed to build server config update (SCUP)!"; | 234 DVLOG(1) << "Server: Failed to build server config update (SCUP)!"; |
| 235 return; | 235 return; |
| 236 } | 236 } |
| 237 | 237 |
| 238 DVLOG(1) << "Server: Sending server config update: " | 238 DVLOG(1) << "Server: Sending server config update: " |
| 239 << server_config_update_message.DebugString(); | 239 << server_config_update_message.DebugString(); |
| 240 const QuicData& data = server_config_update_message.GetSerialized(); | 240 const QuicData& data = server_config_update_message.GetSerialized(); |
| 241 WriteOrBufferData(string(data.data(), data.length()), false, nullptr); | 241 WriteOrBufferData(StringPiece(data.data(), data.length()), false, nullptr); |
| 242 | 242 |
| 243 ++num_server_config_update_messages_sent_; | 243 ++num_server_config_update_messages_sent_; |
| 244 } | 244 } |
| 245 | 245 |
| 246 void QuicCryptoServerStream::OnServerHelloAcked() { | 246 void QuicCryptoServerStream::OnServerHelloAcked() { |
| 247 session()->connection()->OnHandshakeComplete(); | 247 session()->connection()->OnHandshakeComplete(); |
| 248 } | 248 } |
| 249 | 249 |
| 250 uint8_t QuicCryptoServerStream::NumHandshakeMessages() const { | 250 uint8_t QuicCryptoServerStream::NumHandshakeMessages() const { |
| 251 return num_handshake_messages_; | 251 return num_handshake_messages_; |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 } | 382 } |
| 383 for (size_t i = 0; i < received_tags_length; ++i) { | 383 for (size_t i = 0; i < received_tags_length; ++i) { |
| 384 if (received_tags[i] == kSREJ) { | 384 if (received_tags[i] == kSREJ) { |
| 385 return true; | 385 return true; |
| 386 } | 386 } |
| 387 } | 387 } |
| 388 return false; | 388 return false; |
| 389 } | 389 } |
| 390 | 390 |
| 391 } // namespace net | 391 } // namespace net |
| OLD | NEW |