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

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: small ios fix 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
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..99da5a20d08cef691ea3bb7c2179bf393666af89 100644
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -296,11 +296,12 @@ scoped_ptr<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());
mmenke 2015/09/18 18:58:54 = *.Pass()
Charlie Harrison 2015/09/18 19:56:06 Done.
#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());
mmenke 2015/09/18 18:58:54 = *.Pass()
Charlie Harrison 2015/09/18 19:56:06 Done.
} else {
proxy_config_service = ProxyService::CreateSystemProxyConfigService(
base::ThreadTaskRunnerHandle::Get().get(),
@@ -308,7 +309,7 @@ scoped_ptr<URLRequestContext> URLRequestContextBuilder::Build() {
}
#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());
}

Powered by Google App Engine
This is Rietveld 408576698