From 0da011cfec84c36f706d991ac7e3a497b9a20e4a Mon Sep 17 00:00:00 2001 From: "evan@chromium.org" Date: Tue, 15 Mar 2011 19:23:14 +0000 Subject: wstring: remove some simple uses of FromWStringHack BUG=76112 Review URL: http://codereview.chromium.org/6695008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78247 0039d316-1c4b-4281-b951-d872f2087c98 --- base/test/test_file_util.h | 1 + base/test/test_file_util_posix.cc | 3 +++ base/test/test_file_util_win.cc | 3 +++ 3 files changed, 7 insertions(+) (limited to 'base/test') diff --git a/base/test/test_file_util.h b/base/test/test_file_util.h index e59456a..9b9389d 100644 --- a/base/test/test_file_util.h +++ b/base/test/test_file_util.h @@ -47,6 +47,7 @@ bool HasInternetZoneIdentifier(const FilePath& full_path); // string16 elsewhere for Unicode strings, but in tests it is frequently // convenient to be able to compare paths to literals like L"foobar". std::wstring FilePathAsWString(const FilePath& path); +FilePath WStringAsFilePath(const std::wstring& path); } // namespace file_util diff --git a/base/test/test_file_util_posix.cc b/base/test/test_file_util_posix.cc index 430e52e..5adbcc2 100644 --- a/base/test/test_file_util_posix.cc +++ b/base/test/test_file_util_posix.cc @@ -113,5 +113,8 @@ bool EvictFileFromSystemCache(const FilePath& file) { std::wstring FilePathAsWString(const FilePath& path) { return UTF8ToWide(path.value()); } +FilePath WStringAsFilePath(const std::wstring& path) { + return FilePath(WideToUTF8(path)); +} } // namespace file_util diff --git a/base/test/test_file_util_win.cc b/base/test/test_file_util_win.cc index 1f20740..0159d2e 100644 --- a/base/test/test_file_util_win.cc +++ b/base/test/test_file_util_win.cc @@ -220,5 +220,8 @@ bool HasInternetZoneIdentifier(const FilePath& full_path) { std::wstring FilePathAsWString(const FilePath& path) { return path.value(); } +FilePath WStringAsFilePath(const std::wstring& path) { + return FilePath(path); +} } // namespace file_util -- cgit v1.1