| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This little program attempts to flush the system cache for some files. | 5 // This little program attempts to flush the system cache for some files. |
| 6 // It's useful for testing Chrome with a cold database. | 6 // It's useful for testing Chrome with a cold database. |
| 7 | 7 |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/string_piece.h" | 9 #include "base/string_piece.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| 11 #include "base/sys_string_conversions.h" | 11 #include "base/sys_string_conversions.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 23 std::wstring filename = base::SysNativeMBToWide(argv[i]); | 23 std::wstring filename = base::SysNativeMBToWide(argv[i]); |
| 24 FilePath path = FilePath::FromWStringHack(filename); | 24 FilePath path = FilePath::FromWStringHack(filename); |
| 25 if (!file_util::EvictFileFromSystemCache(path)) { | 25 if (!file_util::EvictFileFromSystemCache(path)) { |
| 26 fprintf(stderr, "Failed to evict %s from cache -- is it a directory?\n", | 26 fprintf(stderr, "Failed to evict %s from cache -- is it a directory?\n", |
| 27 argv[i]); | 27 argv[i]); |
| 28 } | 28 } |
| 29 } | 29 } |
| 30 | 30 |
| 31 return 0; | 31 return 0; |
| 32 } | 32 } |
| OLD | NEW |