diff options
Diffstat (limited to 'base/file_path.cc')
-rw-r--r-- | base/file_path.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/base/file_path.cc b/base/file_path.cc index fa93b2a..6134f2b 100644 --- a/base/file_path.cc +++ b/base/file_path.cc @@ -310,6 +310,15 @@ FilePath FilePath::InsertBeforeExtension(const StringType& suffix) const { return FilePath(ret); } +FilePath FilePath::InsertBeforeExtensionASCII(const StringPiece& suffix) const { + DCHECK(IsStringASCII(suffix)); +#if defined(OS_WIN) + return InsertBeforeExtension(ASCIIToWide(suffix)); +#elif defined(OS_POSIX) + return InsertBeforeExtension(suffix.as_string()); +#endif +} + FilePath FilePath::ReplaceExtension(const StringType& extension) const { if (path_.empty()) return FilePath(); |