Chromium Code Reviews| Index: remoting/host/url_request_context.cc |
| diff --git a/remoting/host/url_request_context.cc b/remoting/host/url_request_context.cc |
| index 39c4974ef0176a00097980c5f9f47182780cb40e..85e94f7727305092674a112e8c4b0779d27fcdce 100644 |
| --- a/remoting/host/url_request_context.cc |
| +++ b/remoting/host/url_request_context.cc |
| @@ -20,14 +20,14 @@ namespace remoting { |
| // TODO(willchan): This is largely copied from service_url_request_context.cc, |
| // which is in turn copied from some test code. Move it somewhere reusable. |
| URLRequestContext::URLRequestContext( |
| - net::ProxyConfigService* proxy_config_service) |
| + scoped_ptr<net::ProxyConfigService> proxy_config_service) |
| : ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) { |
| storage_.set_host_resolver( |
| net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, |
| net::HostResolver::kDefaultRetryAttempts, |
| NULL)); |
| storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver( |
| - proxy_config_service, 0u, NULL)); |
| + proxy_config_service.release(), 0u, NULL)); |
| storage_.set_cert_verifier(net::CertVerifier::CreateDefault()); |
| storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults); |
| storage_.set_http_auth_handler_factory( |
| @@ -62,7 +62,7 @@ URLRequestContextGetter::URLRequestContextGetter( |
| net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() { |
| if (!url_request_context_) |
| url_request_context_ = |
| - new URLRequestContext(proxy_config_service_.get()); |
| + new URLRequestContext(proxy_config_service_.Pass()); |
|
Sergey Ulanov
2012/04/17 18:56:12
What if this method is called more than once? Shou
alexeypa (please no reviews)
2012/04/17 19:20:32
The same copy of url_request_context_ is returned
|
| return url_request_context_; |
| } |