| 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 #include "net/spdy/spdy_test_util_common.h" | 5 #include "net/spdy/spdy_test_util_common.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 params.http_server_properties = http_server_properties(); | 494 params.http_server_properties = http_server_properties(); |
| 495 scoped_refptr<HttpNetworkSession> network_session( | 495 scoped_refptr<HttpNetworkSession> network_session( |
| 496 new HttpNetworkSession(params)); | 496 new HttpNetworkSession(params)); |
| 497 SpdySessionPoolPeer pool_peer(network_session->spdy_session_pool()); | 497 SpdySessionPoolPeer pool_peer(network_session->spdy_session_pool()); |
| 498 pool_peer.SetEnableSendingInitialData(false); | 498 pool_peer.SetEnableSendingInitialData(false); |
| 499 storage_.set_http_transaction_factory(new HttpCache( | 499 storage_.set_http_transaction_factory(new HttpCache( |
| 500 network_session.get(), HttpCache::DefaultBackend::InMemory(0))); | 500 network_session.get(), HttpCache::DefaultBackend::InMemory(0))); |
| 501 } | 501 } |
| 502 | 502 |
| 503 SpdyURLRequestContext::~SpdyURLRequestContext() { | 503 SpdyURLRequestContext::~SpdyURLRequestContext() { |
| 504 AssertNoURLRequests(); |
| 504 } | 505 } |
| 505 | 506 |
| 506 bool HasSpdySession(SpdySessionPool* pool, const SpdySessionKey& key) { | 507 bool HasSpdySession(SpdySessionPool* pool, const SpdySessionKey& key) { |
| 507 return pool->FindAvailableSession(key, BoundNetLog()) != NULL; | 508 return pool->FindAvailableSession(key, BoundNetLog()) != NULL; |
| 508 } | 509 } |
| 509 | 510 |
| 510 namespace { | 511 namespace { |
| 511 | 512 |
| 512 base::WeakPtr<SpdySession> CreateSpdySessionHelper( | 513 base::WeakPtr<SpdySession> CreateSpdySessionHelper( |
| 513 const scoped_refptr<HttpNetworkSession>& http_session, | 514 const scoped_refptr<HttpNetworkSession>& http_session, |
| (...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1310 } | 1311 } |
| 1311 } | 1312 } |
| 1312 | 1313 |
| 1313 void SpdyTestUtil::SetPriority(RequestPriority priority, | 1314 void SpdyTestUtil::SetPriority(RequestPriority priority, |
| 1314 SpdySynStreamIR* ir) const { | 1315 SpdySynStreamIR* ir) const { |
| 1315 ir->set_priority(ConvertRequestPriorityToSpdyPriority( | 1316 ir->set_priority(ConvertRequestPriorityToSpdyPriority( |
| 1316 priority, spdy_version())); | 1317 priority, spdy_version())); |
| 1317 } | 1318 } |
| 1318 | 1319 |
| 1319 } // namespace net | 1320 } // namespace net |
| OLD | NEW |