Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(747)

Side by Side Diff: net/spdy/spdy_test_util_common.cc

Issue 379293002: Add AssertNoURLRequests() to URLRequestContext subclass destructors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add to two omitted subclasses of subclasses of URLRequestContext. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/proxy/proxy_script_fetcher_impl_unittest.cc ('k') | net/url_request/url_request_context.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/proxy/proxy_script_fetcher_impl_unittest.cc ('k') | net/url_request/url_request_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698