| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/websockets/websocket_stream_create_test_base.h" | 5 #include "net/websockets/websocket_stream_create_test_base.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 ssl_data_.clear(); | 110 ssl_data_.clear(); |
| 111 std::unique_ptr<WebSocketStream::ConnectDelegate> connect_delegate( | 111 std::unique_ptr<WebSocketStream::ConnectDelegate> connect_delegate( |
| 112 new TestConnectDelegate(this, connect_run_loop_.QuitClosure())); | 112 new TestConnectDelegate(this, connect_run_loop_.QuitClosure())); |
| 113 WebSocketStream::ConnectDelegate* delegate = connect_delegate.get(); | 113 WebSocketStream::ConnectDelegate* delegate = connect_delegate.get(); |
| 114 std::unique_ptr<WebSocketHandshakeStreamCreateHelper> create_helper( | 114 std::unique_ptr<WebSocketHandshakeStreamCreateHelper> create_helper( |
| 115 new DeterministicKeyWebSocketHandshakeStreamCreateHelper(delegate, | 115 new DeterministicKeyWebSocketHandshakeStreamCreateHelper(delegate, |
| 116 sub_protocols)); | 116 sub_protocols)); |
| 117 stream_request_ = WebSocketStream::CreateAndConnectStreamForTesting( | 117 stream_request_ = WebSocketStream::CreateAndConnectStreamForTesting( |
| 118 socket_url, std::move(create_helper), origin, first_party_for_cookies, | 118 socket_url, std::move(create_helper), origin, first_party_for_cookies, |
| 119 additional_headers, url_request_context_host_.GetURLRequestContext(), | 119 additional_headers, url_request_context_host_.GetURLRequestContext(), |
| 120 BoundNetLog(), std::move(connect_delegate), | 120 NetLogWithSource(), std::move(connect_delegate), |
| 121 timer ? std::move(timer) | 121 timer ? std::move(timer) |
| 122 : std::unique_ptr<base::Timer>(new base::Timer(false, false))); | 122 : std::unique_ptr<base::Timer>(new base::Timer(false, false))); |
| 123 } | 123 } |
| 124 | 124 |
| 125 std::vector<HeaderKeyValuePair> | 125 std::vector<HeaderKeyValuePair> |
| 126 WebSocketStreamCreateTestBase::RequestHeadersToVector( | 126 WebSocketStreamCreateTestBase::RequestHeadersToVector( |
| 127 const HttpRequestHeaders& headers) { | 127 const HttpRequestHeaders& headers) { |
| 128 HttpRequestHeaders::Iterator it(headers); | 128 HttpRequestHeaders::Iterator it(headers); |
| 129 std::vector<HeaderKeyValuePair> result; | 129 std::vector<HeaderKeyValuePair> result; |
| 130 while (it.GetNext()) | 130 while (it.GetNext()) |
| (...skipping 14 matching lines...) Expand all Loading... |
| 145 | 145 |
| 146 void WebSocketStreamCreateTestBase::WaitUntilConnectDone() { | 146 void WebSocketStreamCreateTestBase::WaitUntilConnectDone() { |
| 147 connect_run_loop_.Run(); | 147 connect_run_loop_.Run(); |
| 148 } | 148 } |
| 149 | 149 |
| 150 std::vector<std::string> WebSocketStreamCreateTestBase::NoSubProtocols() { | 150 std::vector<std::string> WebSocketStreamCreateTestBase::NoSubProtocols() { |
| 151 return std::vector<std::string>(); | 151 return std::vector<std::string>(); |
| 152 } | 152 } |
| 153 | 153 |
| 154 } // namespace net | 154 } // namespace net |
| OLD | NEW |