Commit 36478248 authored by agl@chromium.org's avatar agl@chromium.org

net: code style fixups - no semantic change.

(Needed to do this because it was distracting me too much.)

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124943 0039d316-1c4b-4281-b951-d872f2087c98
parent 384e6a01
...@@ -49,17 +49,19 @@ HttpProxySocketParams::HttpProxySocketParams( ...@@ -49,17 +49,19 @@ HttpProxySocketParams::HttpProxySocketParams(
tunnel_(tunnel) { tunnel_(tunnel) {
DCHECK((transport_params == NULL && ssl_params != NULL) || DCHECK((transport_params == NULL && ssl_params != NULL) ||
(transport_params != NULL && ssl_params == NULL)); (transport_params != NULL && ssl_params == NULL));
if (transport_params_) if (transport_params_) {
ignore_limits_ = transport_params->ignore_limits(); ignore_limits_ = transport_params->ignore_limits();
else } else {
ignore_limits_ = ssl_params->ignore_limits(); ignore_limits_ = ssl_params->ignore_limits();
}
} }
const HostResolver::RequestInfo& HttpProxySocketParams::destination() const { const HostResolver::RequestInfo& HttpProxySocketParams::destination() const {
if (transport_params_ == NULL) if (transport_params_ == NULL) {
return ssl_params_->transport_params()->destination(); return ssl_params_->transport_params()->destination();
else } else {
return transport_params_->destination(); return transport_params_->destination();
}
} }
HttpProxySocketParams::~HttpProxySocketParams() {} HttpProxySocketParams::~HttpProxySocketParams() {}
...@@ -218,12 +220,13 @@ int HttpProxyConnectJob::DoSSLConnectComplete(int result) { ...@@ -218,12 +220,13 @@ int HttpProxyConnectJob::DoSSLConnectComplete(int result) {
return result; return result;
} }
if (IsCertificateError(result)) { if (IsCertificateError(result)) {
if (params_->ssl_params()->load_flags() & LOAD_IGNORE_ALL_CERT_ERRORS) if (params_->ssl_params()->load_flags() & LOAD_IGNORE_ALL_CERT_ERRORS) {
result = OK; result = OK;
else } else {
// TODO(rch): allow the user to deal with proxy cert errors in the // TODO(rch): allow the user to deal with proxy cert errors in the
// same way as server cert errors. // same way as server cert errors.
return ERR_PROXY_CERTIFICATE_INVALID; return ERR_PROXY_CERTIFICATE_INVALID;
}
} }
if (result < 0) { if (result < 0) {
if (transport_socket_handle_->socket()) if (transport_socket_handle_->socket())
...@@ -247,10 +250,11 @@ int HttpProxyConnectJob::DoSSLConnectComplete(int result) { ...@@ -247,10 +250,11 @@ int HttpProxyConnectJob::DoSSLConnectComplete(int result) {
// need to add a predicate to this if statement so we fall through // need to add a predicate to this if statement so we fall through
// to the else case. (HttpProxyClientSocket currently acts as // to the else case. (HttpProxyClientSocket currently acts as
// a "trusted" SPDY proxy). // a "trusted" SPDY proxy).
if (using_spdy_ && params_->tunnel()) if (using_spdy_ && params_->tunnel()) {
next_state_ = STATE_SPDY_PROXY_CREATE_STREAM; next_state_ = STATE_SPDY_PROXY_CREATE_STREAM;
else } else {
next_state_ = STATE_HTTP_PROXY_CONNECT; next_state_ = STATE_HTTP_PROXY_CONNECT;
}
return result; return result;
} }
...@@ -332,10 +336,11 @@ int HttpProxyConnectJob::DoSpdyProxyCreateStreamComplete(int result) { ...@@ -332,10 +336,11 @@ int HttpProxyConnectJob::DoSpdyProxyCreateStreamComplete(int result) {
} }
int HttpProxyConnectJob::ConnectInternal() { int HttpProxyConnectJob::ConnectInternal() {
if (params_->transport_params()) if (params_->transport_params()) {
next_state_ = STATE_TCP_CONNECT; next_state_ = STATE_TCP_CONNECT;
else } else {
next_state_ = STATE_SSL_CONNECT; next_state_ = STATE_SSL_CONNECT;
}
return DoLoop(OK); return DoLoop(OK);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment