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

Unified Diff: net/quic/crypto/quic_crypto_server_config.cc

Issue 504953003: Remove implicit conversions from scoped_refptr to T* in net/quic/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/crypto/proof_test.cc ('k') | net/quic/quic_client_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/quic_crypto_server_config.cc
diff --git a/net/quic/crypto/quic_crypto_server_config.cc b/net/quic/crypto/quic_crypto_server_config.cc
index d805fab5d9d8a151ee99e512ae27e43442a16d03..686a20ea95cdf9fd85b38243b9dd030fedb1778e 100644
--- a/net/quic/crypto/quic_crypto_server_config.cc
+++ b/net/quic/crypto/quic_crypto_server_config.cc
@@ -603,7 +603,8 @@ QuicErrorCode QuicCryptoServerConfig::ProcessClientHello(
!info.client_nonce_well_formed ||
!info.unique ||
!requested_config.get()) {
- BuildRejection(*primary_config, client_hello, info, rand, params, out);
+ BuildRejection(
+ *primary_config.get(), client_hello, info, rand, params, out);
return QUIC_NO_ERROR;
}
@@ -772,13 +773,10 @@ QuicErrorCode QuicCryptoServerConfig::ProcessClientHello(
(QuicVersionToQuicTag(supported_versions[i]));
}
out->SetVector(kVER, supported_version_tags);
- out->SetStringPiece(kSourceAddressTokenTag,
- NewSourceAddressToken(
- *requested_config,
- client_address,
- rand,
- info.now,
- NULL));
+ out->SetStringPiece(
+ kSourceAddressTokenTag,
+ NewSourceAddressToken(
+ *requested_config.get(), client_address, rand, info.now, NULL));
QuicSocketAddressCoder address_coder(client_address);
out->SetStringPiece(kCADR, address_coder.Encode());
out->SetStringPiece(kPUBS, forward_secure_public_value);
@@ -845,13 +843,13 @@ void QuicCryptoServerConfig::SelectNewPrimaryConfig(
sort(configs.begin(), configs.end(), ConfigPrimaryTimeLessThan);
- Config* best_candidate = configs[0];
+ Config* best_candidate = configs[0].get();
for (size_t i = 0; i < configs.size(); ++i) {
const scoped_refptr<Config> config(configs[i]);
if (!config->primary_time.IsAfter(now)) {
if (config->primary_time.IsAfter(best_candidate->primary_time)) {
- best_candidate = config;
+ best_candidate = config.get();
}
continue;
}
@@ -948,11 +946,8 @@ void QuicCryptoServerConfig::EvaluateClientHello(
HandshakeFailureReason source_address_token_error;
StringPiece srct;
if (client_hello.GetStringPiece(kSourceAddressTokenTag, &srct)) {
- source_address_token_error =
- ValidateSourceAddressToken(*requested_config,
- srct,
- info->client_ip,
- info->now);
+ source_address_token_error = ValidateSourceAddressToken(
+ *requested_config.get(), srct, info->client_ip, info->now);
info->valid_source_address_token =
(source_address_token_error == HANDSHAKE_OK);
} else {
@@ -1052,7 +1047,7 @@ bool QuicCryptoServerConfig::BuildServerConfigUpdateMessage(
out->set_tag(kSCUP);
out->SetStringPiece(kSCFG, primary_config_->serialized);
out->SetStringPiece(kSourceAddressTokenTag,
- NewSourceAddressToken(*primary_config_,
+ NewSourceAddressToken(*primary_config_.get(),
client_ip,
rand,
clock->WallNow(),
« no previous file with comments | « net/quic/crypto/proof_test.cc ('k') | net/quic/quic_client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698