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

Unified Diff: net/url_request/url_request_job_factory_impl_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
« no previous file with comments | « net/url_request/url_request_job_factory_impl.cc ('k') | net/url_request/url_request_simple_job_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_job_factory_impl_unittest.cc
diff --git a/net/url_request/url_request_job_factory_impl_unittest.cc b/net/url_request/url_request_job_factory_impl_unittest.cc
index e480755f9a1746bb9fae4be32b322f8d191f1056..adce41b311fee4f6379c0bf815ce7abc915486e1 100644
--- a/net/url_request/url_request_job_factory_impl_unittest.cc
+++ b/net/url_request/url_request_job_factory_impl_unittest.cc
@@ -79,7 +79,8 @@ TEST(URLRequestJobFactoryTest, BasicProtocolHandler) {
URLRequestJobFactoryImpl job_factory;
TestURLRequestContext request_context;
request_context.set_job_factory(&job_factory);
- job_factory.SetProtocolHandler("foo", new DummyProtocolHandler);
+ job_factory.SetProtocolHandler("foo",
+ make_scoped_ptr(new DummyProtocolHandler));
scoped_ptr<URLRequest> request(request_context.CreateRequest(
GURL("foo://bar"), DEFAULT_PRIORITY, &delegate));
request->Start();
@@ -93,8 +94,9 @@ TEST(URLRequestJobFactoryTest, DeleteProtocolHandler) {
URLRequestJobFactoryImpl job_factory;
TestURLRequestContext request_context;
request_context.set_job_factory(&job_factory);
- job_factory.SetProtocolHandler("foo", new DummyProtocolHandler);
- job_factory.SetProtocolHandler("foo", NULL);
+ job_factory.SetProtocolHandler("foo",
+ make_scoped_ptr(new DummyProtocolHandler));
+ job_factory.SetProtocolHandler("foo", nullptr);
}
} // namespace
« no previous file with comments | « net/url_request/url_request_job_factory_impl.cc ('k') | net/url_request/url_request_simple_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698