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 177bea7d0cce3aaa2595618c980e2fdf505e4924..233c047b2343429553e50a409cff21985afaf431 100644 |
--- a/net/url_request/url_request_context_builder.cc |
+++ b/net/url_request/url_request_context_builder.cc |
@@ -295,20 +295,15 @@ scoped_ptr<URLRequestContext> URLRequestContextBuilder::Build() { |
if (!proxy_service_) { |
// 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(); |
- #else |
- ProxyConfigService* proxy_config_service = NULL; |
- if (proxy_config_service_) { |
- proxy_config_service = proxy_config_service_.release(); |
- } else { |
- proxy_config_service = ProxyService::CreateSystemProxyConfigService( |
+#if !defined(OS_LINUX) && !defined(OS_ANDROID) |
+ if (!proxy_config_service_) { |
+ proxy_config_service_ = ProxyService::CreateSystemProxyConfigService( |
base::ThreadTaskRunnerHandle::Get().get(), |
context->GetFileTaskRunner()); |
} |
- #endif // defined(OS_LINUX) || defined(OS_ANDROID) |
+#endif // !defined(OS_LINUX) && !defined(OS_ANDROID) |
proxy_service_ = ProxyService::CreateUsingSystemProxyResolver( |
- proxy_config_service, |
+ proxy_config_service_.Pass(), |
0, // This results in using the default value. |
context->net_log()); |
} |