| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/socket/websocket_transport_client_socket_pool.h" | 5 #include "net/socket/websocket_transport_client_socket_pool.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 } | 105 } |
| 106 } while (rv != ERR_IO_PENDING && next_state_ != STATE_NONE); | 106 } while (rv != ERR_IO_PENDING && next_state_ != STATE_NONE); |
| 107 | 107 |
| 108 return rv; | 108 return rv; |
| 109 } | 109 } |
| 110 | 110 |
| 111 int WebSocketTransportConnectJob::DoResolveHost() { | 111 int WebSocketTransportConnectJob::DoResolveHost() { |
| 112 next_state_ = STATE_RESOLVE_HOST_COMPLETE; | 112 next_state_ = STATE_RESOLVE_HOST_COMPLETE; |
| 113 connect_timing_.dns_start = base::TimeTicks::Now(); | 113 connect_timing_.dns_start = base::TimeTicks::Now(); |
| 114 | 114 |
| 115 return resolver_.Resolve( | 115 return resolver_->Resolve( |
| 116 params_->destination(), priority(), &addresses_, | 116 params_->destination(), priority(), &addresses_, |
| 117 base::Bind(&WebSocketTransportConnectJob::OnIOComplete, | 117 base::Bind(&WebSocketTransportConnectJob::OnIOComplete, |
| 118 base::Unretained(this)), | 118 base::Unretained(this)), |
| 119 net_log()); | 119 &request_, net_log()); |
| 120 } | 120 } |
| 121 | 121 |
| 122 int WebSocketTransportConnectJob::DoResolveHostComplete(int result) { | 122 int WebSocketTransportConnectJob::DoResolveHostComplete(int result) { |
| 123 TRACE_EVENT0("net", "WebSocketTransportConnectJob::DoResolveHostComplete"); | 123 TRACE_EVENT0("net", "WebSocketTransportConnectJob::DoResolveHostComplete"); |
| 124 connect_timing_.dns_end = base::TimeTicks::Now(); | 124 connect_timing_.dns_end = base::TimeTicks::Now(); |
| 125 // Overwrite connection start time, since for connections that do not go | 125 // Overwrite connection start time, since for connections that do not go |
| 126 // through proxies, |connect_start| should not include dns lookup time. | 126 // through proxies, |connect_start| should not include dns lookup time. |
| 127 connect_timing_.connect_start = connect_timing_.dns_end; | 127 connect_timing_.connect_start = connect_timing_.dns_end; |
| 128 | 128 |
| 129 if (result != OK) | 129 if (result != OK) |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 handle(handle), | 680 handle(handle), |
| 681 callback(callback), | 681 callback(callback), |
| 682 net_log(net_log) {} | 682 net_log(net_log) {} |
| 683 | 683 |
| 684 WebSocketTransportClientSocketPool::StalledRequest::StalledRequest( | 684 WebSocketTransportClientSocketPool::StalledRequest::StalledRequest( |
| 685 const StalledRequest& other) = default; | 685 const StalledRequest& other) = default; |
| 686 | 686 |
| 687 WebSocketTransportClientSocketPool::StalledRequest::~StalledRequest() {} | 687 WebSocketTransportClientSocketPool::StalledRequest::~StalledRequest() {} |
| 688 | 688 |
| 689 } // namespace net | 689 } // namespace net |
| OLD | NEW |