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