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

Side by Side Diff: net/http/http_stream_factory_impl_job.cc

Issue 473513002: Keep track of network error in ProxyRetryInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor formatting Created 6 years, 4 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/base/network_delegate.cc ('k') | net/proxy/proxy_info.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 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 bool use_relative_url = direct || request_info_.url.SchemeIs("https"); 1130 bool use_relative_url = direct || request_info_.url.SchemeIs("https");
1131 stream_.reset(new SpdyHttpStream(spdy_session, use_relative_url)); 1131 stream_.reset(new SpdyHttpStream(spdy_session, use_relative_url));
1132 1132
1133 return OK; 1133 return OK;
1134 } 1134 }
1135 1135
1136 int HttpStreamFactoryImpl::Job::DoCreateStreamComplete(int result) { 1136 int HttpStreamFactoryImpl::Job::DoCreateStreamComplete(int result) {
1137 if (result < 0) 1137 if (result < 0)
1138 return result; 1138 return result;
1139 1139
1140 session_->proxy_service()->ReportSuccess(proxy_info_); 1140 session_->proxy_service()->ReportSuccess(proxy_info_,
1141 session_->network_delegate());
1141 next_state_ = STATE_NONE; 1142 next_state_ = STATE_NONE;
1142 return OK; 1143 return OK;
1143 } 1144 }
1144 1145
1145 int HttpStreamFactoryImpl::Job::DoRestartTunnelAuth() { 1146 int HttpStreamFactoryImpl::Job::DoRestartTunnelAuth() {
1146 next_state_ = STATE_RESTART_TUNNEL_AUTH_COMPLETE; 1147 next_state_ = STATE_RESTART_TUNNEL_AUTH_COMPLETE;
1147 ProxyClientSocket* proxy_socket = 1148 ProxyClientSocket* proxy_socket =
1148 static_cast<ProxyClientSocket*>(connection_->socket()); 1149 static_cast<ProxyClientSocket*>(connection_->socket());
1149 return proxy_socket->RestartWithAuth(io_callback_); 1150 return proxy_socket->RestartWithAuth(io_callback_);
1150 } 1151 }
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
1473 1474
1474 if (job_status_ == STATUS_SUCCEEDED && other_job_status_ == STATUS_BROKEN) { 1475 if (job_status_ == STATUS_SUCCEEDED && other_job_status_ == STATUS_BROKEN) {
1475 HistogramBrokenAlternateProtocolLocation( 1476 HistogramBrokenAlternateProtocolLocation(
1476 BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_MAIN); 1477 BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_MAIN);
1477 session_->http_server_properties()->SetBrokenAlternateProtocol( 1478 session_->http_server_properties()->SetBrokenAlternateProtocol(
1478 HostPortPair::FromURL(request_info_.url)); 1479 HostPortPair::FromURL(request_info_.url));
1479 } 1480 }
1480 } 1481 }
1481 1482
1482 } // namespace net 1483 } // namespace net
OLDNEW
« no previous file with comments | « net/base/network_delegate.cc ('k') | net/proxy/proxy_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698