| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/shell_url_request_context_getter.h" | 5 #include "content/shell/browser/shell_url_request_context_getter.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/single_thread_task_runner.h" | |
| 10 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 11 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
| 12 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
| 13 #include "base/threading/sequenced_worker_pool.h" | 12 #include "base/threading/sequenced_worker_pool.h" |
| 14 #include "base/threading/worker_pool.h" | 13 #include "base/threading/worker_pool.h" |
| 15 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
| 16 #include "content/public/browser/cookie_store_factory.h" | 15 #include "content/public/browser/cookie_store_factory.h" |
| 17 #include "content/public/common/content_switches.h" | 16 #include "content/public/common/content_switches.h" |
| 18 #include "content/shell/browser/shell_network_delegate.h" | 17 #include "content/shell/browser/shell_network_delegate.h" |
| 19 #include "content/shell/common/shell_content_client.h" | 18 #include "content/shell/common/shell_content_client.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 86 |
| 88 ShellURLRequestContextGetter::~ShellURLRequestContextGetter() { | 87 ShellURLRequestContextGetter::~ShellURLRequestContextGetter() { |
| 89 } | 88 } |
| 90 | 89 |
| 91 net::NetworkDelegate* ShellURLRequestContextGetter::CreateNetworkDelegate() { | 90 net::NetworkDelegate* ShellURLRequestContextGetter::CreateNetworkDelegate() { |
| 92 return new ShellNetworkDelegate; | 91 return new ShellNetworkDelegate; |
| 93 } | 92 } |
| 94 | 93 |
| 95 net::ProxyConfigService* ShellURLRequestContextGetter::GetProxyConfigService() { | 94 net::ProxyConfigService* ShellURLRequestContextGetter::GetProxyConfigService() { |
| 96 return net::ProxyService::CreateSystemProxyConfigService( | 95 return net::ProxyService::CreateSystemProxyConfigService( |
| 97 io_loop_->task_runner(), file_loop_->task_runner()); | 96 io_loop_->message_loop_proxy(), file_loop_->message_loop_proxy()); |
| 98 } | 97 } |
| 99 | 98 |
| 100 net::ProxyService* ShellURLRequestContextGetter::GetProxyService() { | 99 net::ProxyService* ShellURLRequestContextGetter::GetProxyService() { |
| 101 // TODO(jam): use v8 if possible, look at chrome code. | 100 // TODO(jam): use v8 if possible, look at chrome code. |
| 102 return net::ProxyService::CreateUsingSystemProxyResolver( | 101 return net::ProxyService::CreateUsingSystemProxyResolver( |
| 103 proxy_config_service_.release(), 0, url_request_context_->net_log()); | 102 proxy_config_service_.release(), 0, url_request_context_->net_log()); |
| 104 } | 103 } |
| 105 | 104 |
| 106 net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() { | 105 net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() { |
| 107 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 106 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 scoped_refptr<base::SingleThreadTaskRunner> | 240 scoped_refptr<base::SingleThreadTaskRunner> |
| 242 ShellURLRequestContextGetter::GetNetworkTaskRunner() const { | 241 ShellURLRequestContextGetter::GetNetworkTaskRunner() const { |
| 243 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); | 242 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); |
| 244 } | 243 } |
| 245 | 244 |
| 246 net::HostResolver* ShellURLRequestContextGetter::host_resolver() { | 245 net::HostResolver* ShellURLRequestContextGetter::host_resolver() { |
| 247 return url_request_context_->host_resolver(); | 246 return url_request_context_->host_resolver(); |
| 248 } | 247 } |
| 249 | 248 |
| 250 } // namespace content | 249 } // namespace content |
| OLD | NEW |