Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3207)

Unified Diff: base/command_line.h

Issue 24613003: Allow typing label names on Windows by not treating things that start with slashes as arguments rat… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: const removed Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/command_line.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/command_line.h
diff --git a/base/command_line.h b/base/command_line.h
index ed46c4f0d13c34778d390e86827b8e6db307d186..81bd4b73761bb0bab590665cd108d2fc9cb6311f 100644
--- a/base/command_line.h
+++ b/base/command_line.h
@@ -53,6 +53,17 @@ class BASE_EXPORT CommandLine {
~CommandLine();
+#if defined(OS_WIN)
+ // By default this class will treat command-line arguments beginning with
+ // slashes as switches on Windows, but not other platforms.
+ //
+ // If this behavior is inappropriate for your application, you can call this
+ // function BEFORE initializing the current process' global command line
+ // object and the behavior will be the same as Posix systems (only hyphens
+ // begin switches, everything else will be an arg).
+ static void set_slash_is_not_a_switch();
+#endif
+
// Initialize the current process CommandLine singleton. On Windows, ignores
// its arguments (we instead parse GetCommandLineW() directly) because we
// don't trust the CRT's parsing of the command line, but it still must be
« no previous file with comments | « no previous file | base/command_line.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698