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

Unified Diff: net/url_request/url_request_context_builder.cc

Issue 1356933002: make ProxyService::CreateSystemProxyConfigService return scoped_ptrs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: proper namespacing Created 5 years, 3 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/proxy_service_v8.cc ('k') | net/url_request/url_request_ftp_job_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « net/proxy/proxy_service_v8.cc ('k') | net/url_request/url_request_ftp_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698