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

Unified Diff: net/proxy/dhcp_proxy_script_fetcher_factory.cc

Issue 1273013004: Returning scoped_ptr<> instead of raw pointer in DhcpProxyScriptFetcherFactory::Create (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/proxy/dhcp_proxy_script_fetcher_factory.h ('k') | net/proxy/proxy_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ab89118b2cbf28327b1cbb2719256bfd59d6d49c 100644
--- a/net/proxy/dhcp_proxy_script_fetcher_factory.cc
+++ b/net/proxy/dhcp_proxy_script_fetcher_factory.cc
@@ -18,18 +18,18 @@ DhcpProxyScriptFetcherFactory::DhcpProxyScriptFetcherFactory()
set_enabled(true);
}
-DhcpProxyScriptFetcher* DhcpProxyScriptFetcherFactory::Create(
+scoped_ptr<DhcpProxyScriptFetcher> DhcpProxyScriptFetcherFactory::Create(
URLRequestContext* context) {
if (!feature_enabled_) {
- return new DoNothingDhcpProxyScriptFetcher();
+ return make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher());
} else {
DCHECK(IsSupported());
- DhcpProxyScriptFetcher* ret = NULL;
+ scoped_ptr<DhcpProxyScriptFetcher> ret;
#if defined(OS_WIN)
- ret = new DhcpProxyScriptFetcherWin(context);
+ ret.reset(new DhcpProxyScriptFetcherWin(context));
#endif
DCHECK(ret);
- return ret;
+ return ret.Pass();
}
}
« no previous file with comments | « net/proxy/dhcp_proxy_script_fetcher_factory.h ('k') | net/proxy/proxy_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698