| OLD | NEW |
| 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.h" | 5 #include "net/http/http_stream_factory_impl.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1266 | 1266 |
| 1267 // Now request a stream. | 1267 // Now request a stream. |
| 1268 HttpRequestInfo request_info; | 1268 HttpRequestInfo request_info; |
| 1269 request_info.method = "GET"; | 1269 request_info.method = "GET"; |
| 1270 request_info.url = GURL("ws://www.google.com:8888"); | 1270 request_info.url = GURL("ws://www.google.com:8888"); |
| 1271 request_info.load_flags = 0; | 1271 request_info.load_flags = 0; |
| 1272 | 1272 |
| 1273 session->http_server_properties()->SetAlternateProtocol( | 1273 session->http_server_properties()->SetAlternateProtocol( |
| 1274 HostPortPair("www.google.com", 8888), | 1274 HostPortPair("www.google.com", 8888), |
| 1275 9999, | 1275 9999, |
| 1276 NPN_SPDY_3); | 1276 NPN_SPDY_3, |
| 1277 1); |
| 1277 | 1278 |
| 1278 SSLConfig ssl_config; | 1279 SSLConfig ssl_config; |
| 1279 StreamRequestWaiter waiter; | 1280 StreamRequestWaiter waiter; |
| 1280 WebSocketStreamCreateHelper create_helper; | 1281 WebSocketStreamCreateHelper create_helper; |
| 1281 scoped_ptr<HttpStreamRequest> request( | 1282 scoped_ptr<HttpStreamRequest> request( |
| 1282 session->http_stream_factory_for_websocket() | 1283 session->http_stream_factory_for_websocket() |
| 1283 ->RequestWebSocketHandshakeStream(request_info, | 1284 ->RequestWebSocketHandshakeStream(request_info, |
| 1284 DEFAULT_PRIORITY, | 1285 DEFAULT_PRIORITY, |
| 1285 ssl_config, | 1286 ssl_config, |
| 1286 ssl_config, | 1287 ssl_config, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1308 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); | 1309 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); |
| 1309 | 1310 |
| 1310 // Make sure there is no orphaned job. it is already canceled. | 1311 // Make sure there is no orphaned job. it is already canceled. |
| 1311 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>( | 1312 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>( |
| 1312 session->http_stream_factory_for_websocket())->num_orphaned_jobs()); | 1313 session->http_stream_factory_for_websocket())->num_orphaned_jobs()); |
| 1313 } | 1314 } |
| 1314 | 1315 |
| 1315 } // namespace | 1316 } // namespace |
| 1316 | 1317 |
| 1317 } // namespace net | 1318 } // namespace net |
| OLD | NEW |