diff options
-rw-r--r-- | base/file_util.cc | 7 | ||||
-rw-r--r-- | base/file_util.h | 5 | ||||
-rw-r--r-- | chrome/test/in_process_browser_test.cc | 4 |
3 files changed, 3 insertions, 13 deletions
diff --git a/base/file_util.cc b/base/file_util.cc index 9ba6eed..ab0ae58 100644 --- a/base/file_util.cc +++ b/base/file_util.cc @@ -403,13 +403,6 @@ int ReadFile(const std::wstring& filename, char* data, int size) { bool SetCurrentDirectory(const std::wstring& directory) { return SetCurrentDirectory(FilePath::FromWStringHack(directory)); } -void TrimFilename(std::wstring* path) { - if (EndsWithSeparator(path)) { - TrimTrailingSeparator(path); - } else { - *path = FilePath::FromWStringHack(*path).DirName().ToWStringHack(); - } -} void UpOneDirectory(std::wstring* dir) { FilePath path = FilePath::FromWStringHack(*dir); FilePath directory = path.DirName(); diff --git a/base/file_util.h b/base/file_util.h index f12d6f2..6728a0d 100644 --- a/base/file_util.h +++ b/base/file_util.h @@ -71,11 +71,6 @@ void UpOneDirectory(std::wstring* dir); // Deprecated. Use FilePath::DirName instead. void UpOneDirectoryOrEmpty(std::wstring* dir); -// Strips the filename component from the end of 'path'. If path ends with a -// separator, then just drop the separator. -// Deprecated. Use FilePath::DirName instead. -void TrimFilename(std::wstring* path); - // Returns the filename portion of 'path', without any leading \'s or /'s. // Deprecated. Use FilePath::BaseName instead. std::wstring GetFilenameFromPath(const std::wstring& path); diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc index 25cc6ee..9cac992 100644 --- a/chrome/test/in_process_browser_test.cc +++ b/chrome/test/in_process_browser_test.cc @@ -5,6 +5,7 @@ #include "chrome/test/in_process_browser_test.h" #include "base/command_line.h" +#include "base/file_path.h" #include "base/file_util.h" #include "base/path_service.h" #include "chrome/browser/browser.h" @@ -114,7 +115,8 @@ void InProcessBrowserTest::SetUp() { // try to use unit_test.exe. std::wstring renderer_path; PathService::Get(base::FILE_EXE, &renderer_path); - file_util::TrimFilename(&renderer_path); + FilePath fp_renderer_path = FilePath::FromWStringHack(renderer_path); + renderer_path = fp_renderer_path.DirName().ToWStringHack(); file_util::AppendToPath(&renderer_path, chrome::kBrowserProcessExecutableName); command_line->AppendSwitchWithValue(switches::kRendererPath, renderer_path); |