Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: webkit/tools/test_shell/test_shell_request_context.cc

Issue 4216001: Initial support for built-in DNS resolver/cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add missing files Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« net/base/host_resolver_impl.cc ('K') | « net/url_request/url_request_unittest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698