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

Unified Diff: net/spdy/spdy_network_transaction_spdy3_unittest.cc

Issue 10299002: Stop refcounting URLRequestContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initialize to NULL Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/spdy_network_transaction_spdy2_unittest.cc ('k') | net/spdy/spdy_test_util_spdy2.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_network_transaction_spdy3_unittest.cc
diff --git a/net/spdy/spdy_network_transaction_spdy3_unittest.cc b/net/spdy/spdy_network_transaction_spdy3_unittest.cc
index 8854d55beed8f84b22db09b380a28c12593cbde1..70a53cc6512c1f7ee9358469fdabdcd02c6ac2e9 100644
--- a/net/spdy/spdy_network_transaction_spdy3_unittest.cc
+++ b/net/spdy/spdy_network_transaction_spdy3_unittest.cc
@@ -2767,13 +2767,12 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, RedirectGetRequest) {
HttpStreamFactory::set_force_spdy_always(true);
TestDelegate d;
{
+ SpdyURLRequestContext spdy_url_request_context;
net::URLRequest r(GURL("http://www.google.com/"), &d);
- SpdyURLRequestContext* spdy_url_request_context =
- new SpdyURLRequestContext();
- r.set_context(spdy_url_request_context);
- spdy_url_request_context->socket_factory().
+ r.set_context(&spdy_url_request_context);
+ spdy_url_request_context.socket_factory().
AddSocketDataProvider(data.get());
- spdy_url_request_context->socket_factory().
+ spdy_url_request_context.socket_factory().
AddSocketDataProvider(data2.get());
d.set_quit_on_redirect(true);
@@ -3025,12 +3024,11 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, RedirectServerPush) {
HttpStreamFactory::set_force_spdy_always(true);
TestDelegate d;
TestDelegate d2;
- scoped_refptr<SpdyURLRequestContext> spdy_url_request_context(
- new SpdyURLRequestContext());
+ SpdyURLRequestContext spdy_url_request_context;
{
net::URLRequest r(GURL("http://www.google.com/"), &d);
- r.set_context(spdy_url_request_context);
- spdy_url_request_context->socket_factory().
+ r.set_context(&spdy_url_request_context);
+ spdy_url_request_context.socket_factory().
AddSocketDataProvider(data.get());
r.Start();
@@ -3041,8 +3039,8 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, RedirectServerPush) {
EXPECT_EQ(contents, d.data_received());
net::URLRequest r2(GURL("http://www.google.com/foo.dat"), &d2);
- r2.set_context(spdy_url_request_context);
- spdy_url_request_context->socket_factory().
+ r2.set_context(&spdy_url_request_context);
+ spdy_url_request_context.socket_factory().
AddSocketDataProvider(data2.get());
d2.set_quit_on_redirect(true);
« no previous file with comments | « net/spdy/spdy_network_transaction_spdy2_unittest.cc ('k') | net/spdy/spdy_test_util_spdy2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698