diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-12 12:00:40 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-12 12:00:40 +0000 |
commit | d9eb3c45ead253d51ab8838055c5493ba0ac7951 (patch) | |
tree | beab9a67d8fbd22a85301f784b48b8b55757ed60 /chrome/tools | |
parent | d4f06fa99aa8f04fedbb336fe4e115831b2bc6ca (diff) | |
download | chromium_src-d9eb3c45ead253d51ab8838055c5493ba0ac7951.zip chromium_src-d9eb3c45ead253d51ab8838055c5493ba0ac7951.tar.gz chromium_src-d9eb3c45ead253d51ab8838055c5493ba0ac7951.tar.bz2 |
Port flush_cache tool and perf_tests.
BUG=4160,4263
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=6815
Review URL: http://codereview.chromium.org/9639
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6886 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/tools')
-rw-r--r-- | chrome/tools/perf/flush_cache/flush_cache.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/tools/perf/flush_cache/flush_cache.cc b/chrome/tools/perf/flush_cache/flush_cache.cc index d6ba850..e178da4e 100644 --- a/chrome/tools/perf/flush_cache/flush_cache.cc +++ b/chrome/tools/perf/flush_cache/flush_cache.cc @@ -2,9 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// This little program attempts to flush the disk cache for some files. +// This little program attempts to flush the system cache for some files. // It's useful for testing Chrome with a cold database. +#include "base/file_path.h" #include "base/string_piece.h" #include "base/process_util.h" #include "base/sys_string_conversions.h" @@ -20,7 +21,8 @@ int main(int argc, const char* argv[]) { for (int i = 1; i < argc; ++i) { std::wstring filename = base::SysNativeMBToWide(argv[i]); - if (!file_util::EvictFileFromSystemCache(filename.c_str())) { + FilePath path = FilePath::FromWStringHack(filename); + if (!file_util::EvictFileFromSystemCache(path)) { fprintf(stderr, "Failed to evict %s from cache -- is it a directory?\n", argv[i]); } |