diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-13 01:47:01 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-13 01:47:01 +0000 |
commit | 75e10302d5eb778d012a2c8b054bef8f1a67193a (patch) | |
tree | 68107e4e1e736c7cde95e22bab0be4610a0d35c2 /base/command_line.cc | |
parent | d144b0590e00629570c3f729b1d0baf048dc1d45 (diff) | |
download | chromium_src-75e10302d5eb778d012a2c8b054bef8f1a67193a.zip chromium_src-75e10302d5eb778d012a2c8b054bef8f1a67193a.tar.gz chromium_src-75e10302d5eb778d012a2c8b054bef8f1a67193a.tar.bz2 |
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
Diffstat (limited to 'base/command_line.cc')
-rw-r--r-- | base/command_line.cc | 13 |
1 files changed, 6 insertions, 7 deletions
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<char**>(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() { |