diff options
author | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-13 03:44:24 +0000 |
---|---|---|
committer | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-13 03:44:24 +0000 |
commit | d49801990067e7fe9a3caf141f31c6e6ba58fcfc (patch) | |
tree | 502fef7a064f7e1b67291d418b897117e2427822 /net/url_request/url_request_unittest.h | |
parent | 96508147cf0947fdd4ae19d9ee7f5f2e13268a5f (diff) | |
download | chromium_src-d49801990067e7fe9a3caf141f31c6e6ba58fcfc.zip chromium_src-d49801990067e7fe9a3caf141f31c6e6ba58fcfc.tar.gz chromium_src-d49801990067e7fe9a3caf141f31c6e6ba58fcfc.tar.bz2 |
Use automatic memory management for URLRequestContext's members.
Also make ProxyService refcounted so the sharing between profiles is explicit.
Review URL: http://codereview.chromium.org/13701
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6966 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/url_request_unittest.h')
-rw-r--r-- | net/url_request/url_request_unittest.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/net/url_request/url_request_unittest.h b/net/url_request/url_request_unittest.h index e2b8ca3..58b3f606d 100644 --- a/net/url_request/url_request_unittest.h +++ b/net/url_request/url_request_unittest.h @@ -23,7 +23,6 @@ #include "net/base/net_errors.h" #include "net/http/http_network_layer.h" #include "net/url_request/url_request.h" -#include "net/proxy/proxy_resolver_null.h" #include "net/proxy/proxy_service.h" #include "testing/gtest/include/gtest/gtest.h" #include "googleurl/src/url_util.h" @@ -35,14 +34,9 @@ const std::string kDefaultHostName("localhost"); class TestURLRequestContext : public URLRequestContext { public: TestURLRequestContext() { - proxy_service_ = new net::ProxyService(new net::ProxyResolverNull); - http_transaction_factory_ = - net::HttpNetworkLayer::CreateFactory(proxy_service_); - } - - virtual ~TestURLRequestContext() { - delete http_transaction_factory_; - delete proxy_service_; + proxy_service_ = net::ProxyService::CreateNull(); + http_transaction_factory_.reset( + net::HttpNetworkLayer::CreateFactory(proxy_service_)); } }; |