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

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

Issue 1901673002: Fix a few spurious string allocations in QuicCryptoServerStream and QuicCryptoStream. No functional… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | net/quic/quic_crypto_stream.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/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
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
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
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_crypto_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698