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

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

Issue 2110973002: Removing load_flags from ProxyService and ProxyDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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/test_proxy_delegate.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 #include <utility> 9 #include <utility>
10 10
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 GURL::Replacements replacements; 784 GURL::Replacements replacements;
785 // new_port needs to be in scope here because GURL::Replacements references 785 // new_port needs to be in scope here because GURL::Replacements references
786 // the memory contained by it directly. 786 // the memory contained by it directly.
787 const std::string new_port = base::UintToString(alternative_service_.port); 787 const std::string new_port = base::UintToString(alternative_service_.port);
788 replacements.SetSchemeStr("https"); 788 replacements.SetSchemeStr("https");
789 replacements.SetPortStr(new_port); 789 replacements.SetPortStr(new_port);
790 url_for_proxy = url_for_proxy.ReplaceComponents(replacements); 790 url_for_proxy = url_for_proxy.ReplaceComponents(replacements);
791 } 791 }
792 792
793 return session_->proxy_service()->ResolveProxy( 793 return session_->proxy_service()->ResolveProxy(
794 url_for_proxy, request_info_.method, request_info_.load_flags, 794 url_for_proxy, request_info_.method, &proxy_info_, io_callback_,
795 &proxy_info_, io_callback_, &pac_request_, 795 &pac_request_, session_->params().proxy_delegate, net_log_);
796 session_->params().proxy_delegate, net_log_);
797 } 796 }
798 797
799 int HttpStreamFactoryImpl::Job::DoResolveProxyComplete(int result) { 798 int HttpStreamFactoryImpl::Job::DoResolveProxyComplete(int result) {
800 pac_request_ = NULL; 799 pac_request_ = NULL;
801 800
802 if (result == OK) { 801 if (result == OK) {
803 // Remove unsupported proxies from the list. 802 // Remove unsupported proxies from the list.
804 int supported_proxies = 803 int supported_proxies =
805 ProxyServer::SCHEME_DIRECT | ProxyServer::SCHEME_HTTP | 804 ProxyServer::SCHEME_DIRECT | ProxyServer::SCHEME_HTTP |
806 ProxyServer::SCHEME_HTTPS | ProxyServer::SCHEME_SOCKS4 | 805 ProxyServer::SCHEME_HTTPS | ProxyServer::SCHEME_SOCKS4 |
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
1527 1526
1528 if (request_info_.load_flags & LOAD_BYPASS_PROXY) 1527 if (request_info_.load_flags & LOAD_BYPASS_PROXY)
1529 return error; 1528 return error;
1530 1529
1531 if (proxy_info_.is_https() && proxy_ssl_config_.send_client_cert) { 1530 if (proxy_info_.is_https() && proxy_ssl_config_.send_client_cert) {
1532 session_->ssl_client_auth_cache()->Remove( 1531 session_->ssl_client_auth_cache()->Remove(
1533 proxy_info_.proxy_server().host_port_pair()); 1532 proxy_info_.proxy_server().host_port_pair());
1534 } 1533 }
1535 1534
1536 int rv = session_->proxy_service()->ReconsiderProxyAfterError( 1535 int rv = session_->proxy_service()->ReconsiderProxyAfterError(
1537 request_info_.url, request_info_.method, request_info_.load_flags, error, 1536 request_info_.url, request_info_.method, error, &proxy_info_,
1538 &proxy_info_, io_callback_, &pac_request_, 1537 io_callback_, &pac_request_, session_->params().proxy_delegate, net_log_);
1539 session_->params().proxy_delegate, net_log_);
1540 if (rv == OK || rv == ERR_IO_PENDING) { 1538 if (rv == OK || rv == ERR_IO_PENDING) {
1541 // If the error was during connection setup, there is no socket to 1539 // If the error was during connection setup, there is no socket to
1542 // disconnect. 1540 // disconnect.
1543 if (connection_->socket()) 1541 if (connection_->socket())
1544 connection_->socket()->Disconnect(); 1542 connection_->socket()->Disconnect();
1545 connection_->Reset(); 1543 connection_->Reset();
1546 delegate_->RemoveRequestFromSpdySessionRequestMapForJob(this); 1544 delegate_->RemoveRequestFromSpdySessionRequestMapForJob(this);
1547 next_state_ = STATE_RESOLVE_PROXY_COMPLETE; 1545 next_state_ = STATE_RESOLVE_PROXY_COMPLETE;
1548 } else { 1546 } else {
1549 // If ReconsiderProxyAfterError() failed synchronously, it means 1547 // If ReconsiderProxyAfterError() failed synchronously, it means
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1666 1664
1667 ConnectionAttempts socket_attempts = connection_->connection_attempts(); 1665 ConnectionAttempts socket_attempts = connection_->connection_attempts();
1668 if (connection_->socket()) { 1666 if (connection_->socket()) {
1669 connection_->socket()->GetConnectionAttempts(&socket_attempts); 1667 connection_->socket()->GetConnectionAttempts(&socket_attempts);
1670 } 1668 }
1671 1669
1672 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); 1670 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts);
1673 } 1671 }
1674 1672
1675 } // namespace net 1673 } // namespace net
OLDNEW
« no previous file with comments | « net/base/test_proxy_delegate.cc ('k') | net/proxy/proxy_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698