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

Side by Side Diff: net/http/http_stream_factory_impl_job.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: 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 "net/http/http_stream_factory_impl_job.h" 5 #include "net/http/http_stream_factory_impl_job.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after
1341 if (request_info_.load_flags & LOAD_BYPASS_PROXY) { 1341 if (request_info_.load_flags & LOAD_BYPASS_PROXY) {
1342 return error; 1342 return error;
1343 } 1343 }
1344 1344
1345 if (proxy_info_.is_https() && proxy_ssl_config_.send_client_cert) { 1345 if (proxy_info_.is_https() && proxy_ssl_config_.send_client_cert) {
1346 session_->ssl_client_auth_cache()->Remove( 1346 session_->ssl_client_auth_cache()->Remove(
1347 proxy_info_.proxy_server().host_port_pair()); 1347 proxy_info_.proxy_server().host_port_pair());
1348 } 1348 }
1349 1349
1350 int rv = session_->proxy_service()->ReconsiderProxyAfterError( 1350 int rv = session_->proxy_service()->ReconsiderProxyAfterError(
1351 request_info_.url, &proxy_info_, io_callback_, &pac_request_, net_log_); 1351 request_info_.url, error, &proxy_info_, io_callback_, &pac_request_,
1352 net_log_);
1352 if (rv == OK || rv == ERR_IO_PENDING) { 1353 if (rv == OK || rv == ERR_IO_PENDING) {
1353 // If the error was during connection setup, there is no socket to 1354 // If the error was during connection setup, there is no socket to
1354 // disconnect. 1355 // disconnect.
1355 if (connection_->socket()) 1356 if (connection_->socket())
1356 connection_->socket()->Disconnect(); 1357 connection_->socket()->Disconnect();
1357 connection_->Reset(); 1358 connection_->Reset();
1358 if (request_) { 1359 if (request_) {
1359 request_->RemoveRequestFromSpdySessionRequestMap(); 1360 request_->RemoveRequestFromSpdySessionRequestMap();
1360 request_->RemoveRequestFromHttpPipeliningRequestMap(); 1361 request_->RemoveRequestFromHttpPipeliningRequestMap();
1361 } 1362 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1490 (net::LOAD_MAIN_FRAME | net::LOAD_SUB_FRAME | net::LOAD_PREFETCH | 1491 (net::LOAD_MAIN_FRAME | net::LOAD_SUB_FRAME | net::LOAD_PREFETCH |
1491 net::LOAD_IS_DOWNLOAD)) { 1492 net::LOAD_IS_DOWNLOAD)) {
1492 // Avoid pipelining resources that may be streamed for a long time. 1493 // Avoid pipelining resources that may be streamed for a long time.
1493 return false; 1494 return false;
1494 } 1495 }
1495 return stream_factory_->http_pipelined_host_pool_.IsKeyEligibleForPipelining( 1496 return stream_factory_->http_pipelined_host_pool_.IsKeyEligibleForPipelining(
1496 *http_pipelining_key_.get()); 1497 *http_pipelining_key_.get());
1497 } 1498 }
1498 1499
1499 } // namespace net 1500 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698