summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-18 02:49:46 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-18 02:49:46 +0000
commite5d5383b10cdb560b7563a925723f6bf69dbc5b0 (patch)
treeccf27b4ea7e385e6d73f0a462f9e415bdfb757b1 /base
parent2d85cfb54ca8e1b5b98cfb2f53befc180b7f86c0 (diff)
downloadchromium_src-e5d5383b10cdb560b7563a925723f6bf69dbc5b0.zip
chromium_src-e5d5383b10cdb560b7563a925723f6bf69dbc5b0.tar.gz
chromium_src-e5d5383b10cdb560b7563a925723f6bf69dbc5b0.tar.bz2
Get rid of the deprecated file_util::InsertBeforeExtension.
BUG=None TEST=trybots Review URL: http://codereview.chromium.org/3161018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56477 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/file_util_deprecated.h3
-rw-r--r--base/file_util_unittest.cc63
2 files changed, 0 insertions, 66 deletions
diff --git a/base/file_util_deprecated.h b/base/file_util_deprecated.h
index 148c023..70857ef 100644
--- a/base/file_util_deprecated.h
+++ b/base/file_util_deprecated.h
@@ -51,9 +51,6 @@ std::wstring GetFileExtensionFromPath(const std::wstring& path);
bool AbsolutePath(std::wstring* path);
-// Use FilePath::InsertBeforeExtension.
-void InsertBeforeExtension(FilePath* path, const FilePath::StringType& suffix);
-
// Use version that takes a FilePath.
bool Delete(const std::wstring& path, bool recursive);
bool CopyDirectory(const std::wstring& from_path, const std::wstring& to_path,
diff --git a/base/file_util_unittest.cc b/base/file_util_unittest.cc
index 7ee7628..ec62b3c 100644
--- a/base/file_util_unittest.cc
+++ b/base/file_util_unittest.cc
@@ -239,69 +239,6 @@ TEST_F(FileUtilTest, AppendToPath) {
}
#endif // defined(OS_WIN)
-
-static const struct InsertBeforeExtensionCase {
- const FilePath::CharType* path;
- const FilePath::CharType* suffix;
- const FilePath::CharType* result;
-} kInsertBeforeExtension[] = {
- {FPL(""), FPL(""), FPL("")},
- {FPL(""), FPL("txt"), FPL("txt")},
- {FPL("."), FPL("txt"), FPL("txt.")},
- {FPL("."), FPL(""), FPL(".")},
- {FPL("foo.dll"), FPL("txt"), FPL("footxt.dll")},
- {FPL("foo.dll"), FPL(".txt"), FPL("foo.txt.dll")},
- {FPL("foo"), FPL("txt"), FPL("footxt")},
- {FPL("foo"), FPL(".txt"), FPL("foo.txt")},
- {FPL("foo.baz.dll"), FPL("txt"), FPL("foo.baztxt.dll")},
- {FPL("foo.baz.dll"), FPL(".txt"), FPL("foo.baz.txt.dll")},
- {FPL("foo.dll"), FPL(""), FPL("foo.dll")},
- {FPL("foo.dll"), FPL("."), FPL("foo..dll")},
- {FPL("foo"), FPL(""), FPL("foo")},
- {FPL("foo"), FPL("."), FPL("foo.")},
- {FPL("foo.baz.dll"), FPL(""), FPL("foo.baz.dll")},
- {FPL("foo.baz.dll"), FPL("."), FPL("foo.baz..dll")},
-#if defined(OS_WIN)
- {FPL("\\"), FPL(""), FPL("\\")},
- {FPL("\\"), FPL("txt"), FPL("\\txt")},
- {FPL("\\."), FPL("txt"), FPL("\\txt.")},
- {FPL("\\."), FPL(""), FPL("\\.")},
- {FPL("C:\\bar\\foo.dll"), FPL("txt"), FPL("C:\\bar\\footxt.dll")},
- {FPL("C:\\bar.baz\\foodll"), FPL("txt"), FPL("C:\\bar.baz\\foodlltxt")},
- {FPL("C:\\bar.baz\\foo.dll"), FPL("txt"), FPL("C:\\bar.baz\\footxt.dll")},
- {FPL("C:\\bar.baz\\foo.dll.exe"), FPL("txt"),
- FPL("C:\\bar.baz\\foo.dlltxt.exe")},
- {FPL("C:\\bar.baz\\foo"), FPL(""), FPL("C:\\bar.baz\\foo")},
- {FPL("C:\\bar.baz\\foo.exe"), FPL(""), FPL("C:\\bar.baz\\foo.exe")},
- {FPL("C:\\bar.baz\\foo.dll.exe"), FPL(""), FPL("C:\\bar.baz\\foo.dll.exe")},
- {FPL("C:\\bar\\baz\\foo.exe"), FPL(" (1)"), FPL("C:\\bar\\baz\\foo (1).exe")},
-#elif defined(OS_POSIX)
- {FPL("/"), FPL(""), FPL("/")},
- {FPL("/"), FPL("txt"), FPL("/txt")},
- {FPL("/."), FPL("txt"), FPL("/txt.")},
- {FPL("/."), FPL(""), FPL("/.")},
- {FPL("/bar/foo.dll"), FPL("txt"), FPL("/bar/footxt.dll")},
- {FPL("/bar.baz/foodll"), FPL("txt"), FPL("/bar.baz/foodlltxt")},
- {FPL("/bar.baz/foo.dll"), FPL("txt"), FPL("/bar.baz/footxt.dll")},
- {FPL("/bar.baz/foo.dll.exe"), FPL("txt"), FPL("/bar.baz/foo.dlltxt.exe")},
- {FPL("/bar.baz/foo"), FPL(""), FPL("/bar.baz/foo")},
- {FPL("/bar.baz/foo.exe"), FPL(""), FPL("/bar.baz/foo.exe")},
- {FPL("/bar.baz/foo.dll.exe"), FPL(""), FPL("/bar.baz/foo.dll.exe")},
- {FPL("/bar/baz/foo.exe"), FPL(" (1)"), FPL("/bar/baz/foo (1).exe")},
-#endif
-};
-
-#if defined(OS_WIN)
-// This function has been deprecated on non-Windows.
-TEST_F(FileUtilTest, InsertBeforeExtensionTest) {
- for (unsigned int i = 0; i < arraysize(kInsertBeforeExtension); ++i) {
- FilePath path(kInsertBeforeExtension[i].path);
- file_util::InsertBeforeExtension(&path, kInsertBeforeExtension[i].suffix);
- EXPECT_EQ(kInsertBeforeExtension[i].result, path.value());
- }
-}
-#endif
-
static const struct filename_case {
const wchar_t* path;
const wchar_t* filename;