diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-15 23:40:15 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-15 23:40:15 +0000 |
commit | 88fb4ada915e7f37a6ac939c10ef0ff96889dc71 (patch) | |
tree | e7457fbdbde126435002d6e29d1c7d1565d19ec7 /webkit | |
parent | bd18902708017f8b22ed9a4c6e9b3e1b130f2a4c (diff) | |
download | chromium_src-88fb4ada915e7f37a6ac939c10ef0ff96889dc71.zip chromium_src-88fb4ada915e7f37a6ac939c10ef0ff96889dc71.tar.gz chromium_src-88fb4ada915e7f37a6ac939c10ef0ff96889dc71.tar.bz2 |
Convert the HTTP cache to use FilePath rather than wstring for the
disk cache path.
BUG=24672
Review URL: http://codereview.chromium.org/276048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29213 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/tools/test_shell/node_leak_test.cc | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_main.cc | 3 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_request_context.cc | 7 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_request_context.h | 6 |
4 files changed, 10 insertions, 8 deletions
diff --git a/webkit/tools/test_shell/node_leak_test.cc b/webkit/tools/test_shell/node_leak_test.cc index dc5a2b8..bfa0408 100644 --- a/webkit/tools/test_shell/node_leak_test.cc +++ b/webkit/tools/test_shell/node_leak_test.cc @@ -53,7 +53,7 @@ class NodeLeakTest : public TestShellTest { parsed_command_line.HasSwitch(test_shell::kPlaybackMode) ? net::HttpCache::PLAYBACK : net::HttpCache::NORMAL; SimpleResourceLoaderBridge::Init( - new TestShellRequestContext(cache_path.ToWStringHack(), mode, false)); + new TestShellRequestContext(cache_path, mode, false)); TestShellTest::SetUp(); } diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc index 3b00164..b00a348 100644 --- a/webkit/tools/test_shell/test_shell_main.cc +++ b/webkit/tools/test_shell/test_shell_main.cc @@ -143,8 +143,7 @@ int main(int argc, char* argv[]) { // Initializing with a default context, which means no on-disk cookie DB, // and no support for directory listings. SimpleResourceLoaderBridge::Init( - new TestShellRequestContext(cache_path.ToWStringHack(), - cache_mode, layout_test_mode)); + new TestShellRequestContext(cache_path, cache_mode, layout_test_mode)); // Load ICU data tables icu_util::Initialize(); diff --git a/webkit/tools/test_shell/test_shell_request_context.cc b/webkit/tools/test_shell/test_shell_request_context.cc index b016c94..a673d87 100644 --- a/webkit/tools/test_shell/test_shell_request_context.cc +++ b/webkit/tools/test_shell/test_shell_request_context.cc @@ -6,6 +6,7 @@ #include "build/build_config.h" +#include "base/file_path.h" #include "net/base/cookie_monster.h" #include "net/base/host_resolver.h" #include "net/base/ssl_config_service.h" @@ -14,18 +15,18 @@ #include "webkit/glue/webkit_glue.h" TestShellRequestContext::TestShellRequestContext() { - Init(std::wstring(), net::HttpCache::NORMAL, false); + Init(FilePath(), net::HttpCache::NORMAL, false); } TestShellRequestContext::TestShellRequestContext( - const std::wstring& cache_path, + const FilePath& cache_path, net::HttpCache::Mode cache_mode, bool no_proxy) { Init(cache_path, cache_mode, no_proxy); } void TestShellRequestContext::Init( - const std::wstring& cache_path, + const FilePath& cache_path, net::HttpCache::Mode cache_mode, bool no_proxy) { cookie_store_ = new net::CookieMonster(); diff --git a/webkit/tools/test_shell/test_shell_request_context.h b/webkit/tools/test_shell/test_shell_request_context.h index befb630..332107f 100644 --- a/webkit/tools/test_shell/test_shell_request_context.h +++ b/webkit/tools/test_shell/test_shell_request_context.h @@ -8,6 +8,8 @@ #include "net/http/http_cache.h" #include "net/url_request/url_request_context.h" +class FilePath; + // A basic URLRequestContext that only provides an in-memory cookie store. class TestShellRequestContext : public URLRequestContext { public: @@ -16,7 +18,7 @@ class TestShellRequestContext : public URLRequestContext { // Use an on-disk cache at the specified location. Optionally, use the cache // in playback or record mode. - TestShellRequestContext(const std::wstring& cache_path, + TestShellRequestContext(const FilePath& cache_path, net::HttpCache::Mode cache_mode, bool no_proxy); @@ -25,7 +27,7 @@ class TestShellRequestContext : public URLRequestContext { virtual const std::string& GetUserAgent(const GURL& url) const; private: - void Init(const std::wstring& cache_path, net::HttpCache::Mode cache_mode, + void Init(const FilePath& cache_path, net::HttpCache::Mode cache_mode, bool no_proxy); }; |