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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 scoped_ptr<net::ProxyConfigService> proxy_config_service( | 54 scoped_ptr<net::ProxyConfigService> proxy_config_service( |
55 new net::ProxyConfigServiceFixed(net::ProxyConfig())); | 55 new net::ProxyConfigServiceFixed(net::ProxyConfig())); |
56 #else | 56 #else |
57 // Use the system proxy settings. | 57 // Use the system proxy settings. |
58 scoped_ptr<net::ProxyConfigService> proxy_config_service( | 58 scoped_ptr<net::ProxyConfigService> proxy_config_service( |
59 net::ProxyService::CreateSystemProxyConfigService( | 59 net::ProxyService::CreateSystemProxyConfigService( |
60 MessageLoop::current(), NULL)); | 60 MessageLoop::current(), NULL)); |
61 #endif | 61 #endif |
62 host_resolver_ = | 62 host_resolver_ = |
63 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, | 63 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, |
64 NULL); | 64 NULL, NULL); |
65 proxy_service_ = net::ProxyService::CreateUsingSystemProxyResolver( | 65 proxy_service_ = net::ProxyService::CreateUsingSystemProxyResolver( |
66 proxy_config_service.release(), 0, NULL); | 66 proxy_config_service.release(), 0, NULL); |
67 ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService(); | 67 ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService(); |
68 | 68 |
69 http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault( | 69 http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault( |
70 host_resolver_); | 70 host_resolver_); |
71 | 71 |
72 net::HttpCache::DefaultBackend* backend = new net::HttpCache::DefaultBackend( | 72 net::HttpCache::DefaultBackend* backend = new net::HttpCache::DefaultBackend( |
73 cache_path.empty() ? net::MEMORY_CACHE : net::DISK_CACHE, | 73 cache_path.empty() ? net::MEMORY_CACHE : net::DISK_CACHE, |
74 cache_path, 0, SimpleResourceLoaderBridge::GetCacheThread()); | 74 cache_path, 0, SimpleResourceLoaderBridge::GetCacheThread()); |
(...skipping 16 matching lines...) Expand all Loading... |
91 delete http_transaction_factory_; | 91 delete http_transaction_factory_; |
92 delete http_auth_handler_factory_; | 92 delete http_auth_handler_factory_; |
93 delete static_cast<net::StaticCookiePolicy*>(cookie_policy_); | 93 delete static_cast<net::StaticCookiePolicy*>(cookie_policy_); |
94 delete host_resolver_; | 94 delete host_resolver_; |
95 } | 95 } |
96 | 96 |
97 const std::string& TestShellRequestContext::GetUserAgent( | 97 const std::string& TestShellRequestContext::GetUserAgent( |
98 const GURL& url) const { | 98 const GURL& url) const { |
99 return webkit_glue::GetUserAgent(url); | 99 return webkit_glue::GetUserAgent(url); |
100 } | 100 } |
OLD | NEW |