diff options
author | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-28 18:29:09 +0000 |
---|---|---|
committer | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-28 18:29:09 +0000 |
commit | 9d0e4b33204e3a7d18719778324fb08e545feaf9 (patch) | |
tree | 173c1242b08e580fe2ce51b44ca3835d54fe5c0a /chrome/common/chrome_paths.cc | |
parent | 2f82fb8b5067a9d93b85a5ecd16b14dace708ec5 (diff) | |
download | chromium_src-9d0e4b33204e3a7d18719778324fb08e545feaf9.zip chromium_src-9d0e4b33204e3a7d18719778324fb08e545feaf9.tar.gz chromium_src-9d0e4b33204e3a7d18719778324fb08e545feaf9.tar.bz2 |
The CPP logic on the log dir seems to have been wrong since last year. Changed so debug writes next to the executable, and release writes to userdata dir. It was the reverse.
Drop two paths that aren't used any more.
BUG=12834
TEST=run app, make sure we don't create a log file inside the MacOS folder.
Review URL: http://codereview.chromium.org/115868
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17087 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/chrome_paths.cc')
-rw-r--r-- | chrome/common/chrome_paths.cc | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc index 7987d34e..4645346 100644 --- a/chrome/common/chrome_paths.cc +++ b/chrome/common/chrome_paths.cc @@ -37,9 +37,11 @@ bool PathProvider(int key, FilePath* result) { case chrome::DIR_APP: return PathService::Get(base::DIR_MODULE, result); case chrome::DIR_LOGS: -#ifndef NDEBUG +#ifdef NDEBUG + // Release builds write to the data dir return PathService::Get(chrome::DIR_USER_DATA, result); #else + // Debug builds write next to the binary (in the build tree) return PathService::Get(base::DIR_EXE, result); #endif case chrome::FILE_RESOURCE_MODULE: @@ -161,26 +163,6 @@ bool PathProvider(int key, FilePath* result) { if (!file_util::PathExists(cur)) // we don't want to create this return false; break; - case chrome::FILE_PYTHON_RUNTIME: - if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur)) - return false; - cur = cur.Append(FILE_PATH_LITERAL("third_party")); - cur = cur.Append(FILE_PATH_LITERAL("python_24")); - cur = cur.Append(FILE_PATH_LITERAL("python.exe")); - if (!file_util::PathExists(cur)) // we don't want to create this - return false; - break; - case chrome::FILE_TEST_SERVER: - if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur)) - return false; - cur = cur.Append(FILE_PATH_LITERAL("net")); - cur = cur.Append(FILE_PATH_LITERAL("tools")); - cur = cur.Append(FILE_PATH_LITERAL("test")); - cur = cur.Append(FILE_PATH_LITERAL("testserver")); - cur = cur.Append(FILE_PATH_LITERAL("testserver.py")); - if (!file_util::PathExists(cur)) // we don't want to create this - return false; - break; default: return false; } |