| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); | 86 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); |
| 87 | 87 |
| 88 net::HttpCache::DefaultBackend* backend = new net::HttpCache::DefaultBackend( | 88 net::HttpCache::DefaultBackend* backend = new net::HttpCache::DefaultBackend( |
| 89 cache_path.empty() ? net::MEMORY_CACHE : net::DISK_CACHE, | 89 cache_path.empty() ? net::MEMORY_CACHE : net::DISK_CACHE, |
| 90 cache_path, 0, SimpleResourceLoaderBridge::GetCacheThread()); | 90 cache_path, 0, SimpleResourceLoaderBridge::GetCacheThread()); |
| 91 | 91 |
| 92 net::HttpCache* cache = | 92 net::HttpCache* cache = |
| 93 new net::HttpCache(host_resolver(), cert_verifier(), | 93 new net::HttpCache(host_resolver(), cert_verifier(), |
| 94 origin_bound_cert_service(), NULL, NULL, | 94 origin_bound_cert_service(), NULL, NULL, |
| 95 proxy_service(), ssl_config_service(), | 95 proxy_service(), ssl_config_service(), |
| 96 http_auth_handler_factory(), NULL, NULL, backend); | 96 http_auth_handler_factory(), NULL, NULL, NULL, |
| 97 backend); |
| 97 | 98 |
| 98 cache->set_mode(cache_mode); | 99 cache->set_mode(cache_mode); |
| 99 storage_.set_http_transaction_factory(cache); | 100 storage_.set_http_transaction_factory(cache); |
| 100 | 101 |
| 101 storage_.set_ftp_transaction_factory( | 102 storage_.set_ftp_transaction_factory( |
| 102 new net::FtpNetworkLayer(host_resolver())); | 103 new net::FtpNetworkLayer(host_resolver())); |
| 103 | 104 |
| 104 blob_storage_controller_.reset(new webkit_blob::BlobStorageController()); | 105 blob_storage_controller_.reset(new webkit_blob::BlobStorageController()); |
| 105 file_system_context_ = static_cast<SimpleFileSystem*>( | 106 file_system_context_ = static_cast<SimpleFileSystem*>( |
| 106 WebKit::webKitPlatformSupport()->fileSystem())->file_system_context(); | 107 WebKit::webKitPlatformSupport()->fileSystem())->file_system_context(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 119 storage_.set_job_factory(job_factory); | 120 storage_.set_job_factory(job_factory); |
| 120 } | 121 } |
| 121 | 122 |
| 122 TestShellRequestContext::~TestShellRequestContext() { | 123 TestShellRequestContext::~TestShellRequestContext() { |
| 123 } | 124 } |
| 124 | 125 |
| 125 const std::string& TestShellRequestContext::GetUserAgent( | 126 const std::string& TestShellRequestContext::GetUserAgent( |
| 126 const GURL& url) const { | 127 const GURL& url) const { |
| 127 return webkit_glue::GetUserAgent(url); | 128 return webkit_glue::GetUserAgent(url); |
| 128 } | 129 } |
| OLD | NEW |