summaryrefslogtreecommitdiffstats
path: root/base/file_path.cc
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-09 22:14:27 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-09 22:14:27 +0000
commitee5c29daf67e999166394e1acb0f89b755b70aaf (patch)
treedb73c6f93b688b554e08eefd805411cef1d8a940 /base/file_path.cc
parent2747db2640d2395115de7f3d168786b8ef6e3a81 (diff)
downloadchromium_src-ee5c29daf67e999166394e1acb0f89b755b70aaf.zip
chromium_src-ee5c29daf67e999166394e1acb0f89b755b70aaf.tar.gz
chromium_src-ee5c29daf67e999166394e1acb0f89b755b70aaf.tar.bz2
Move Contains() method to file_utils, stop relying on in extensions_protocol
Review URL: http://codereview.chromium.org/16805 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7841 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_path.cc')
-rw-r--r--base/file_path.cc26
1 files changed, 0 insertions, 26 deletions
diff --git a/base/file_path.cc b/base/file_path.cc
index 8738c37..3375b66 100644
--- a/base/file_path.cc
+++ b/base/file_path.cc
@@ -3,7 +3,6 @@
// found in the LICENSE file.
#include "base/file_path.h"
-#include "base/file_util.h"
#include "base/logging.h"
// These includes are just for the *Hack functions, and should be removed
@@ -257,31 +256,6 @@ bool FilePath::IsAbsolute() const {
return IsPathAbsolute(path_);
}
-bool FilePath::Contains(const FilePath &other) const {
- FilePath parent = FilePath(*this);
- FilePath child = FilePath(other);
-
- if (!file_util::AbsolutePath(&parent) || !file_util::AbsolutePath(&child))
- return false;
-
-#if defined(OS_WIN)
- // file_util::AbsolutePath() does not flatten case on Windows, so we must do
- // a case-insensitive compare.
- if (!StartsWith(child.value(), parent.value(), false))
-#else
- if (!StartsWithASCII(child.value(), parent.value(), true))
-#endif
- return false;
-
- // file_util::AbsolutePath() normalizes '/' to '\' on Windows, so we only need
- // to check kSeparators[0].
- if (child.value().length() <= parent.value().length() ||
- child.value()[parent.value().length()] != kSeparators[0])
- return false;
-
- return true;
-}
-
#if defined(OS_POSIX)
// See file_path.h for a discussion of the encoding of paths on POSIX
// platforms. These *Hack() functions are not quite correct, but they're