Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: chrome/tools/perf/flush_cache/flush_cache.cc

Issue 9639: Port flush_cache tool. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/perf/perftests.scons ('k') | net/disk_cache/disk_cache_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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]);
}
« no previous file with comments | « chrome/test/perf/perftests.scons ('k') | net/disk_cache/disk_cache_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698