summaryrefslogtreecommitdiffstats
path: root/base/file_util.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-26 15:11:55 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-26 15:11:55 +0000
commit1840cfcf0da037741761abe2c04f73c354dff17a (patch)
treec4c457c2644b8878c3b6cea341cb152efad86d45 /base/file_util.cc
parent9e8554820f3b972d410ae9a96b837a65ab8d0333 (diff)
downloadchromium_src-1840cfcf0da037741761abe2c04f73c354dff17a.zip
chromium_src-1840cfcf0da037741761abe2c04f73c354dff17a.tar.gz
chromium_src-1840cfcf0da037741761abe2c04f73c354dff17a.tar.bz2
Deprecate file_util::AppendToPath() on non-Windows.
We still have ~150 callers to AppendToPath in our code, but most of them are in the installer and I'm reluctant to fiddle with that code without having an easy way to test it. BUG=24672 Review URL: http://codereview.chromium.org/654013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40120 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util.cc')
-rw-r--r--base/file_util.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/base/file_util.cc b/base/file_util.cc
index e0e6772..b10cd0b 100644
--- a/base/file_util.cc
+++ b/base/file_util.cc
@@ -331,16 +331,21 @@ bool AbsolutePath(std::wstring* path_str) {
*path_str = path.ToWStringHack();
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();
return; // Don't crash in this function in release builds.
}
- if (!EndsWithSeparator(path))
+ if (!EndsWithSeparator(*path))
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) {
return CopyDirectory(FilePath::FromWStringHack(from_path),
@@ -350,9 +355,6 @@ bool CopyDirectory(const std::wstring& from_path, const std::wstring& to_path,
bool Delete(const std::wstring& path, bool recursive) {
return Delete(FilePath::FromWStringHack(path), recursive);
}
-bool EndsWithSeparator(std::wstring* path) {
- return EndsWithSeparator(FilePath::FromWStringHack(*path));
-}
bool EndsWithSeparator(const std::wstring& path) {
return EndsWithSeparator(FilePath::FromWStringHack(path));
}