diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-18 08:38:16 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-18 08:38:16 +0000 |
commit | 406810e402674f6ef1f8248c12a6b4f4a0223a8d (patch) | |
tree | 22d715c0e61f34f4679fa54bb5889010e07fde7e /base/file_path.h | |
parent | 5940ca44ad8aedc988f87e879089e45ac266db2a (diff) | |
download | chromium_src-406810e402674f6ef1f8248c12a6b4f4a0223a8d.zip chromium_src-406810e402674f6ef1f8248c12a6b4f4a0223a8d.tar.gz chromium_src-406810e402674f6ef1f8248c12a6b4f4a0223a8d.tar.bz2 |
Rather than create a TODO that will never be done, I went ahead and implemented FilePath::Contains().
Review URL: http://codereview.chromium.org/14827
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7208 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_path.h')
-rw-r--r-- | base/file_path.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/base/file_path.h b/base/file_path.h index 8513592..cadf2cf 100644 --- a/base/file_path.h +++ b/base/file_path.h @@ -163,6 +163,11 @@ class FilePath { // platforms, an absolute path begins with a separator character. bool IsAbsolute() const; + // Returns true if this FilePath represents a parent dir of |other|. Both + // paths are normalized before doing the comparison, but neither |this| nor + // |other| are modified. + bool Contains(const FilePath& other) const; + // Returns a copy of this FilePath that does not end with a trailing // separator. FilePath StripTrailingSeparators() const; |