| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "net/base/cookie_monster.h" | 9 #include "net/base/cookie_monster.h" |
| 10 #include "net/base/host_resolver.h" | 10 #include "net/base/host_resolver.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 cache = new net::HttpCache(host_resolver_, proxy_service_, | 59 cache = new net::HttpCache(host_resolver_, proxy_service_, |
| 60 ssl_config_service_, cache_path, 0); | 60 ssl_config_service_, cache_path, 0); |
| 61 } | 61 } |
| 62 cache->set_mode(cache_mode); | 62 cache->set_mode(cache_mode); |
| 63 http_transaction_factory_ = cache; | 63 http_transaction_factory_ = cache; |
| 64 | 64 |
| 65 ftp_transaction_factory_ = new net::FtpNetworkLayer(host_resolver_); | 65 ftp_transaction_factory_ = new net::FtpNetworkLayer(host_resolver_); |
| 66 } | 66 } |
| 67 | 67 |
| 68 TestShellRequestContext::~TestShellRequestContext() { | 68 TestShellRequestContext::~TestShellRequestContext() { |
| 69 delete cookie_store_; | |
| 70 delete ftp_transaction_factory_; | 69 delete ftp_transaction_factory_; |
| 71 delete http_transaction_factory_; | 70 delete http_transaction_factory_; |
| 72 } | 71 } |
| 73 | 72 |
| 74 const std::string& TestShellRequestContext::GetUserAgent( | 73 const std::string& TestShellRequestContext::GetUserAgent( |
| 75 const GURL& url) const { | 74 const GURL& url) const { |
| 76 return webkit_glue::GetUserAgent(url); | 75 return webkit_glue::GetUserAgent(url); |
| 77 } | 76 } |
| OLD | NEW |