diff options
Diffstat (limited to 'base')
-rw-r--r-- | base/base_lib.scons | 2 | ||||
-rw-r--r-- | base/test_file_util.h | 4 | ||||
-rw-r--r-- | base/test_file_util_linux.cc | 5 | ||||
-rw-r--r-- | base/test_file_util_mac.cc | 2 |
4 files changed, 5 insertions, 8 deletions
diff --git a/base/base_lib.scons b/base/base_lib.scons index 50e7b99..8f8fd0c 100644 --- a/base/base_lib.scons +++ b/base/base_lib.scons @@ -191,7 +191,6 @@ if env['PLATFORM'] == 'darwin': 'platform_thread_mac.mm', 'scoped_nsautorelease_pool.mm', 'sys_string_conversions_mac.mm', - 'test_file_util_mac.cc', 'worker_pool_mac.mm', ]) @@ -208,7 +207,6 @@ if env['PLATFORM'] == 'posix': 'process_posix.cc', 'process_util_linux.cc', 'sys_string_conversions_linux.cc', - 'test_file_util_linux.cc', 'worker_pool.cc', ]) diff --git a/base/test_file_util.h b/base/test_file_util.h index 1ecaf29..3547d55 100644 --- a/base/test_file_util.h +++ b/base/test_file_util.h @@ -9,13 +9,11 @@ #include <string> -class FilePath; - namespace file_util { // Clear a specific file from the system cache. After this call, trying // to access this file will result in a cold load from the hard drive. -bool EvictFileFromSystemCache(const FilePath& file); +bool EvictFileFromSystemCache(const wchar_t* file); // Like CopyFileNoCache but recursively copies all files and subdirectories // in the given input directory to the output directory. Any files in the diff --git a/base/test_file_util_linux.cc b/base/test_file_util_linux.cc index c1b3768..421d182 100644 --- a/base/test_file_util_linux.cc +++ b/base/test_file_util_linux.cc @@ -12,8 +12,9 @@ namespace file_util { -bool EvictFileFromSystemCache(const FilePath& file) { - int fd = open(file.value().c_str(), O_RDONLY); +bool EvictFileFromSystemCache(const wchar_t* file) { + FilePath fpath = FilePath::FromWStringHack(file); + int fd = open(fpath.value().c_str(), O_RDONLY); if (fd < 0) return false; if (fdatasync(fd) != 0) diff --git a/base/test_file_util_mac.cc b/base/test_file_util_mac.cc index 1dd8533..ebb13f3 100644 --- a/base/test_file_util_mac.cc +++ b/base/test_file_util_mac.cc @@ -8,7 +8,7 @@ namespace file_util { -bool EvictFileFromSystemCache(const FilePath& file) { +bool EvictFileFromSystemCache(const wchar_t* file) { // TODO(port): Implement. NOTIMPLEMENTED(); return false; |