summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/plugin_process_host.cc8
-rw-r--r--chrome/browser/renderer_host/browser_render_process_host.cc2
-rw-r--r--chrome/common/chrome_switches.cc4
-rw-r--r--chrome/common/chrome_switches.h2
-rw-r--r--chrome/test/in_process_browser_test.cc17
5 files changed, 17 insertions, 16 deletions
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc
index 4d50664..51306f3 100644
--- a/chrome/browser/plugin_process_host.cc
+++ b/chrome/browser/plugin_process_host.cc
@@ -318,16 +318,16 @@ bool PluginProcessHost::Init(const WebPluginInfo& info,
// build command line for plugin, we have to quote the plugin's path to deal
// with spaces.
- std::wstring exe_path;
- if (!PathService::Get(base::FILE_EXE, &exe_path))
+ const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
+ std::wstring exe_path =
+ browser_command_line.GetSwitchValue(switches::kBrowserSubprocessPath);
+ if (exe_path.empty() && !PathService::Get(base::FILE_EXE, &exe_path))
return false;
CommandLine cmd_line(exe_path);
if (logging::DialogsAreSuppressed())
cmd_line.AppendSwitch(switches::kNoErrorDialogs);
- const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
-
// propagate the following switches to the plugin command line (along with
// any associated values) if present in the browser command line
static const wchar_t* const switch_names[] = {
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
index 885a086..af67872 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.cc
+++ b/chrome/browser/renderer_host/browser_render_process_host.cc
@@ -220,7 +220,7 @@ bool BrowserRenderProcessHost::Init() {
// Build command line for renderer, we have to quote the executable name to
// deal with spaces.
std::wstring renderer_path =
- browser_command_line.GetSwitchValue(switches::kRendererPath);
+ browser_command_line.GetSwitchValue(switches::kBrowserSubprocessPath);
if (renderer_path.empty()) {
if (!GetRendererPath(&renderer_path)) {
// Need to reset the channel we created above or others might think the
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index ba4962e..0fb2a08 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -66,8 +66,8 @@ const wchar_t kHomePage[] = L"homepage";
// Causes the process to run as renderer instead of as browser.
const wchar_t kRendererProcess[] = L"renderer";
-// Path to the exe to run for the renderer subprocess
-const wchar_t kRendererPath[] = L"renderer-path";
+// Path to the exe to run for the renderer and plugin subprocesses.
+const wchar_t kBrowserSubprocessPath[] = L"browser-subprocess-path";
// Causes the process to run as a plugin subprocess.
const wchar_t kPluginProcess[] = L"plugin";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 8d3b311..c95634c 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -27,7 +27,7 @@ extern const wchar_t kProcessChannelID[];
extern const wchar_t kTestingChannelID[];
extern const wchar_t kHomePage[];
extern const wchar_t kRendererProcess[];
-extern const wchar_t kRendererPath[];
+extern const wchar_t kBrowserSubprocessPath[];
extern const wchar_t kPluginProcess[];
extern const wchar_t kWorkerProcess[];
extern const wchar_t kSingleProcess[];
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc
index 4c68f57..80819b8 100644
--- a/chrome/test/in_process_browser_test.cc
+++ b/chrome/test/in_process_browser_test.cc
@@ -100,15 +100,16 @@ void InProcessBrowserTest::SetUp() {
if (command_line->HasSwitch(switches::kSingleProcess))
RenderProcessHost::set_run_renderer_in_process(true);
- // Explicitly set the path of the exe used for the renderer, otherwise it'll
- // try to use unit_test.exe.
- std::wstring renderer_path;
- PathService::Get(base::FILE_EXE, &renderer_path);
- FilePath fp_renderer_path = FilePath::FromWStringHack(renderer_path);
- renderer_path = fp_renderer_path.DirName().ToWStringHack();
- file_util::AppendToPath(&renderer_path,
+ // Explicitly set the path of the exe used for the renderer and plugin,
+ // otherwise they'll try to use unit_test.exe.
+ std::wstring subprocess_path;
+ PathService::Get(base::FILE_EXE, &subprocess_path);
+ FilePath fp_subprocess_path = FilePath::FromWStringHack(subprocess_path);
+ subprocess_path = fp_subprocess_path.DirName().ToWStringHack();
+ file_util::AppendToPath(&subprocess_path,
chrome::kBrowserProcessExecutablePath);
- command_line->AppendSwitchWithValue(switches::kRendererPath, renderer_path);
+ command_line->AppendSwitchWithValue(switches::kBrowserSubprocessPath,
+ subprocess_path);
sandbox::SandboxInterfaceInfo sandbox_info = {0};
SandboxInitWrapper sandbox_wrapper;