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 "content/shell/shell_url_request_context_getter.h" | 5 #include "content/shell/shell_url_request_context_getter.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/string_split.h" | 8 #include "base/string_split.h" |
9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
10 #include "net/base/cert_verifier.h" | 10 #include "net/base/cert_verifier.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 storage_->set_cookie_store(new net::CookieMonster(NULL, NULL)); | 54 storage_->set_cookie_store(new net::CookieMonster(NULL, NULL)); |
55 storage_->set_server_bound_cert_service(new net::ServerBoundCertService( | 55 storage_->set_server_bound_cert_service(new net::ServerBoundCertService( |
56 new net::DefaultServerBoundCertStore(NULL))); | 56 new net::DefaultServerBoundCertStore(NULL))); |
57 url_request_context_->set_accept_language("en-us,en"); | 57 url_request_context_->set_accept_language("en-us,en"); |
58 url_request_context_->set_accept_charset("iso-8859-1,*,utf-8"); | 58 url_request_context_->set_accept_charset("iso-8859-1,*,utf-8"); |
59 | 59 |
60 storage_->set_host_resolver( | 60 storage_->set_host_resolver( |
61 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, | 61 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, |
62 net::HostResolver::kDefaultRetryAttempts, | 62 net::HostResolver::kDefaultRetryAttempts, |
63 NULL)); | 63 NULL)); |
64 storage_->set_cert_verifier(new net::CertVerifier); | 64 storage_->set_cert_verifier(net::CertVerifier::CreateDefault()); |
65 // TODO(jam): use v8 if possible, look at chrome code. | 65 // TODO(jam): use v8 if possible, look at chrome code. |
66 storage_->set_proxy_service( | 66 storage_->set_proxy_service( |
67 net::ProxyService::CreateUsingSystemProxyResolver( | 67 net::ProxyService::CreateUsingSystemProxyResolver( |
68 proxy_config_service_.release(), | 68 proxy_config_service_.release(), |
69 0, | 69 0, |
70 NULL)); | 70 NULL)); |
71 storage_->set_ssl_config_service(new net::SSLConfigServiceDefaults); | 71 storage_->set_ssl_config_service(new net::SSLConfigServiceDefaults); |
72 storage_->set_http_auth_handler_factory( | 72 storage_->set_http_auth_handler_factory( |
73 net::HttpAuthHandlerFactory::CreateDefault( | 73 net::HttpAuthHandlerFactory::CreateDefault( |
74 url_request_context_->host_resolver())); | 74 url_request_context_->host_resolver())); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 scoped_refptr<base::MessageLoopProxy> | 114 scoped_refptr<base::MessageLoopProxy> |
115 ShellURLRequestContextGetter::GetIOMessageLoopProxy() const { | 115 ShellURLRequestContextGetter::GetIOMessageLoopProxy() const { |
116 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); | 116 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); |
117 } | 117 } |
118 | 118 |
119 net::HostResolver* ShellURLRequestContextGetter::host_resolver() { | 119 net::HostResolver* ShellURLRequestContextGetter::host_resolver() { |
120 return url_request_context_->host_resolver(); | 120 return url_request_context_->host_resolver(); |
121 } | 121 } |
122 | 122 |
123 } // namespace content | 123 } // namespace content |
OLD | NEW |