summaryrefslogtreecommitdiffstats
path: root/chrome/app/chrome_dll_main.cc
diff options
context:
space:
mode:
authormdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-10 18:02:17 +0000
committermdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-10 18:02:17 +0000
commit7f113f39afed41b39d5c937039879c5d822c6b5e (patch)
treedb014b39bf9cdc6daf6aae947a16c4c5ff5d1721 /chrome/app/chrome_dll_main.cc
parente4e3caed74ecfe1ef1da4c7ba8fc076f59a53ef1 (diff)
downloadchromium_src-7f113f39afed41b39d5c937039879c5d822c6b5e.zip
chromium_src-7f113f39afed41b39d5c937039879c5d822c6b5e.tar.gz
chromium_src-7f113f39afed41b39d5c937039879c5d822c6b5e.tar.bz2
Linux: set the process title (that shows in "ps" etc.) of renderers correctly when using the zygote.
BUG=none TEST=none Review URL: http://codereview.chromium.org/196009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25877 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/chrome_dll_main.cc')
-rw-r--r--chrome/app/chrome_dll_main.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc
index 1512aef..0ec809c 100644
--- a/chrome/app/chrome_dll_main.cc
+++ b/chrome/app/chrome_dll_main.cc
@@ -97,7 +97,7 @@ DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance,
#elif defined(OS_POSIX)
extern "C" {
__attribute__((visibility("default")))
-int ChromeMain(int argc, const char** argv);
+int ChromeMain(int argc, char** argv);
}
#endif
@@ -298,7 +298,7 @@ DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance,
sandbox::SandboxInterfaceInfo* sandbox_info,
TCHAR* command_line) {
#elif defined(OS_POSIX)
-int ChromeMain(int argc, const char** argv) {
+int ChromeMain(int argc, char** argv) {
#endif
#if defined(OS_MACOSX)
@@ -343,6 +343,10 @@ int ChromeMain(int argc, const char** argv) {
#else
CommandLine::Init(argc, argv);
#endif
+#if defined(OS_LINUX)
+ // Set up CommandLine::SetProcTitle() support.
+ CommandLine::SetTrueArgv(argv);
+#endif
const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
std::wstring process_type =
@@ -594,8 +598,8 @@ int ChromeMain(int argc, const char** argv) {
// definitely harmless, so retained as a reminder of this
// requirement for gconf.
g_type_init();
- // gtk_init() can change |argc| and |argv|, but nobody else uses them.
- gtk_init(&argc, const_cast<char***>(&argv));
+ // gtk_init() can change |argc| and |argv|.
+ gtk_init(&argc, &argv);
SetUpGLibLogHandler();
#endif