Index: base/command_line.h |
=================================================================== |
--- base/command_line.h (revision 8989) |
+++ base/command_line.h (working copy) |
@@ -1,16 +1,17 @@ |
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-// |
+ |
// This file contains a class that can be used to extract the salient |
// elements of a command line in a relatively lightweight manner. |
// Switches can optionally have a value attached using an equals sign, |
// as in "-switch=value". Arguments that aren't prefixed with a |
// switch prefix are considered "loose parameters". Switch names |
-// are case-insensitive. |
+// are case-insensitive. An argument of "--" will terminate switch parsing, |
+// causing everything after to be considered as loose parameters. |
-#ifndef BASE_COMMAND_LINE_H__ |
-#define BASE_COMMAND_LINE_H__ |
+#ifndef BASE_COMMAND_LINE_H_ |
+#define BASE_COMMAND_LINE_H_ |
#include <map> |
#include <string> |
@@ -76,6 +77,9 @@ |
// The string that's used to separate switches from their values. |
static const wchar_t kSwitchValueSeparator[]; |
+ // Treat everything after this argument as loose parameters. |
+ static const wchar_t kSwitchTerminator[]; |
+ |
// Appends the given switch string (preceded by a space and a switch |
// prefix) to the given string. |
static void AppendSwitch(std::wstring* command_line_string, |
@@ -101,5 +105,4 @@ |
DISALLOW_EVIL_CONSTRUCTORS(CommandLine); |
}; |
-#endif // BASE_COMMAND_LINE_H__ |
- |
+#endif // BASE_COMMAND_LINE_H_ |