summaryrefslogtreecommitdiff
path: root/chromium/net/http/http_proxy_client_socket_wrapper.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-01-04 14:17:57 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-01-05 10:05:06 +0000
commit39d357e3248f80abea0159765ff39554affb40db (patch)
treeaba0e6bfb76de0244bba0f5fdbd64b830dd6e621 /chromium/net/http/http_proxy_client_socket_wrapper.cc
parent87778abf5a1f89266f37d1321b92a21851d8244d (diff)
downloadqtwebengine-chromium-39d357e3248f80abea0159765ff39554affb40db.tar.gz
BASELINE: Update Chromium to 55.0.2883.105
And updates ninja to 1.7.2 Change-Id: I20d43c737f82764d857ada9a55586901b18b9243 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/net/http/http_proxy_client_socket_wrapper.cc')
-rw-r--r--chromium/net/http/http_proxy_client_socket_wrapper.cc28
1 files changed, 16 insertions, 12 deletions
diff --git a/chromium/net/http/http_proxy_client_socket_wrapper.cc b/chromium/net/http/http_proxy_client_socket_wrapper.cc
index b857f0fef47..f389141d2f7 100644
--- a/chromium/net/http/http_proxy_client_socket_wrapper.cc
+++ b/chromium/net/http/http_proxy_client_socket_wrapper.cc
@@ -15,6 +15,9 @@
#include "net/base/proxy_delegate.h"
#include "net/http/http_proxy_client_socket.h"
#include "net/http/http_response_info.h"
+#include "net/log/net_log_event_type.h"
+#include "net/log/net_log_source.h"
+#include "net/log/net_log_source_type.h"
#include "net/socket/client_socket_handle.h"
#include "net/spdy/spdy_proxy_client_socket.h"
#include "net/spdy/spdy_session.h"
@@ -42,7 +45,7 @@ HttpProxyClientSocketWrapper::HttpProxyClientSocketWrapper(
SpdySessionPool* spdy_session_pool,
bool tunnel,
ProxyDelegate* proxy_delegate,
- const BoundNetLog& net_log)
+ const NetLogWithSource& net_log)
: next_state_(STATE_NONE),
group_name_(group_name),
priority_(priority),
@@ -67,9 +70,10 @@ HttpProxyClientSocketWrapper::HttpProxyClientSocketWrapper(
http_auth_cache,
http_auth_handler_factory)
: nullptr),
- net_log_(BoundNetLog::Make(net_log.net_log(),
- NetLog::SOURCE_PROXY_CLIENT_SOCKET_WRAPPER)) {
- net_log_.BeginEvent(NetLog::TYPE_SOCKET_ALIVE,
+ net_log_(NetLogWithSource::Make(
+ net_log.net_log(),
+ NetLogSourceType::PROXY_CLIENT_SOCKET_WRAPPER)) {
+ net_log_.BeginEvent(NetLogEventType::SOCKET_ALIVE,
net_log.source().ToEventParametersCallback());
DCHECK(transport_params || ssl_params);
DCHECK(!transport_params || !ssl_params);
@@ -79,7 +83,7 @@ HttpProxyClientSocketWrapper::~HttpProxyClientSocketWrapper() {
// Make sure no sockets are returned to the lower level socket pools.
Disconnect();
- net_log_.EndEvent(NetLog::TYPE_SOCKET_ALIVE);
+ net_log_.EndEvent(NetLogEventType::SOCKET_ALIVE);
}
LoadState HttpProxyClientSocketWrapper::GetConnectLoadState() const {
@@ -147,9 +151,9 @@ bool HttpProxyClientSocketWrapper::IsUsingSpdy() const {
return false;
}
-NextProto HttpProxyClientSocketWrapper::GetProtocolNegotiated() const {
+NextProto HttpProxyClientSocketWrapper::GetProxyNegotiatedProtocol() const {
if (transport_socket_)
- return transport_socket_->GetProtocolNegotiated();
+ return transport_socket_->GetProxyNegotiatedProtocol();
return kProtoUnknown;
}
@@ -204,7 +208,7 @@ bool HttpProxyClientSocketWrapper::IsConnectedAndIdle() const {
return false;
}
-const BoundNetLog& HttpProxyClientSocketWrapper::NetLog() const {
+const NetLogWithSource& HttpProxyClientSocketWrapper::NetLog() const {
return net_log_;
}
@@ -470,8 +474,8 @@ int HttpProxyClientSocketWrapper::DoSSLConnectComplete(int result) {
SSLClientSocket* ssl =
static_cast<SSLClientSocket*>(transport_socket_handle_->socket());
- protocol_negotiated_ = ssl->GetNegotiatedProtocol();
- using_spdy_ = NextProtoIsSPDY(protocol_negotiated_);
+ negotiated_protocol_ = ssl->GetNegotiatedProtocol();
+ using_spdy_ = negotiated_protocol_ == kProtoHTTP2;
// Reset the timer to just the length of time allowed for HttpProxy handshake
// so that a fast SSL connection plus a slow HttpProxy failure doesn't take
@@ -499,7 +503,7 @@ int HttpProxyClientSocketWrapper::DoHttpProxyConnect() {
transport_socket_.reset(new HttpProxyClientSocket(
transport_socket_handle_.release(), user_agent_, endpoint_,
GetDestination().host_port_pair(), http_auth_controller_.get(), tunnel_,
- using_spdy_, protocol_negotiated_, proxy_delegate_,
+ using_spdy_, negotiated_protocol_, proxy_delegate_,
ssl_params_.get() != nullptr));
return transport_socket_->Connect(base::Bind(
&HttpProxyClientSocketWrapper::OnIOComplete, base::Unretained(this)));
@@ -529,7 +533,7 @@ int HttpProxyClientSocketWrapper::DoSpdyProxyCreateStream() {
} else {
// Create a session direct to the proxy itself
spdy_session = spdy_session_pool_->CreateAvailableSessionFromSocket(
- key, std::move(transport_socket_handle_), net_log_, OK,
+ key, std::move(transport_socket_handle_), net_log_,
/*using_ssl_*/ true);
DCHECK(spdy_session);
}