diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-15 19:23:14 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-15 19:23:14 +0000 |
commit | 0da011cfec84c36f706d991ac7e3a497b9a20e4a (patch) | |
tree | c712e851515eac33cad325796fc7e425d28b45ae /base/test | |
parent | 705097651f83b400621be7bd553052636adad05a (diff) | |
download | chromium_src-0da011cfec84c36f706d991ac7e3a497b9a20e4a.zip chromium_src-0da011cfec84c36f706d991ac7e3a497b9a20e4a.tar.gz chromium_src-0da011cfec84c36f706d991ac7e3a497b9a20e4a.tar.bz2 |
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
Diffstat (limited to 'base/test')
-rw-r--r-- | base/test/test_file_util.h | 1 | ||||
-rw-r--r-- | base/test/test_file_util_posix.cc | 3 | ||||
-rw-r--r-- | base/test/test_file_util_win.cc | 3 |
3 files changed, 7 insertions, 0 deletions
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 |