summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-04 18:24:38 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-04 18:24:38 +0000
commit13081fccbf907aef8476c94d904fc94d6c59a206 (patch)
tree9470fa1206aba0c8b41ad569a019c7ad484ab7ab /chrome
parent815d63d9f1c68ffa056ad2c2c8fee34f0d0b70b8 (diff)
downloadchromium_src-13081fccbf907aef8476c94d904fc94d6c59a206.zip
chromium_src-13081fccbf907aef8476c94d904fc94d6c59a206.tar.gz
chromium_src-13081fccbf907aef8476c94d904fc94d6c59a206.tar.bz2
PrependWrapper is platform-specific, so it should take a platform string.
Though the comments said it was POSIX only, I see it used on Windows as well so I'm updating the comment. Review URL: http://codereview.chromium.org/3030043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54933 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/gpu_process_host.cc4
-rw-r--r--chrome/browser/plugin_process_host.cc4
-rw-r--r--chrome/browser/renderer_host/browser_render_process_host.cc8
-rw-r--r--chrome/browser/utility_process_host.cc2
-rw-r--r--chrome/browser/worker_host/worker_process_host.cc9
-rw-r--r--chrome/browser/zygote_host_linux.cc7
-rw-r--r--chrome/test/ui/ui_test.cc2
7 files changed, 17 insertions, 19 deletions
diff --git a/chrome/browser/gpu_process_host.cc b/chrome/browser/gpu_process_host.cc
index 19b0993..fe8e5f8 100644
--- a/chrome/browser/gpu_process_host.cc
+++ b/chrome/browser/gpu_process_host.cc
@@ -78,8 +78,8 @@ bool GpuProcessHost::Init() {
return false;
const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
- std::wstring gpu_launcher =
- browser_command_line.GetSwitchValue(switches::kGpuLauncher);
+ CommandLine::StringType gpu_launcher =
+ browser_command_line.GetSwitchValueNative(switches::kGpuLauncher);
FilePath exe_path = ChildProcessHost::GetChildPath(gpu_launcher.empty());
if (exe_path.empty())
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc
index 07ba624..d833247 100644
--- a/chrome/browser/plugin_process_host.cc
+++ b/chrome/browser/plugin_process_host.cc
@@ -350,8 +350,8 @@ bool PluginProcessHost::Init(const WebPluginInfo& info,
// Build command line for plugin. When we have a plugin launcher, we can't
// allow "self" on linux and we need the real file path.
const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
- std::wstring plugin_launcher =
- browser_command_line.GetSwitchValue(switches::kPluginLauncher);
+ CommandLine::StringType plugin_launcher =
+ browser_command_line.GetSwitchValueNative(switches::kPluginLauncher);
FilePath exe_path = GetChildPath(plugin_launcher.empty());
if (exe_path.empty())
return false;
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
index 796aa710..3009737 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.cc
+++ b/chrome/browser/renderer_host/browser_render_process_host.cc
@@ -272,19 +272,19 @@ bool BrowserRenderProcessHost::Init(bool is_extensions_process) {
profile(),
widget_helper_);
- std::wstring renderer_prefix;
+ CommandLine::StringType renderer_prefix;
#if defined(OS_POSIX)
// A command prefix is something prepended to the command line of the spawned
// process. It is supported only on POSIX systems.
const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
renderer_prefix =
- browser_command_line.GetSwitchValue(switches::kRendererCmdPrefix);
+ browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix);
#endif // defined(OS_POSIX)
// Find the renderer before creating the channel so if this fails early we
// return without creating the channel.
- FilePath renderer_path = ChildProcessHost::GetChildPath(
- renderer_prefix.empty());
+ FilePath renderer_path =
+ ChildProcessHost::GetChildPath(renderer_prefix.empty());
if (renderer_path.empty())
return false;
diff --git a/chrome/browser/utility_process_host.cc b/chrome/browser/utility_process_host.cc
index 7b6772e..e49df71 100644
--- a/chrome/browser/utility_process_host.cc
+++ b/chrome/browser/utility_process_host.cc
@@ -109,7 +109,7 @@ bool UtilityProcessHost::StartProcess(const FilePath& exposed_dir) {
if (has_cmd_prefix) {
// launch the utility child process with some prefix (usually "xterm -e gdb
// --args").
- cmd_line->PrependWrapper(browser_command_line.GetSwitchValue(
+ cmd_line->PrependWrapper(browser_command_line.GetSwitchValueNative(
switches::kUtilityCmdPrefix));
}
diff --git a/chrome/browser/worker_host/worker_process_host.cc b/chrome/browser/worker_host/worker_process_host.cc
index 8b3ac2d..2c4cf7f 100644
--- a/chrome/browser/worker_host/worker_process_host.cc
+++ b/chrome/browser/worker_host/worker_process_host.cc
@@ -143,16 +143,15 @@ bool WorkerProcessHost::Init() {
if (value.empty() || value == switches::kWorkerProcess) {
// launches a new xterm, and runs the worker process in gdb, reading
// optional commands from gdb_chrome file in the working directory.
- cmd_line->PrependWrapper(L"xterm -e gdb -x gdb_chrome --args");
+ cmd_line->PrependWrapper("xterm -e gdb -x gdb_chrome --args");
}
}
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kRendererCmdPrefix)) {
- const std::wstring prefix =
- CommandLine::ForCurrentProcess()->GetSwitchValue(
- switches::kRendererCmdPrefix);
- cmd_line->PrependWrapper(prefix);
+ cmd_line->PrependWrapper(
+ CommandLine::ForCurrentProcess()->GetSwitchValueNative(
+ switches::kRendererCmdPrefix));
}
#endif
diff --git a/chrome/browser/zygote_host_linux.cc b/chrome/browser/zygote_host_linux.cc
index cc91bd2..be0ce5a 100644
--- a/chrome/browser/zygote_host_linux.cc
+++ b/chrome/browser/zygote_host_linux.cc
@@ -81,9 +81,8 @@ void ZygoteHost::Init(const std::string& sandbox_cmd) {
const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
if (browser_command_line.HasSwitch(switches::kZygoteCmdPrefix)) {
- const std::wstring prefix =
- browser_command_line.GetSwitchValue(switches::kZygoteCmdPrefix);
- cmd_line.PrependWrapper(prefix);
+ cmd_line.PrependWrapper(
+ browser_command_line.GetSwitchValueNative(switches::kZygoteCmdPrefix));
}
// Append any switches from the browser process that need to be forwarded on
// to the zygote/renderers.
@@ -113,7 +112,7 @@ void ZygoteHost::Init(const std::string& sandbox_cmd) {
(st.st_mode & S_ISUID) &&
(st.st_mode & S_IXOTH)) {
using_suid_sandbox_ = true;
- cmd_line.PrependWrapper(ASCIIToWide(sandbox_binary_.c_str()));
+ cmd_line.PrependWrapper(sandbox_binary_);
SaveSUIDUnsafeEnvironmentVariables();
} else {
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index 48849a3..bef3801 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -1209,7 +1209,7 @@ bool UITestBase::LaunchBrowserHelper(const CommandLine& arguments,
// commandline with a special prefix to invoke the special environment.
const char* browser_wrapper = getenv("BROWSER_WRAPPER");
if (browser_wrapper) {
- command_line.PrependWrapper(ASCIIToWide(browser_wrapper));
+ command_line.PrependWrapper(browser_wrapper);
LOG(INFO) << "BROWSER_WRAPPER was set, prefixing command_line with "
<< browser_wrapper;
}