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

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

Issue 7532011: Only mark a proxy as bad if we have confirmation that another proxy succeeded for the same request. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Better names Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 829
830 bool use_relative_url = direct || request_info_.url.SchemeIs("https"); 830 bool use_relative_url = direct || request_info_.url.SchemeIs("https");
831 stream_.reset(new SpdyHttpStream(spdy_session, use_relative_url)); 831 stream_.reset(new SpdyHttpStream(spdy_session, use_relative_url));
832 return OK; 832 return OK;
833 } 833 }
834 834
835 int HttpStreamFactoryImpl::Job::DoCreateStreamComplete(int result) { 835 int HttpStreamFactoryImpl::Job::DoCreateStreamComplete(int result) {
836 if (result < 0) 836 if (result < 0)
837 return result; 837 return result;
838 838
839 session_->proxy_service()->ReportSuccess(proxy_info_);
839 next_state_ = STATE_NONE; 840 next_state_ = STATE_NONE;
840 return OK; 841 return OK;
841 } 842 }
842 843
843 int HttpStreamFactoryImpl::Job::DoRestartTunnelAuth() { 844 int HttpStreamFactoryImpl::Job::DoRestartTunnelAuth() {
844 next_state_ = STATE_RESTART_TUNNEL_AUTH_COMPLETE; 845 next_state_ = STATE_RESTART_TUNNEL_AUTH_COMPLETE;
845 HttpProxyClientSocket* http_proxy_socket = 846 HttpProxyClientSocket* http_proxy_socket =
846 static_cast<HttpProxyClientSocket*>(connection_->socket()); 847 static_cast<HttpProxyClientSocket*>(connection_->socket());
847 return http_proxy_socket->RestartWithAuth(&io_callback_); 848 return http_proxy_socket->RestartWithAuth(&io_callback_);
848 } 849 }
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 << (using_spdy ? "true\n" : "false\n"); 1117 << (using_spdy ? "true\n" : "false\n");
1117 } 1118 }
1118 } 1119 }
1119 1120
1120 #if defined(OS_WIN) 1121 #if defined(OS_WIN)
1121 #pragma optimize( "", on ) 1122 #pragma optimize( "", on )
1122 #pragma warning (default: 4748) 1123 #pragma warning (default: 4748)
1123 #endif 1124 #endif
1124 1125
1125 } // namespace net 1126 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698