summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-21 22:01:01 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-21 22:01:01 +0000
commitd841205ef77d7f98bf780516d3be96a3ba6c6f29 (patch)
treecb95bf8fc37fca6c95ddc960379f8191d2e68ea1
parentb6c911a716816238f5155ef1522622d76d4665a2 (diff)
downloadchromium_src-d841205ef77d7f98bf780516d3be96a3ba6c6f29.zip
chromium_src-d841205ef77d7f98bf780516d3be96a3ba6c6f29.tar.gz
chromium_src-d841205ef77d7f98bf780516d3be96a3ba6c6f29.tar.bz2
Stop using and remove deprecated file_util::TrimFilename().
Review URL: http://codereview.chromium.org/67267 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14142 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/file_util.cc7
-rw-r--r--base/file_util.h5
-rw-r--r--chrome/test/in_process_browser_test.cc4
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);