 Chromium Code Reviews
 Chromium Code Reviews Issue 1356933002:
  make ProxyService::CreateSystemProxyConfigService return scoped_ptrs  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1356933002:
  make ProxyService::CreateSystemProxyConfigService return scoped_ptrs  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| 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..7d98ad883a5747da00163520fe89fef38e595070 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_.Pass(); | 
| #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 = proxy_config_service_.Pass(); | 
| } 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) | 
| 
mmenke
2015/09/21 21:34:51
Mind doing a small cleanup while you're here?  Thi
 
Charlie Harrison
2015/09/22 18:00:28
Done. much nicer.
 | 
| proxy_service_ = ProxyService::CreateUsingSystemProxyResolver( | 
| - proxy_config_service, | 
| + proxy_config_service.Pass(), | 
| 0, // This results in using the default value. | 
| context->net_log()); | 
| } |