| 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 "webkit/tools/test_shell/test_shell_request_context.h" | 5 #include "webkit/tools/test_shell/test_shell_request_context.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "net/base/cookie_monster.h" | 10 #include "net/base/cookie_monster.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // non-functional on linux in this context because of v8 threading | 50 // non-functional on linux in this context because of v8 threading |
| 51 // issues. | 51 // issues. |
| 52 // TODO(port): rename "linux" to some nonspecific unix. | 52 // TODO(port): rename "linux" to some nonspecific unix. |
| 53 scoped_ptr<net::ProxyConfigService> proxy_config_service( | 53 scoped_ptr<net::ProxyConfigService> proxy_config_service( |
| 54 new net::ProxyConfigServiceFixed(net::ProxyConfig())); | 54 new net::ProxyConfigServiceFixed(net::ProxyConfig())); |
| 55 #else | 55 #else |
| 56 // Use the system proxy settings. | 56 // Use the system proxy settings. |
| 57 scoped_ptr<net::ProxyConfigService> proxy_config_service( | 57 scoped_ptr<net::ProxyConfigService> proxy_config_service( |
| 58 net::ProxyService::CreateSystemProxyConfigService(NULL, NULL)); | 58 net::ProxyService::CreateSystemProxyConfigService(NULL, NULL)); |
| 59 #endif | 59 #endif |
| 60 host_resolver_ = net::CreateSystemHostResolver(); | 60 host_resolver_ = |
| 61 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism); |
| 61 proxy_service_ = net::ProxyService::Create(proxy_config_service.release(), | 62 proxy_service_ = net::ProxyService::Create(proxy_config_service.release(), |
| 62 false, 0, NULL, NULL, NULL); | 63 false, 0, NULL, NULL, NULL); |
| 63 ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService(); | 64 ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService(); |
| 64 | 65 |
| 65 http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault(); | 66 http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault(); |
| 66 | 67 |
| 67 net::HttpCache::DefaultBackend* backend = new net::HttpCache::DefaultBackend( | 68 net::HttpCache::DefaultBackend* backend = new net::HttpCache::DefaultBackend( |
| 68 cache_path.empty() ? net::MEMORY_CACHE : net::DISK_CACHE, | 69 cache_path.empty() ? net::MEMORY_CACHE : net::DISK_CACHE, |
| 69 cache_path, 0, SimpleResourceLoaderBridge::GetCacheThread()); | 70 cache_path, 0, SimpleResourceLoaderBridge::GetCacheThread()); |
| 70 | 71 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 82 delete ftp_transaction_factory_; | 83 delete ftp_transaction_factory_; |
| 83 delete http_transaction_factory_; | 84 delete http_transaction_factory_; |
| 84 delete http_auth_handler_factory_; | 85 delete http_auth_handler_factory_; |
| 85 delete static_cast<net::StaticCookiePolicy*>(cookie_policy_); | 86 delete static_cast<net::StaticCookiePolicy*>(cookie_policy_); |
| 86 } | 87 } |
| 87 | 88 |
| 88 const std::string& TestShellRequestContext::GetUserAgent( | 89 const std::string& TestShellRequestContext::GetUserAgent( |
| 89 const GURL& url) const { | 90 const GURL& url) const { |
| 90 return webkit_glue::GetUserAgent(url); | 91 return webkit_glue::GetUserAgent(url); |
| 91 } | 92 } |
| OLD | NEW |