Index: net/url_request/url_request_context_builder.cc |
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc |
index a13d585ccd57bdd3b85ba5b7a6e2dbe982555983..68c52719728272c3e07c5eee5f3497a23e314561 100644 |
--- a/net/url_request/url_request_context_builder.cc |
+++ b/net/url_request/url_request_context_builder.cc |
@@ -281,22 +281,22 @@ URLRequestContext* URLRequestContextBuilder::Build() { |
// TODO(willchan): Switch to using this code when |
// ProxyService::CreateSystemProxyConfigService()'s signature doesn't suck. |
#if defined(OS_LINUX) || defined(OS_ANDROID) |
- ProxyConfigService* proxy_config_service = proxy_config_service_.release(); |
+ scoped_ptr<ProxyConfigService> proxy_config_service( |
+ proxy_config_service_.release()); |
Randy Smith (Not in Mondays)
2015/08/24 21:58:19
I think that .Pass() would be more idiomatic here
|
#else |
- ProxyConfigService* proxy_config_service = NULL; |
+ scoped_ptr<ProxyConfigService> proxy_config_service; |
if (proxy_config_service_) { |
- proxy_config_service = proxy_config_service_.release(); |
+ proxy_config_service.reset(proxy_config_service_.release()); |
Randy Smith (Not in Mondays)
2015/08/24 21:58:19
Why not "proxy_config_service = proxy_config_servi
|
} else { |
proxy_config_service = ProxyService::CreateSystemProxyConfigService( |
base::ThreadTaskRunnerHandle::Get().get(), |
context->GetFileTaskRunner()); |
} |
#endif // defined(OS_LINUX) || defined(OS_ANDROID) |
- proxy_service_.reset( |
- ProxyService::CreateUsingSystemProxyResolver( |
- proxy_config_service, |
- 0, // This results in using the default value. |
- context->net_log())); |
+ proxy_service_.reset(ProxyService::CreateUsingSystemProxyResolver( |
+ proxy_config_service.Pass(), |
+ 0, // This results in using the default value. |
+ context->net_log())); |
} |
storage->set_proxy_service(proxy_service_.release()); |