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

Unified Diff: net/url_request/url_request_job_factory_impl.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: net/url_request/url_request_job_factory_impl.cc
diff --git a/net/url_request/url_request_job_factory_impl.cc b/net/url_request/url_request_job_factory_impl.cc
index 264a7a1b2d7c60d6b375298667d988b59132734b..b7024ad89623e2aff00e66443972955764b0ff62 100644
--- a/net/url_request/url_request_job_factory_impl.cc
+++ b/net/url_request/url_request_job_factory_impl.cc
@@ -26,7 +26,7 @@ URLRequestJobFactoryImpl::~URLRequestJobFactoryImpl() {
bool URLRequestJobFactoryImpl::SetProtocolHandler(
const std::string& scheme,
- ProtocolHandler* protocol_handler) {
+ scoped_ptr<ProtocolHandler> protocol_handler) {
DCHECK(CalledOnValidThread());
if (!protocol_handler) {
@@ -41,7 +41,7 @@ bool URLRequestJobFactoryImpl::SetProtocolHandler(
if (ContainsKey(protocol_handler_map_, scheme))
return false;
- protocol_handler_map_[scheme] = protocol_handler;
+ protocol_handler_map_[scheme] = protocol_handler.release();
return true;
}
« no previous file with comments | « net/url_request/url_request_job_factory_impl.h ('k') | net/url_request/url_request_job_factory_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698