| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // TODO(port): rename "linux" to some nonspecific unix. | 51 // TODO(port): rename "linux" to some nonspecific unix. |
| 52 scoped_ptr<net::ProxyConfigService> proxy_config_service( | 52 scoped_ptr<net::ProxyConfigService> proxy_config_service( |
| 53 new net::ProxyConfigServiceFixed(net::ProxyConfig())); | 53 new net::ProxyConfigServiceFixed(net::ProxyConfig())); |
| 54 #else | 54 #else |
| 55 // Use the system proxy settings. | 55 // Use the system proxy settings. |
| 56 scoped_ptr<net::ProxyConfigService> proxy_config_service( | 56 scoped_ptr<net::ProxyConfigService> proxy_config_service( |
| 57 net::ProxyService::CreateSystemProxyConfigService(NULL, NULL)); | 57 net::ProxyService::CreateSystemProxyConfigService(NULL, NULL)); |
| 58 #endif | 58 #endif |
| 59 host_resolver_ = net::CreateSystemHostResolver(NULL); | 59 host_resolver_ = net::CreateSystemHostResolver(NULL); |
| 60 proxy_service_ = net::ProxyService::Create(proxy_config_service.release(), | 60 proxy_service_ = net::ProxyService::Create(proxy_config_service.release(), |
| 61 false, NULL, NULL, NULL); | 61 false, NULL, NULL, NULL, NULL); |
| 62 ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService(); | 62 ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService(); |
| 63 | 63 |
| 64 http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault(); | 64 http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault(); |
| 65 | 65 |
| 66 net::HttpCache *cache; | 66 net::HttpCache *cache; |
| 67 if (cache_path.empty()) { | 67 if (cache_path.empty()) { |
| 68 cache = new net::HttpCache(NULL, host_resolver_, proxy_service_, | 68 cache = new net::HttpCache(NULL, host_resolver_, proxy_service_, |
| 69 ssl_config_service_, http_auth_handler_factory_, | 69 ssl_config_service_, http_auth_handler_factory_, |
| 70 0); | 70 0); |
| 71 } else { | 71 } else { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 83 delete ftp_transaction_factory_; | 83 delete ftp_transaction_factory_; |
| 84 delete http_transaction_factory_; | 84 delete http_transaction_factory_; |
| 85 delete http_auth_handler_factory_; | 85 delete http_auth_handler_factory_; |
| 86 delete static_cast<net::StaticCookiePolicy*>(cookie_policy_); | 86 delete static_cast<net::StaticCookiePolicy*>(cookie_policy_); |
| 87 } | 87 } |
| 88 | 88 |
| 89 const std::string& TestShellRequestContext::GetUserAgent( | 89 const std::string& TestShellRequestContext::GetUserAgent( |
| 90 const GURL& url) const { | 90 const GURL& url) const { |
| 91 return webkit_glue::GetUserAgent(url); | 91 return webkit_glue::GetUserAgent(url); |
| 92 } | 92 } |
| OLD | NEW |