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

Unified Diff: net/url_request/url_request_unittest.h

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_context.cc ('k') | net/url_request/url_request_unittest.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.h
===================================================================
--- net/url_request/url_request_unittest.h (revision 6881)
+++ net/url_request/url_request_unittest.h (working copy)
@@ -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,15 +34,10 @@
class TestURLRequestContext : public URLRequestContext {
public:
TestURLRequestContext() {
- proxy_service_ = new net::ProxyService(new net::ProxyResolverNull);
- http_transaction_factory_ =
- net::HttpNetworkLayer::CreateFactory(proxy_service_);
+ proxy_service_ = net::ProxyService::CreateNull();
+ http_transaction_factory_.reset(
+ net::HttpNetworkLayer::CreateFactory(proxy_service_));
}
-
- virtual ~TestURLRequestContext() {
- delete http_transaction_factory_;
- delete proxy_service_;
- }
};
class TestDelegate : public URLRequest::Delegate {
« no previous file with comments | « net/url_request/url_request_context.cc ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698