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

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

Issue 9774: * Revert "Por rt flush_cache tool." (Closed)
Patch Set: Created 12 years, 1 month 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/tools/perf/flush_cache/SConscript ('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
diff --git a/chrome/tools/perf/flush_cache/flush_cache.cc b/chrome/tools/perf/flush_cache/flush_cache.cc
index f02902881e57e4864c41240e1344fe3191277aae..f10b69b938129a8c0f81ca7b884decbaa2668b7b 100644
--- a/chrome/tools/perf/flush_cache/flush_cache.cc
+++ b/chrome/tools/perf/flush_cache/flush_cache.cc
@@ -5,13 +5,10 @@
// This little program attempts to flush the disk cache for some files.
// It's useful for testing Chrome with a cold database.
-#include "build/build_config.h"
-
-#include "base/file_path.h"
-#include "base/file_util.h"
#include "base/string_piece.h"
#include "base/process_util.h"
#include "base/sys_string_conversions.h"
+#include "chrome/test/test_file_util.h"
int main(int argc, const char* argv[]) {
process_util::EnableTerminationOnHeapCorruption();
@@ -22,12 +19,8 @@ int main(int argc, const char* argv[]) {
}
for (int i = 1; i < argc; ++i) {
-#if defined(OS_POSIX)
- std::string filename(argv[i]);
-#elif defined(OS_WIN)
std::wstring filename = base::SysNativeMBToWide(argv[i]);
-#endif
- if (!file_util::EvictFileFromSystemCache(FilePath(filename))) {
+ if (!file_util::EvictFileFromSystemCache(filename.c_str())) {
fprintf(stderr, "Failed to evict %s from cache -- is it a directory?\n",
argv[i]);
}
« no previous file with comments | « chrome/tools/perf/flush_cache/SConscript ('k') | net/disk_cache/disk_cache_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698