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

Unified Diff: net/http/http_network_transaction.cc

Issue 2334623003: Store net::ProxyServer in HttpResponseInfo object (Closed)
Patch Set: Rebased, fix compile error Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: net/http/http_network_transaction.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index b90930afb5cc6ee6c7cec17390aa9c1423079f0a..77f925301c3d0a84b8c32c47ed7a4af737ed4611 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -53,6 +53,7 @@
#include "net/http/transport_security_state.h"
#include "net/http/url_security_manager.h"
#include "net/log/net_log_event_type.h"
+#include "net/proxy/proxy_server.h"
#include "net/socket/client_socket_factory.h"
#include "net/socket/socks_client_socket_pool.h"
#include "net/socket/ssl_client_socket.h"
@@ -456,7 +457,11 @@ void HttpNetworkTransaction::OnStreamReady(const SSLConfig& used_ssl_config,
response_.was_fetched_via_spdy = stream_request_->using_spdy();
response_.was_fetched_via_proxy = !proxy_info_.is_direct();
if (response_.was_fetched_via_proxy && !proxy_info_.is_empty())
- response_.proxy_server = proxy_info_.proxy_server().host_port_pair();
+ response_.proxy_server = proxy_info_.proxy_server();
+ else if (!response_.was_fetched_via_proxy && proxy_info_.is_direct())
+ response_.proxy_server = ProxyServer::Direct();
+ else
+ response_.proxy_server = ProxyServer();
OnIOComplete(OK);
}

Powered by Google App Engine
This is Rietveld 408576698