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

Unified Diff: net/websockets/websocket_job_spdy3_unittest.cc

Issue 10299002: Stop refcounting URLRequestContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More fixes Created 8 years, 8 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
Index: net/websockets/websocket_job_spdy3_unittest.cc
diff --git a/net/websockets/websocket_job_spdy3_unittest.cc b/net/websockets/websocket_job_spdy3_unittest.cc
index 9c908c8a601ad10be908d7ddcb36563a421e00fc..fe64ce256af98bf442de99496f9d601a89d2fd26 100644
--- a/net/websockets/websocket_job_spdy3_unittest.cc
+++ b/net/websockets/websocket_job_spdy3_unittest.cc
@@ -263,8 +263,6 @@ class MockURLRequestContext : public net::URLRequestContext {
transport_security_state_.EnableHost("upgrademe.com", state);
}
- protected:
- friend class base::RefCountedThreadSafe<MockURLRequestContext>;
virtual ~MockURLRequestContext() {}
private:
@@ -337,11 +335,11 @@ class WebSocketJobSpdy3Test : public PlatformTest {
SpdySession::set_default_protocol(kProtoSPDY3);
stream_type_ = STREAM_INVALID;
cookie_store_ = new MockCookieStore;
- context_ = new MockURLRequestContext(cookie_store_.get());
+ context_.reset(new MockURLRequestContext(cookie_store_.get()));
}
virtual void TearDown() {
cookie_store_ = NULL;
- context_ = NULL;
+ context_.reset();
websocket_ = NULL;
socket_ = NULL;
}
@@ -462,7 +460,6 @@ class WebSocketJobSpdy3Test : public PlatformTest {
StreamType stream_type_;
scoped_refptr<MockCookieStore> cookie_store_;
- scoped_refptr<MockURLRequestContext> context_;
scoped_refptr<WebSocketJob> websocket_;
scoped_refptr<SocketStream> socket_;
scoped_ptr<MockClientSocketFactory> socket_factory_;
@@ -472,6 +469,7 @@ class WebSocketJobSpdy3Test : public PlatformTest {
scoped_ptr<net::ProxyService> proxy_service_;
scoped_ptr<net::MockHostResolver> host_resolver_;
scoped_ptr<MockHttpTransactionFactory> http_factory_;
+ scoped_ptr<MockURLRequestContext> context_;
static const char kHandshakeRequestWithoutCookie[];
static const char kHandshakeRequestWithCookie[];

Powered by Google App Engine
This is Rietveld 408576698