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

Unified Diff: net/url_request/url_request_context_builder.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: non linux builds 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
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());

Powered by Google App Engine
This is Rietveld 408576698