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

Unified Diff: chrome/browser/net/proxy_service_factory.cc

Issue 1301333002: make ProxyService::CreateSystemProxyConfigService return scoped_ptrs NOT FOR REVIEW (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: try merging again... 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 | « chrome/browser/net/proxy_service_factory.h ('k') | chrome/browser/profiles/profile_io_data.cc » ('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 1482f0feccac8a80ef042497029b0659e151f9ee..8900dc44b33f093adc9bdf5a13d10ea2d04fac12 100644
--- a/chrome/browser/net/proxy_service_factory.cc
+++ b/chrome/browser/net/proxy_service_factory.cc
@@ -77,7 +77,7 @@ net::ProxyConfigService* ProxyServiceFactory::CreateProxyConfigService(
// TODO(port): the IO and FILE message loops are only used by Linux. Can
// that code be moved to chrome/browser instead of being in net, so that it
// can use BrowserThread instead of raw MessageLoop pointers? See bug 25354.
- base_service.reset(net::ProxyService::CreateSystemProxyConfigService(
+ base_service = (net::ProxyService::CreateSystemProxyConfigService(
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)));
#endif // !defined(OS_CHROMEOS)
@@ -114,7 +114,7 @@ scoped_ptr<net::ProxyService> ProxyServiceFactory::CreateProxyService(
net::NetLog* net_log,
net::URLRequestContext* context,
net::NetworkDelegate* network_delegate,
- net::ProxyConfigService* proxy_config_service,
+ scoped_ptr<net::ProxyConfigService> proxy_config_service,
const base::CommandLine& command_line,
bool quick_check_enabled) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -166,13 +166,13 @@ scoped_ptr<net::ProxyService> ProxyServiceFactory::CreateProxyService(
// should override other options.
if (command_line.HasSwitch(switches::kV8PacMojoInProcess)) {
proxy_service = net::CreateProxyServiceUsingMojoInProcess(
- proxy_config_service, new net::ProxyScriptFetcherImpl(context),
+ proxy_config_service.Pass(), new net::ProxyScriptFetcherImpl(context),
dhcp_proxy_script_fetcher, 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),
+ proxy_config_service.Pass(), new net::ProxyScriptFetcherImpl(context),
dhcp_proxy_script_fetcher, context->host_resolver(), net_log,
network_delegate);
}
@@ -180,16 +180,14 @@ scoped_ptr<net::ProxyService> ProxyServiceFactory::CreateProxyService(
if (!proxy_service) {
proxy_service = net::CreateProxyServiceUsingV8ProxyResolver(
- proxy_config_service, new net::ProxyScriptFetcherImpl(context),
+ proxy_config_service.Pass(), new net::ProxyScriptFetcherImpl(context),
dhcp_proxy_script_fetcher, context->host_resolver(), net_log,
network_delegate);
}
#endif // defined(OS_IOS)
} else {
proxy_service = net::ProxyService::CreateUsingSystemProxyResolver(
- proxy_config_service,
- num_pac_threads,
- net_log);
+ proxy_config_service.Pass(), num_pac_threads, net_log);
}
proxy_service->set_quick_check_enabled(quick_check_enabled);
« no previous file with comments | « chrome/browser/net/proxy_service_factory.h ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698