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

Unified Diff: net/url_request/url_request_unittest.cc

Issue 13701: Use automatic memory management for URLRequestContext's members.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years 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_unittest.h ('k') | webkit/glue/plugins/mozilla_extensions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_unittest.cc
===================================================================
--- net/url_request/url_request_unittest.cc (revision 6881)
+++ net/url_request/url_request_unittest.cc (working copy)
@@ -29,7 +29,6 @@
#include "net/disk_cache/disk_cache.h"
#include "net/http/http_cache.h"
#include "net/http/http_network_layer.h"
-#include "net/proxy/proxy_resolver_null.h"
#include "net/proxy/proxy_service.h"
#include "net/url_request/url_request.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -42,16 +41,11 @@
class URLRequestHttpCacheContext : public URLRequestContext {
public:
URLRequestHttpCacheContext() {
- proxy_service_ = new net::ProxyService(new net::ProxyResolverNull);
- http_transaction_factory_ =
+ proxy_service_ = net::ProxyService::CreateNull();
+ http_transaction_factory_.reset(
new net::HttpCache(net::HttpNetworkLayer::CreateFactory(proxy_service_),
- disk_cache::CreateInMemoryCacheBackend(0));
+ disk_cache::CreateInMemoryCacheBackend(0)));
}
-
- virtual ~URLRequestHttpCacheContext() {
- delete http_transaction_factory_;
- delete proxy_service_;
- }
};
class TestURLRequest : public URLRequest {
« no previous file with comments | « net/url_request/url_request_unittest.h ('k') | webkit/glue/plugins/mozilla_extensions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698