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

Unified Diff: net/url_request/url_request_test_util.h

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/url_request/url_request_job_unittest.cc ('k') | net/url_request/url_request_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_test_util.h
diff --git a/net/url_request/url_request_test_util.h b/net/url_request/url_request_test_util.h
index 8c065cd5064f712be5b943ab1536a863922eae0c..e1f72bb7ce8434311c9ffdd440ac7030198d7d46 100644
--- a/net/url_request/url_request_test_util.h
+++ b/net/url_request/url_request_test_util.h
@@ -58,6 +58,7 @@ class TestURLRequestContext : public net::URLRequestContext {
explicit TestURLRequestContext(const std::string& proxy);
TestURLRequestContext(const std::string& proxy,
net::HostResolver* host_resolver);
+ virtual ~TestURLRequestContext();
// Configures the proxy server, must not be called after Init().
void SetProxyFromString(const std::string& proxy);
@@ -65,9 +66,6 @@ class TestURLRequestContext : public net::URLRequestContext {
void Init();
- protected:
- virtual ~TestURLRequestContext();
-
private:
bool initialized_;
net::URLRequestContextStorage context_storage_;
@@ -93,7 +91,7 @@ class TestURLRequestContextGetter : public net::URLRequestContextGetter {
private:
const scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_;
- scoped_refptr<TestURLRequestContext> context_;
+ scoped_ptr<TestURLRequestContext> context_;
};
//-----------------------------------------------------------------------------
@@ -102,6 +100,9 @@ class TestURLRequest : public net::URLRequest {
public:
TestURLRequest(const GURL& url, Delegate* delegate);
virtual ~TestURLRequest();
+
+ private:
+ const scoped_ptr<net::URLRequestContext> context_;
};
//-----------------------------------------------------------------------------
« no previous file with comments | « net/url_request/url_request_job_unittest.cc ('k') | net/url_request/url_request_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698