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

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: rebase Created 6 years, 6 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
« no previous file with comments | « net/http/http_response_headers_unittest.cc ('k') | net/proxy/proxy_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1307 if (request_info_.load_flags & LOAD_BYPASS_PROXY) { 1307 if (request_info_.load_flags & LOAD_BYPASS_PROXY) {
1308 return error; 1308 return error;
1309 } 1309 }
1310 1310
1311 if (proxy_info_.is_https() && proxy_ssl_config_.send_client_cert) { 1311 if (proxy_info_.is_https() && proxy_ssl_config_.send_client_cert) {
1312 session_->ssl_client_auth_cache()->Remove( 1312 session_->ssl_client_auth_cache()->Remove(
1313 proxy_info_.proxy_server().host_port_pair()); 1313 proxy_info_.proxy_server().host_port_pair());
1314 } 1314 }
1315 1315
1316 int rv = session_->proxy_service()->ReconsiderProxyAfterError( 1316 int rv = session_->proxy_service()->ReconsiderProxyAfterError(
1317 request_info_.url, &proxy_info_, io_callback_, &pac_request_, net_log_); 1317 request_info_.url, error, &proxy_info_, io_callback_, &pac_request_,
1318 net_log_);
1318 if (rv == OK || rv == ERR_IO_PENDING) { 1319 if (rv == OK || rv == ERR_IO_PENDING) {
1319 // If the error was during connection setup, there is no socket to 1320 // If the error was during connection setup, there is no socket to
1320 // disconnect. 1321 // disconnect.
1321 if (connection_->socket()) 1322 if (connection_->socket())
1322 connection_->socket()->Disconnect(); 1323 connection_->socket()->Disconnect();
1323 connection_->Reset(); 1324 connection_->Reset();
1324 if (request_) 1325 if (request_)
1325 request_->RemoveRequestFromSpdySessionRequestMap(); 1326 request_->RemoveRequestFromSpdySessionRequestMap();
1326 next_state_ = STATE_RESOLVE_PROXY_COMPLETE; 1327 next_state_ = STATE_RESOLVE_PROXY_COMPLETE;
1327 } else { 1328 } else {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1465 1466
1466 if (job_status_ == STATUS_SUCCEEDED && other_job_status_ == STATUS_BROKEN) { 1467 if (job_status_ == STATUS_SUCCEEDED && other_job_status_ == STATUS_BROKEN) {
1467 HistogramBrokenAlternateProtocolLocation( 1468 HistogramBrokenAlternateProtocolLocation(
1468 BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_MAIN); 1469 BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_MAIN);
1469 session_->http_server_properties()->SetBrokenAlternateProtocol( 1470 session_->http_server_properties()->SetBrokenAlternateProtocol(
1470 HostPortPair::FromURL(request_info_.url)); 1471 HostPortPair::FromURL(request_info_.url));
1471 } 1472 }
1472 } 1473 }
1473 1474
1474 } // namespace net 1475 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_response_headers_unittest.cc ('k') | net/proxy/proxy_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698