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

Unified Diff: chrome/browser/net/proxy_service_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 | « no previous file | net/proxy/dhcp_proxy_script_fetcher_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/proxy_service_factory.cc
diff --git a/chrome/browser/net/proxy_service_factory.cc b/chrome/browser/net/proxy_service_factory.cc
index 7ec1ac30ffbabacfe337518d51228ac58ea12092..dce2eefb86f6349404d4a0d8cc02e16107b27771 100644
--- a/chrome/browser/net/proxy_service_factory.cc
+++ b/chrome/browser/net/proxy_service_factory.cc
@@ -152,10 +152,10 @@ net::ProxyService* ProxyServiceFactory::CreateProxyService(
#if defined(OS_IOS)
NOTREACHED();
#else
- net::DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher;
+ scoped_ptr<net::DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher;
#if defined(OS_CHROMEOS)
- dhcp_proxy_script_fetcher =
- new chromeos::DhcpProxyScriptFetcherChromeos(context);
+ dhcp_proxy_script_fetcher.reset(
+ new chromeos::DhcpProxyScriptFetcherChromeos(context));
#else
net::DhcpProxyScriptFetcherFactory dhcp_factory;
dhcp_proxy_script_fetcher = dhcp_factory.Create(context);
@@ -167,13 +167,13 @@ net::ProxyService* ProxyServiceFactory::CreateProxyService(
if (command_line.HasSwitch(switches::kV8PacMojoInProcess)) {
proxy_service = net::CreateProxyServiceUsingMojoInProcess(
proxy_config_service, new net::ProxyScriptFetcherImpl(context),
- dhcp_proxy_script_fetcher, context->host_resolver(), net_log,
+ dhcp_proxy_script_fetcher.Pass(), context->host_resolver(), net_log,
network_delegate);
} else if (EnableOutOfProcessV8Pac(command_line)) {
proxy_service = net::CreateProxyServiceUsingMojoFactory(
UtilityProcessMojoProxyResolverFactory::GetInstance(),
proxy_config_service, new net::ProxyScriptFetcherImpl(context),
- dhcp_proxy_script_fetcher, context->host_resolver(), net_log,
+ dhcp_proxy_script_fetcher.Pass(), context->host_resolver(), net_log,
network_delegate);
}
#endif // !defined(OS_ANDROID)
@@ -181,7 +181,7 @@ net::ProxyService* ProxyServiceFactory::CreateProxyService(
if (!proxy_service) {
proxy_service = net::CreateProxyServiceUsingV8ProxyResolver(
proxy_config_service, new net::ProxyScriptFetcherImpl(context),
- dhcp_proxy_script_fetcher, context->host_resolver(), net_log,
+ dhcp_proxy_script_fetcher.Pass(), context->host_resolver(), net_log,
network_delegate);
}
#endif // defined(OS_IOS)
« no previous file with comments | « no previous file | net/proxy/dhcp_proxy_script_fetcher_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698