From 75e10302d5eb778d012a2c8b054bef8f1a67193a Mon Sep 17 00:00:00 2001 From: "evan@chromium.org" Date: Tue, 13 Oct 2009 01:47:01 +0000 Subject: linux: drop linux-specific CommandLine function We can just call this from the appropriate constructor internally. Review URL: http://codereview.chromium.org/271051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28773 0039d316-1c4b-4281-b951-d872f2087c98 --- base/command_line.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'base/command_line.cc') diff --git a/base/command_line.cc b/base/command_line.cc index 84fa415..a1c2c1e 100644 --- a/base/command_line.cc +++ b/base/command_line.cc @@ -189,12 +189,18 @@ bool CommandLine::IsSwitch(const StringType& parameter_string, // static void CommandLine::Init(int argc, const char* const* argv) { + delete current_process_commandline_; current_process_commandline_ = new CommandLine; #if defined(OS_WIN) current_process_commandline_->ParseFromString(::GetCommandLineW()); #elif defined(OS_POSIX) current_process_commandline_->InitFromArgv(argc, argv); #endif + +#if defined(OS_LINUX) + if (argv) + setproctitle_init(const_cast(argv)); +#endif } #if defined(OS_LINUX) || defined(OS_FREEBSD) @@ -211,13 +217,6 @@ void CommandLine::SetProcTitle() { } setproctitle("%s", title.c_str()); } - -// static -void CommandLine::SetTrueArgv(char** argv) { -#if defined(OS_LINUX) - setproctitle_init(argv); -#endif -} #endif void CommandLine::Reset() { -- cgit v1.1