Index: net/proxy/dhcp_proxy_script_fetcher_factory.cc |
diff --git a/net/proxy/dhcp_proxy_script_fetcher_factory.cc b/net/proxy/dhcp_proxy_script_fetcher_factory.cc |
index 01ede05b0934b78db1968915e4233b796898a462..43d037684418c6dc31b1d26d7f272a14c562732b 100644 |
--- a/net/proxy/dhcp_proxy_script_fetcher_factory.cc |
+++ b/net/proxy/dhcp_proxy_script_fetcher_factory.cc |
@@ -18,18 +18,19 @@ DhcpProxyScriptFetcherFactory::DhcpProxyScriptFetcherFactory() |
set_enabled(true); |
} |
-DhcpProxyScriptFetcher* DhcpProxyScriptFetcherFactory::Create( |
+scoped_ptr<DhcpProxyScriptFetcher> DhcpProxyScriptFetcherFactory::Create( |
URLRequestContext* context) { |
if (!feature_enabled_) { |
- return new DoNothingDhcpProxyScriptFetcher(); |
+ return scoped_ptr<DhcpProxyScriptFetcher>( |
eroman
2015/08/21 20:03:12
I suggest using "make_scoped_ptr(new DoNothingDhcp
|
+ new DoNothingDhcpProxyScriptFetcher()); |
} else { |
DCHECK(IsSupported()); |
- DhcpProxyScriptFetcher* ret = NULL; |
+ scoped_ptr<DhcpProxyScriptFetcher> ret(nullptr); |
eroman
2015/08/21 20:03:12
remove "nullptr". It certainly isn't wrong, howeve
|
#if defined(OS_WIN) |
- ret = new DhcpProxyScriptFetcherWin(context); |
+ ret.reset(new DhcpProxyScriptFetcherWin(context)); |
#endif |
DCHECK(ret); |
- return ret; |
+ return ret.Pass(); |
} |
} |