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

Unified Diff: net/quic/quic_crypto_client_stream.cc

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
Index: net/quic/quic_crypto_client_stream.cc
diff --git a/net/quic/quic_crypto_client_stream.cc b/net/quic/quic_crypto_client_stream.cc
index 97452f55503ed8dc757a20f064a3f0ca1933a0ce..4af8a16c7c9267db8b27bd3a14d959028978d416 100644
--- a/net/quic/quic_crypto_client_stream.cc
+++ b/net/quic/quic_crypto_client_stream.cc
@@ -16,10 +16,12 @@ namespace net {
QuicCryptoClientStream::ProofVerifierCallbackImpl::ProofVerifierCallbackImpl(
QuicCryptoClientStream* stream)
- : stream_(stream) {}
+ : stream_(stream) {
+}
QuicCryptoClientStream::ProofVerifierCallbackImpl::
-~ProofVerifierCallbackImpl() {}
+ ~ProofVerifierCallbackImpl() {
+}
void QuicCryptoClientStream::ProofVerifierCallbackImpl::Run(
bool ok,
@@ -88,8 +90,7 @@ int QuicCryptoClientStream::num_sent_client_hellos() const {
// server being unwilling to send it without a valid source-address token.
static const int kMaxClientHellos = 3;
-void QuicCryptoClientStream::DoHandshakeLoop(
- const CryptoHandshakeMessage* in) {
+void QuicCryptoClientStream::DoHandshakeLoop(const CryptoHandshakeMessage* in) {
CryptoHandshakeMessage out;
QuicErrorCode error;
string error_details;
@@ -128,7 +129,9 @@ void QuicCryptoClientStream::DoHandshakeLoop(
crypto_config_->FillInchoateClientHello(
server_id_,
session()->connection()->supported_versions().front(),
- cached, &crypto_negotiated_params_, &out);
+ cached,
+ &crypto_negotiated_params_,
+ &out);
// Pad the inchoate client hello to fill up a packet.
const size_t kFramingOverhead = 50; // A rough estimate.
const size_t max_packet_size =
@@ -186,8 +189,7 @@ void QuicCryptoClientStream::DoHandshakeLoop(
session()->connection()->SetEncrypter(
ENCRYPTION_INITIAL,
crypto_negotiated_params_.initial_crypters.encrypter.release());
- session()->connection()->SetDefaultEncryptionLevel(
- ENCRYPTION_INITIAL);
+ session()->connection()->SetDefaultEncryptionLevel(ENCRYPTION_INITIAL);
if (!encryption_established_) {
encryption_established_ = true;
session()->OnCryptoHandshakeEvent(
@@ -209,8 +211,11 @@ void QuicCryptoClientStream::DoHandshakeLoop(
return;
}
error = crypto_config_->ProcessRejection(
- *in, session()->connection()->clock()->WallNow(), cached,
- &crypto_negotiated_params_, &error_details);
+ *in,
+ session()->connection()->clock()->WallNow(),
+ cached,
+ &crypto_negotiated_params_,
+ &error_details);
if (error != QUIC_NO_ERROR) {
CloseConnectionWithDetails(error, error_details);
return;
@@ -237,15 +242,15 @@ void QuicCryptoClientStream::DoHandshakeLoop(
verify_ok_ = false;
- ProofVerifier::Status status = verifier->VerifyProof(
- server_id_.host(),
- cached->server_config(),
- cached->certs(),
- cached->signature(),
- verify_context_.get(),
- &verify_error_details_,
- &verify_details_,
- proof_verify_callback);
+ ProofVerifier::Status status =
+ verifier->VerifyProof(server_id_.host(),
+ cached->server_config(),
+ cached->certs(),
+ cached->signature(),
+ verify_context_.get(),
+ &verify_error_details_,
+ &verify_details_,
+ proof_verify_callback);
switch (status) {
case ProofVerifier::PENDING:
@@ -265,8 +270,8 @@ void QuicCryptoClientStream::DoHandshakeLoop(
case STATE_VERIFY_PROOF_COMPLETE:
if (!verify_ok_) {
client_session()->OnProofVerifyDetailsAvailable(*verify_details_);
- CloseConnectionWithDetails(
- QUIC_PROOF_INVALID, "Proof invalid: " + verify_error_details_);
+ CloseConnectionWithDetails(QUIC_PROOF_INVALID,
+ "Proof invalid: " + verify_error_details_);
return;
}
// Check if generation_counter has changed between STATE_VERIFY_PROOF
@@ -310,20 +315,23 @@ void QuicCryptoClientStream::DoHandshakeLoop(
return;
}
error = crypto_config_->ProcessServerHello(
- *in, session()->connection()->connection_id(),
+ *in,
+ session()->connection()->connection_id(),
session()->connection()->server_supported_versions(),
- cached, &crypto_negotiated_params_, &error_details);
+ cached,
+ &crypto_negotiated_params_,
+ &error_details);
if (error != QUIC_NO_ERROR) {
- CloseConnectionWithDetails(
- error, "Server hello invalid: " + error_details);
+ CloseConnectionWithDetails(error,
+ "Server hello invalid: " + error_details);
return;
}
error =
session()->config()->ProcessPeerHello(*in, SERVER, &error_details);
if (error != QUIC_NO_ERROR) {
- CloseConnectionWithDetails(
- error, "Server hello invalid: " + error_details);
+ CloseConnectionWithDetails(error,
+ "Server hello invalid: " + error_details);
return;
}
session()->OnConfigNegotiated();
@@ -335,10 +343,11 @@ void QuicCryptoClientStream::DoHandshakeLoop(
// with the FORWARD_SECURE key until it receives a FORWARD_SECURE
// packet from the client.
session()->connection()->SetAlternativeDecrypter(
- crypters->decrypter.release(), ENCRYPTION_FORWARD_SECURE,
+ crypters->decrypter.release(),
+ ENCRYPTION_FORWARD_SECURE,
false /* don't latch */);
- session()->connection()->SetEncrypter(
- ENCRYPTION_FORWARD_SECURE, crypters->encrypter.release());
+ session()->connection()->SetEncrypter(ENCRYPTION_FORWARD_SECURE,
+ crypters->encrypter.release());
session()->connection()->SetDefaultEncryptionLevel(
ENCRYPTION_FORWARD_SECURE);

Powered by Google App Engine
This is Rietveld 408576698