Index: chrome/tools/perf/flush_cache/flush_cache.cc |
=================================================================== |
--- chrome/tools/perf/flush_cache/flush_cache.cc (revision 6884) |
+++ chrome/tools/perf/flush_cache/flush_cache.cc (working copy) |
@@ -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 @@ |
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]); |
} |