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

Unified Diff: components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_resource_throttle_unittest.cc

Issue 1295523006: Using scoped_ptr for URLRequestJobFactoryImpl::SetProtocolHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing un-modified file Created 5 years, 4 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: components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_resource_throttle_unittest.cc
diff --git a/components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_resource_throttle_unittest.cc b/components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_resource_throttle_unittest.cc
index 7845c0582d83b1f3e73c77ce9e5c0e1a05682809..4ca477e29574262f45d3322590d24a0168fc7037 100644
--- a/components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_resource_throttle_unittest.cc
+++ b/components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_resource_throttle_unittest.cc
@@ -59,10 +59,8 @@ class DataReductionProxyDebugResourceThrottleTest : public testing::Test {
DataReductionProxyDebugResourceThrottleTest() : context_(true) {
context_.Init();
- // The |test_job_factory_| takes ownership of the interceptor.
- test_job_interceptor_ = new net::TestJobInterceptor();
- EXPECT_TRUE(test_job_factory_.SetProtocolHandler(url::kHttpScheme,
- test_job_interceptor_));
+ EXPECT_TRUE(test_job_factory_.SetProtocolHandler(
+ url::kHttpScheme, make_scoped_ptr(new net::TestJobInterceptor())));
context_.set_job_factory(&test_job_factory_);
@@ -108,8 +106,6 @@ class DataReductionProxyDebugResourceThrottleTest : public testing::Test {
base::MessageLoop message_loop_;
net::TestURLRequestContext context_;
net::TestDelegate delegate_;
- // |test_job_interceptor_| is owned by |test_job_factory_|.
- net::TestJobInterceptor* test_job_interceptor_;
net::URLRequestJobFactoryImpl test_job_factory_;
net::ProxyConfig proxy_config_;

Powered by Google App Engine
This is Rietveld 408576698