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

Side by Side Diff: net/quic/crypto/quic_crypto_client_config.cc

Issue 422623004: Add a Clone method to ProofVerifyDetails to allow for the proof verify (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/crypto/quic_crypto_client_config.h" 5 #include "net/quic/crypto/quic_crypto_client_config.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/metrics/sparse_histogram.h" 8 #include "base/metrics/sparse_histogram.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 277
278 void QuicCryptoClientConfig::CachedState::InitializeFrom( 278 void QuicCryptoClientConfig::CachedState::InitializeFrom(
279 const QuicCryptoClientConfig::CachedState& other) { 279 const QuicCryptoClientConfig::CachedState& other) {
280 DCHECK(server_config_.empty()); 280 DCHECK(server_config_.empty());
281 DCHECK(!server_config_valid_); 281 DCHECK(!server_config_valid_);
282 server_config_ = other.server_config_; 282 server_config_ = other.server_config_;
283 source_address_token_ = other.source_address_token_; 283 source_address_token_ = other.source_address_token_;
284 certs_ = other.certs_; 284 certs_ = other.certs_;
285 server_config_sig_ = other.server_config_sig_; 285 server_config_sig_ = other.server_config_sig_;
286 server_config_valid_ = other.server_config_valid_; 286 server_config_valid_ = other.server_config_valid_;
287 if (other.proof_verify_details_.get() != NULL) {
288 proof_verify_details_.reset(other.proof_verify_details_->Clone());
289 }
ramant (doing other things) 2014/07/29 21:40:04 nit: drive by. Should we consider adding a DCHECK
Ryan Hamilton 2014/07/29 21:59:18 It's worth a shot. Though there are 2 caveats: 1)
287 ++generation_counter_; 290 ++generation_counter_;
288 } 291 }
289 292
290 void QuicCryptoClientConfig::SetDefaults() { 293 void QuicCryptoClientConfig::SetDefaults() {
291 // Key exchange methods. 294 // Key exchange methods.
292 kexs.resize(2); 295 kexs.resize(2);
293 kexs[0] = kC255; 296 kexs[0] = kC255;
294 kexs[1] = kP256; 297 kexs[1] = kP256;
295 298
296 // Authenticated encryption algorithms. Prefer ChaCha20 by default. 299 // Authenticated encryption algorithms. Prefer ChaCha20 by default.
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 return; 835 return;
833 } 836 }
834 837
835 // Update canonical version to point at the "most recent" entry. 838 // Update canonical version to point at the "most recent" entry.
836 canonical_server_map_[suffix_server_id] = server_id; 839 canonical_server_map_[suffix_server_id] = server_id;
837 840
838 server_state->InitializeFrom(*canonical_state); 841 server_state->InitializeFrom(*canonical_state);
839 } 842 }
840 843
841 } // namespace net 844 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/proof_verifier_chromium.cc ('k') | net/quic/crypto/quic_crypto_client_config_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698