diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-25 17:29:09 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-25 17:29:09 +0000 |
commit | eca6a4f5c6194885dee51b9d5ffc978ef18acf51 (patch) | |
tree | 3e3ca28631e45d3094f064b9493008871a927fdb /base | |
parent | 55185493afba3b7813d44a25c614975c0bc0f32b (diff) | |
download | chromium_src-eca6a4f5c6194885dee51b9d5ffc978ef18acf51.zip chromium_src-eca6a4f5c6194885dee51b9d5ffc978ef18acf51.tar.gz chromium_src-eca6a4f5c6194885dee51b9d5ffc978ef18acf51.tar.bz2 |
On Linux, the path to the exe is used to fork renderer processes.
This was causing the browser tests to create browser tests instead of a renderer processes.
Also the SSL tests now pass on Linux and have been enabled.
BUG=None
TEST=Run the browser tests on Linux.
Review URL: http://codereview.chromium.org/146057
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19257 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/path_service.cc | 15 | ||||
-rw-r--r-- | base/path_service.h | 3 |
2 files changed, 12 insertions, 6 deletions
diff --git a/base/path_service.cc b/base/path_service.cc index f625c98..3e34892 100644 --- a/base/path_service.cc +++ b/base/path_service.cc @@ -206,12 +206,12 @@ bool PathService::IsOverridden(int key) { return path_data->overrides.find(key) != path_data->overrides.end(); } -bool PathService::Override(int key, const std::wstring& path) { +bool PathService::Override(int key, const FilePath& path) { PathData* path_data = GetPathData(); DCHECK(path_data); DCHECK(key > base::DIR_CURRENT) << "invalid path key"; - std::wstring file_path = path; + FilePath file_path = path; #if defined(OS_WIN) // On Windows we switch the current working directory to load plugins (at // least). That's not the case on POSIX. @@ -221,17 +221,20 @@ bool PathService::Override(int key, const std::wstring& path) { #endif // make sure the directory exists: - if (!file_util::CreateDirectory(file_path)) + if (!file_util::PathExists(file_path) && + !file_util::CreateDirectory(file_path)) return false; - file_util::TrimTrailingSeparator(&file_path); - AutoLock scoped_lock(path_data->lock); - path_data->cache[key] = FilePath::FromWStringHack(file_path); + path_data->cache[key] = file_path; path_data->overrides.insert(key); return true; } +bool PathService::Override(int key, const std::wstring& path) { + return Override(key, FilePath::FromWStringHack(path)); +} + bool PathService::SetCurrentDirectory(const std::wstring& current_directory) { return file_util::SetCurrentDirectory(current_directory); } diff --git a/base/path_service.h b/base/path_service.h index 54d7ade..9cd0889 100644 --- a/base/path_service.h +++ b/base/path_service.h @@ -48,6 +48,9 @@ class PathService { // // WARNING: Consumers of PathService::Get may expect paths to be constant // over the lifetime of the app, so this method should be used with caution. + static bool Override(int key, const FilePath& path); + // This version, using a wstring, is deprecated and only kept around + // until we can fix all callers. static bool Override(int key, const std::wstring& path); // Return whether a path was overridden. |