summaryrefslogtreecommitdiffstats
path: root/base/command_line.h
diff options
context:
space:
mode:
authorevanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-12 01:14:37 +0000
committerevanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-12 01:14:37 +0000
commit1a48f315b0ca5c26c4446070edfb5842ed06c8c7 (patch)
tree5049df6b1a7ffe7da8ef72996a313622c286d4f2 /base/command_line.h
parent59202e06966c69bcde5ea89241a5816e716017cc (diff)
downloadchromium_src-1a48f315b0ca5c26c4446070edfb5842ed06c8c7.zip
chromium_src-1a48f315b0ca5c26c4446070edfb5842ed06c8c7.tar.gz
chromium_src-1a48f315b0ca5c26c4446070edfb5842ed06c8c7.tar.bz2
Get rid of the command-line hacks for posix platforms.
(They didn't work at all on Linux anyway.) git-svn-id: svn://svn.chromium.org/chrome/trunk/src@690 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/command_line.h')
-rw-r--r--base/command_line.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/base/command_line.h b/base/command_line.h
index 4f24f26..72cf8c9 100644
--- a/base/command_line.h
+++ b/base/command_line.h
@@ -55,11 +55,17 @@ class CommandLine {
// The program name is assumed to be the first item in the string.
CommandLine(const std::wstring& command_line);
#elif defined(OS_POSIX)
- CommandLine(int argc, const char** argv);
+ CommandLine(int argc, char** argv);
#endif
~CommandLine();
+ // On non-Windows platforms, main() must call SetArgcArgv() before accessing
+ // any members of this class.
+ // On Windows, this call is a no-op (we instead parse GetCommandLineW()
+ // directly) because we don't trust the CRT's parsing of the command line.
+ static void SetArgcArgv(int argc, char** argv);
+
// Returns true if this command line contains the given switch.
// (Switch names are case-insensitive.)
bool HasSwitch(const std::wstring& switch_string) const;