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

Unified Diff: remoting/host/url_request_context.cc

Issue 10106013: Chromoting: stopping the service if the host ID is permanently not recognized by the could. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Exiting host cleanly + CR feedback. Created 8 years, 8 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: 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_;
}

Powered by Google App Engine
This is Rietveld 408576698