summaryrefslogtreecommitdiffstats
path: root/base/command_line.h
diff options
context:
space:
mode:
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;