OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/service/net/service_url_request_context.h" | 5 #include "chrome/service/net/service_url_request_context.h" |
6 | 6 |
7 #include "base/message_loop_proxy.h" | 7 #include "base/message_loop_proxy.h" |
8 #include "chrome/service/service_process.h" | 8 #include "chrome/service/service_process.h" |
9 #include "net/base/cookie_monster.h" | 9 #include "net/base/cookie_monster.h" |
10 #include "net/base/cookie_policy.h" | 10 #include "net/base/cookie_policy.h" |
11 #include "net/base/dnsrr_resolver.h" | 11 #include "net/base/dnsrr_resolver.h" |
12 #include "net/base/host_resolver.h" | 12 #include "net/base/host_resolver.h" |
13 #include "net/base/ssl_config_service_defaults.h" | 13 #include "net/base/ssl_config_service_defaults.h" |
14 #include "net/ftp/ftp_network_layer.h" | 14 #include "net/ftp/ftp_network_layer.h" |
15 #include "net/http/http_auth_handler_factory.h" | 15 #include "net/http/http_auth_handler_factory.h" |
16 #include "net/http/http_cache.h" | 16 #include "net/http/http_cache.h" |
17 #include "net/http/http_network_layer.h" | 17 #include "net/http/http_network_layer.h" |
18 #include "net/proxy/proxy_service.h" | 18 #include "net/proxy/proxy_service.h" |
19 | 19 |
20 ServiceURLRequestContext::ServiceURLRequestContext() { | 20 ServiceURLRequestContext::ServiceURLRequestContext() { |
21 host_resolver_ = | 21 host_resolver_ = |
22 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, | 22 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, |
23 NULL, NULL); | 23 NULL); |
24 DCHECK(g_service_process); | 24 DCHECK(g_service_process); |
25 // TODO(sanjeevr): Change CreateSystemProxyConfigService to accept a | 25 // TODO(sanjeevr): Change CreateSystemProxyConfigService to accept a |
26 // MessageLoopProxy* instead of MessageLoop*. | 26 // MessageLoopProxy* instead of MessageLoop*. |
27 // Also this needs to be created on the UI thread on Linux. Fix this. | 27 // Also this needs to be created on the UI thread on Linux. Fix this. |
28 net::ProxyConfigService * proxy_config_service = | 28 net::ProxyConfigService * proxy_config_service = |
29 net::ProxyService::CreateSystemProxyConfigService( | 29 net::ProxyService::CreateSystemProxyConfigService( |
30 g_service_process->io_thread()->message_loop(), | 30 g_service_process->io_thread()->message_loop(), |
31 g_service_process->file_thread()->message_loop()); | 31 g_service_process->file_thread()->message_loop()); |
32 proxy_service_ = net::ProxyService::CreateUsingSystemProxyResolver( | 32 proxy_service_ = net::ProxyService::CreateUsingSystemProxyResolver( |
33 proxy_config_service, 0u, NULL); | 33 proxy_config_service, 0u, NULL); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 url_request_context_ = new ServiceURLRequestContext(); | 70 url_request_context_ = new ServiceURLRequestContext(); |
71 return url_request_context_; | 71 return url_request_context_; |
72 } | 72 } |
73 | 73 |
74 scoped_refptr<base::MessageLoopProxy> | 74 scoped_refptr<base::MessageLoopProxy> |
75 ServiceURLRequestContextGetter::GetIOMessageLoopProxy() const { | 75 ServiceURLRequestContextGetter::GetIOMessageLoopProxy() const { |
76 return io_message_loop_proxy_; | 76 return io_message_loop_proxy_; |
77 } | 77 } |
78 | 78 |
79 ServiceURLRequestContextGetter::~ServiceURLRequestContextGetter() {} | 79 ServiceURLRequestContextGetter::~ServiceURLRequestContextGetter() {} |
OLD | NEW |