diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-13 22:43:06 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-13 22:43:06 +0000 |
commit | 94f9c526e7d1241b8889ad66c5a72c2287d0f1fe (patch) | |
tree | ee7bf37322b9cfa4018869c360760d7a4c83cdf4 /base | |
parent | 5c6ea6630ef8b49adf62a2831a7eae5a66d4bf37 (diff) | |
download | chromium_src-94f9c526e7d1241b8889ad66c5a72c2287d0f1fe.zip chromium_src-94f9c526e7d1241b8889ad66c5a72c2287d0f1fe.tar.gz chromium_src-94f9c526e7d1241b8889ad66c5a72c2287d0f1fe.tar.bz2 |
file_util: don't compile any of the deprecated functions on non-Windows
We've removed usage of these functions on non-Windows platforms.
Review URL: http://codereview.chromium.org/3762002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62470 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/file_util.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/base/file_util.cc b/base/file_util.cc index 747232b..254e649 100644 --- a/base/file_util.cc +++ b/base/file_util.cc @@ -360,6 +360,7 @@ bool MemoryMappedFile::IsValid() { // Deprecated functions ---------------------------------------------------- +#if defined(OS_WIN) bool AbsolutePath(std::wstring* path_str) { FilePath path(FilePath::FromWStringHack(*path_str)); if (!AbsolutePath(&path)) @@ -368,8 +369,6 @@ bool AbsolutePath(std::wstring* path_str) { return true; } -#if defined(OS_WIN) -// This function is deprecated; see file_util_deprecated.h for details. void AppendToPath(std::wstring* path, const std::wstring& new_ending) { if (!path) { NOTREACHED(); @@ -380,7 +379,6 @@ void AppendToPath(std::wstring* path, const std::wstring& new_ending) { path->push_back(FilePath::kSeparators[0]); path->append(new_ending); } -#endif bool CopyDirectory(const std::wstring& from_path, const std::wstring& to_path, bool recursive) { @@ -394,11 +392,7 @@ bool Delete(const std::wstring& path, bool recursive) { std::wstring GetFileExtensionFromPath(const std::wstring& path) { FilePath::StringType extension = GetFileExtensionFromPath(FilePath::FromWStringHack(path)); -#if defined(OS_WIN) return extension; -#elif defined(OS_POSIX) - return UTF8ToWide(extension); -#endif } std::wstring GetFilenameFromPath(const std::wstring& path) { if (path.empty() || EndsWithSeparator(FilePath::FromWStringHack(path))) @@ -415,6 +409,7 @@ int ReadFile(const std::wstring& filename, char* data, int size) { int WriteFile(const std::wstring& filename, const char* data, int size) { return WriteFile(FilePath::FromWStringHack(filename), data, size); } +#endif // OS_WIN /////////////////////////////////////////////// // FileEnumerator |