diff options
author | maruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-06 20:49:46 +0000 |
---|---|---|
committer | maruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-06 20:49:46 +0000 |
commit | 4385e408447f74a0c545e319cba1196d21e26a02 (patch) | |
tree | edc144bf0345453d13bdef41447a84ae2ae2928f | |
parent | c60a6983cde6e1f67c7b9dd6013631c49f629367 (diff) | |
download | chromium_src-4385e408447f74a0c545e319cba1196d21e26a02.zip chromium_src-4385e408447f74a0c545e319cba1196d21e26a02.tar.gz chromium_src-4385e408447f74a0c545e319cba1196d21e26a02.tar.bz2 |
Revert base/base_path.cc (r450) since it caused large scale unit test failure.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@456 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/base_paths.cc | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/base/base_paths.cc b/base/base_paths.cc index 2c69cef..ed0a489 100644 --- a/base/base_paths.cc +++ b/base/base_paths.cc @@ -31,23 +31,9 @@ #include "base/file_util.h" #include "base/path_service.h" -#include "base/string_util.h" namespace base { -namespace { - -// List of directory name prefixes to skip when calculating -// base::DIR_SOURCE_ROOT. -const wchar_t* const kPathToStrip[] = { - L"release", - L"debug", - L"win32", - L"x64", -}; - -} // namespace - bool PathProvider(int key, std::wstring* result) { // NOTE: DIR_CURRENT is a special cased in PathService::Get @@ -66,26 +52,10 @@ bool PathProvider(int key, std::wstring* result) { return false; break; case base::DIR_SOURCE_ROOT: + // By default, unit tests execute two levels deep from the source root. + // For example: chrome/{Debug|Release}/ui_tests.exe PathProvider(base::DIR_EXE, &cur); - for (;;) { - bool found = false; - std::wstring bottom_dir(file_util::GetFilenameFromPath(cur)); - for (int i = 0; i < arraysize(kPathToStrip); ++i) { - if (0 == wcsncmp(bottom_dir.c_str(), - kPathToStrip[i], - wcslen(kPathToStrip[i]))) { - found = true; - break; - } - } - if (!found) - break; - - // Skip this directory. - file_util::UpOneDirectory(&cur); - } - - // Then skip one more for the solution directory. + file_util::UpOneDirectory(&cur); file_util::UpOneDirectory(&cur); break; default: |