diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-13 23:00:11 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-13 23:00:11 +0000 |
commit | ba4c78e5b07788094ec02c6a1b44eebd7a727926 (patch) | |
tree | 96cf69e6fcc2c1fc4eb3c1eda5ffc9a30cafbfcb /chrome/common/child_process_host.cc | |
parent | e9403ab1516c5ada016249c1c124485640c2ae8f (diff) | |
download | chromium_src-ba4c78e5b07788094ec02c6a1b44eebd7a727926.zip chromium_src-ba4c78e5b07788094ec02c6a1b44eebd7a727926.tar.gz chromium_src-ba4c78e5b07788094ec02c6a1b44eebd7a727926.tar.bz2 |
Use FilePath in ChildProcessHost.
BUG=24672
TEST=still compiles
Review URL: http://codereview.chromium.org/270077
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28909 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/child_process_host.cc')
-rw-r--r-- | chrome/common/child_process_host.cc | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/chrome/common/child_process_host.cc b/chrome/common/child_process_host.cc index 4b7a999..6495fba 100644 --- a/chrome/common/child_process_host.cc +++ b/chrome/common/child_process_host.cc @@ -82,25 +82,23 @@ ChildProcessHost::~ChildProcessHost() { } // static -std::wstring ChildProcessHost::GetChildPath() { - std::wstring child_path = CommandLine::ForCurrentProcess()->GetSwitchValue( +FilePath ChildProcessHost::GetChildPath() { + FilePath child_path = CommandLine::ForCurrentProcess()->GetSwitchValuePath( switches::kBrowserSubprocessPath); if (!child_path.empty()) return child_path; + FilePath path; + PathService::Get(base::FILE_EXE, &path); + #if !defined(OS_MACOSX) // On most platforms, the child executable is the same as the current // executable. - PathService::Get(base::FILE_EXE, &child_path); - return child_path; + return path; #else // On the Mac, the child executable lives at a predefined location within // the current app bundle. - FilePath path; - if (!PathService::Get(base::FILE_EXE, &path)) - return child_path; - // Figure out the current executable name. In a browser, this will be // "Chromium" or "Google Chrome". The child name will be the browser // executable name with " Helper" appended. The child app bundle name will @@ -115,7 +113,7 @@ std::wstring ChildProcessHost::GetChildPath() { if (strcmp(test_suffix, child_suffix.c_str()) == 0) { // FILE_EXE already ends with the child suffix and therefore already // refers to the child process path. Just return it. - return path.ToWStringHack(); + return path; } } @@ -138,7 +136,7 @@ std::wstring ChildProcessHost::GetChildPath() { path = path.Append(FILE_PATH_LITERAL("MacOS")); path = path.Append(child_exe_name); - return path.ToWStringHack(); + return path; #endif // OS_MACOSX } |