summaryrefslogtreecommitdiffstats
path: root/base/file_path.h
diff options
context:
space:
mode:
authormad@chromium.org <mad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-28 12:41:29 +0000
committermad@chromium.org <mad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-28 12:41:29 +0000
commita14b16bd4b6d7fc3c1e3e83f16d1d59bc05f3dab (patch)
treeb9f147f90989125906bc77282d41f166c57bb959 /base/file_path.h
parentc3b4463c325d5a7f512130c02a68913cc52d20fe (diff)
downloadchromium_src-a14b16bd4b6d7fc3c1e3e83f16d1d59bc05f3dab.zip
chromium_src-a14b16bd4b6d7fc3c1e3e83f16d1d59bc05f3dab.tar.gz
chromium_src-a14b16bd4b6d7fc3c1e3e83f16d1d59bc05f3dab.tar.bz2
Get rid of FilePath::AppendAndResolveRelative().
To resolve the problem of '..' parent references as well as symbolic links on POSIX platforms, we can simply use the file_util::AbsolutePath() function. This has the drawback of having a different behavior on Windows and POSIX platforms, in the way that it can return a canonical path that doesn't exists when ran on Windows, but it will return an empty path (or false) when run on a POSIX platform. So we need to add an extra PathExists() call to unify the behavior. BUG=25681,25131 Review URL: http://codereview.chromium.org/343003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30334 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_path.h')
-rw-r--r--base/file_path.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/base/file_path.h b/base/file_path.h
index 7900922..0d0bdad 100644
--- a/base/file_path.h
+++ b/base/file_path.h
@@ -178,18 +178,6 @@ class FilePath {
// and BaseName().value() on each child component.
void GetComponents(std::vector<FilePath::StringType>* components) const;
- // Returns true, and sets *path to resulting full path, if relative_path can
- // be applied to current path by resolving any '..' it may contain. Returns
- // false otherwise, e.g., if relative path is absolute, or if it climbs back
- // up the hierarchy too far (i.e., beyond the root of current path).
- //
- // Note that if the current path ends with a file name, we won't try to
- // figure it out (so this method doesn't go to the disk) and we will blindly
- // append relative_path at the end of the current path, including the file
- // name in the current path (if any).
- bool AppendAndResolveRelative(const FilePath& relative_path,
- FilePath* path) const;
-
// Returns true if this FilePath is a strict parent of the |child|. Absolute
// and relative paths are accepted i.e. is /foo parent to /foo/bar and
// is foo parent to foo/bar. Does not convert paths to absolute, follow