| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ | 5 #ifndef NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ |
| 6 #define NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ | 6 #define NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 const SpdySessionKey& key, | 251 const SpdySessionKey& key, |
| 252 Error expected_error, | 252 Error expected_error, |
| 253 const NetLogWithSource& net_log); | 253 const NetLogWithSource& net_log); |
| 254 | 254 |
| 255 // Like CreateInsecureSpdySession(), but uses TLS. | 255 // Like CreateInsecureSpdySession(), but uses TLS. |
| 256 base::WeakPtr<SpdySession> CreateSecureSpdySession( | 256 base::WeakPtr<SpdySession> CreateSecureSpdySession( |
| 257 HttpNetworkSession* http_session, | 257 HttpNetworkSession* http_session, |
| 258 const SpdySessionKey& key, | 258 const SpdySessionKey& key, |
| 259 const NetLogWithSource& net_log); | 259 const NetLogWithSource& net_log); |
| 260 | 260 |
| 261 // Like CreateSecureSpdySession(), but does not fail if there is already an IP |
| 262 // pooled session for |key|. |
| 263 base::WeakPtr<SpdySession> CreateSecureSpdySessionWithIpBasedPoolingDisabled( |
| 264 HttpNetworkSession* http_session, |
| 265 const SpdySessionKey& key, |
| 266 const NetLogWithSource& net_log); |
| 267 |
| 261 // Creates an insecure SPDY session for the given key and puts it in | 268 // Creates an insecure SPDY session for the given key and puts it in |
| 262 // |pool|. The returned session will neither receive nor send any | 269 // |pool|. The returned session will neither receive nor send any |
| 263 // data. A SPDY session for |key| must not already exist. | 270 // data. A SPDY session for |key| must not already exist. |
| 264 base::WeakPtr<SpdySession> CreateFakeSpdySession(SpdySessionPool* pool, | 271 base::WeakPtr<SpdySession> CreateFakeSpdySession(SpdySessionPool* pool, |
| 265 const SpdySessionKey& key); | 272 const SpdySessionKey& key); |
| 266 | 273 |
| 267 // Tries to create an insecure SPDY session for the given key but | 274 // Tries to create an insecure SPDY session for the given key but |
| 268 // expects the attempt to fail with the given error. The session will | 275 // expects the attempt to fail with the given error. The session will |
| 269 // neither receive nor send any data. A SPDY session for |key| must | 276 // neither receive nor send any data. A SPDY session for |key| must |
| 270 // not already exist. The session will be created but close in the | 277 // not already exist. The session will be created but close in the |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 | 537 |
| 531 GURL default_url_; | 538 GURL default_url_; |
| 532 | 539 |
| 533 // Track a FIFO list of the stream_id of all created requests by priority. | 540 // Track a FIFO list of the stream_id of all created requests by priority. |
| 534 std::map<int, std::vector<int>> priority_to_stream_id_list_; | 541 std::map<int, std::vector<int>> priority_to_stream_id_list_; |
| 535 }; | 542 }; |
| 536 | 543 |
| 537 } // namespace net | 544 } // namespace net |
| 538 | 545 |
| 539 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ | 546 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ |
| OLD | NEW |