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

Side by Side Diff: jingle/glue/proxy_resolving_client_socket.cc

Issue 298883011: Record errors that trigger a data reduction proxy bypass (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments from mdw 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 unified diff | Download patch
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 "jingle/glue/proxy_resolving_client_socket.h" 5 #include "jingle/glue/proxy_resolving_client_socket.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 default: 263 default:
264 return error; 264 return error;
265 } 265 }
266 266
267 if (proxy_info_.is_https() && ssl_config_.send_client_cert) { 267 if (proxy_info_.is_https() && ssl_config_.send_client_cert) {
268 network_session_->ssl_client_auth_cache()->Remove( 268 network_session_->ssl_client_auth_cache()->Remove(
269 proxy_info_.proxy_server().host_port_pair()); 269 proxy_info_.proxy_server().host_port_pair());
270 } 270 }
271 271
272 int rv = network_session_->proxy_service()->ReconsiderProxyAfterError( 272 int rv = network_session_->proxy_service()->ReconsiderProxyAfterError(
273 proxy_url_, &proxy_info_, proxy_resolve_callback_, &pac_request_, 273 proxy_url_, error, &proxy_info_, proxy_resolve_callback_, &pac_request_,
274 bound_net_log_); 274 bound_net_log_);
275 if (rv == net::OK || rv == net::ERR_IO_PENDING) { 275 if (rv == net::OK || rv == net::ERR_IO_PENDING) {
276 CloseTransportSocket(); 276 CloseTransportSocket();
277 } else { 277 } else {
278 // If ReconsiderProxyAfterError() failed synchronously, it means 278 // If ReconsiderProxyAfterError() failed synchronously, it means
279 // there was nothing left to fall-back to, so fail the transaction 279 // there was nothing left to fall-back to, so fail the transaction
280 // with the last connection error we got. 280 // with the last connection error we got.
281 rv = error; 281 rv = error;
282 } 282 }
283 283
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 return false; 389 return false;
390 } 390 }
391 391
392 void ProxyResolvingClientSocket::CloseTransportSocket() { 392 void ProxyResolvingClientSocket::CloseTransportSocket() {
393 if (transport_.get() && transport_->socket()) 393 if (transport_.get() && transport_->socket())
394 transport_->socket()->Disconnect(); 394 transport_->socket()->Disconnect();
395 transport_.reset(); 395 transport_.reset();
396 } 396 }
397 397
398 } // namespace jingle_glue 398 } // namespace jingle_glue
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698