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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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( | 58 net::ProxyService::CreateSystemProxyConfigService( |
59 MessageLoop::current(), NULL)); | 59 MessageLoop::current(), NULL)); |
60 #endif | 60 #endif |
61 host_resolver_ = | 61 host_resolver_ = |
62 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism); | 62 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, |
| 63 NULL); |
63 proxy_service_ = net::ProxyService::Create(proxy_config_service.release(), | 64 proxy_service_ = net::ProxyService::Create(proxy_config_service.release(), |
64 false, 0, NULL, NULL, NULL); | 65 false, 0, NULL, NULL, NULL); |
65 ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService(); | 66 ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService(); |
66 | 67 |
67 http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault(); | 68 http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault(); |
68 | 69 |
69 net::HttpCache::DefaultBackend* backend = new net::HttpCache::DefaultBackend( | 70 net::HttpCache::DefaultBackend* backend = new net::HttpCache::DefaultBackend( |
70 cache_path.empty() ? net::MEMORY_CACHE : net::DISK_CACHE, | 71 cache_path.empty() ? net::MEMORY_CACHE : net::DISK_CACHE, |
71 cache_path, 0, SimpleResourceLoaderBridge::GetCacheThread()); | 72 cache_path, 0, SimpleResourceLoaderBridge::GetCacheThread()); |
72 | 73 |
(...skipping 11 matching lines...) Expand all Loading... |
84 delete ftp_transaction_factory_; | 85 delete ftp_transaction_factory_; |
85 delete http_transaction_factory_; | 86 delete http_transaction_factory_; |
86 delete http_auth_handler_factory_; | 87 delete http_auth_handler_factory_; |
87 delete static_cast<net::StaticCookiePolicy*>(cookie_policy_); | 88 delete static_cast<net::StaticCookiePolicy*>(cookie_policy_); |
88 } | 89 } |
89 | 90 |
90 const std::string& TestShellRequestContext::GetUserAgent( | 91 const std::string& TestShellRequestContext::GetUserAgent( |
91 const GURL& url) const { | 92 const GURL& url) const { |
92 return webkit_glue::GetUserAgent(url); | 93 return webkit_glue::GetUserAgent(url); |
93 } | 94 } |
OLD | NEW |