OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "remoting/host/url_request_context.h" | 5 #include "remoting/host/url_request_context.h" |
6 | 6 |
7 #include "base/message_loop_proxy.h" | 7 #include "base/message_loop_proxy.h" |
8 #include "net/cert/cert_verifier.h" | 8 #include "net/cert/cert_verifier.h" |
9 #include "net/dns/host_resolver.h" | 9 #include "net/dns/host_resolver.h" |
10 #include "net/http/http_auth_handler_factory.h" | 10 #include "net/http/http_auth_handler_factory.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 return new ProxyConfigServiceDirect(); | 73 return new ProxyConfigServiceDirect(); |
74 #endif | 74 #endif |
75 } | 75 } |
76 | 76 |
77 } // namespace | 77 } // namespace |
78 | 78 |
79 // TODO(willchan): This is largely copied from service_url_request_context.cc, | 79 // TODO(willchan): This is largely copied from service_url_request_context.cc, |
80 // which is in turn copied from some test code. Move it somewhere reusable. | 80 // which is in turn copied from some test code. Move it somewhere reusable. |
81 URLRequestContext::URLRequestContext( | 81 URLRequestContext::URLRequestContext( |
82 scoped_ptr<net::ProxyConfigService> proxy_config_service) | 82 scoped_ptr<net::ProxyConfigService> proxy_config_service) |
83 : ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) { | 83 : storage_(this) { |
84 scoped_ptr<VlogNetLog> net_log(new VlogNetLog()); | 84 scoped_ptr<VlogNetLog> net_log(new VlogNetLog()); |
85 storage_.set_host_resolver( | 85 storage_.set_host_resolver( |
86 net::HostResolver::CreateDefaultResolver(net_log.get())); | 86 net::HostResolver::CreateDefaultResolver(net_log.get())); |
87 storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver( | 87 storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver( |
88 proxy_config_service.release(), 0u, net_log.get())); | 88 proxy_config_service.release(), 0u, net_log.get())); |
89 storage_.set_cert_verifier(net::CertVerifier::CreateDefault()); | 89 storage_.set_cert_verifier(net::CertVerifier::CreateDefault()); |
90 storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults); | 90 storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults); |
91 storage_.set_http_auth_handler_factory( | 91 storage_.set_http_auth_handler_factory( |
92 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); | 92 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); |
93 storage_.set_http_server_properties(new net::HttpServerPropertiesImpl); | 93 storage_.set_http_server_properties(new net::HttpServerPropertiesImpl); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 129 |
130 scoped_refptr<base::SingleThreadTaskRunner> | 130 scoped_refptr<base::SingleThreadTaskRunner> |
131 URLRequestContextGetter::GetNetworkTaskRunner() const { | 131 URLRequestContextGetter::GetNetworkTaskRunner() const { |
132 return network_task_runner_; | 132 return network_task_runner_; |
133 } | 133 } |
134 | 134 |
135 URLRequestContextGetter::~URLRequestContextGetter() { | 135 URLRequestContextGetter::~URLRequestContextGetter() { |
136 } | 136 } |
137 | 137 |
138 } // namespace remoting | 138 } // namespace remoting |
OLD | NEW |