Index: base/command_line.h |
=================================================================== |
--- base/command_line.h (revision 3369) |
+++ base/command_line.h (working copy) |
@@ -32,6 +32,7 @@ |
CommandLine(const std::wstring& command_line); |
#elif defined(OS_POSIX) |
CommandLine(int argc, const char* const* argv); |
+ CommandLine(const std::vector<std::string>& argv); |
#endif |
~CommandLine(); |
@@ -67,6 +68,11 @@ |
// Simply returns the original command line string. |
std::wstring command_line_string() const; |
+#if defined(OS_POSIX) |
+ // Returns the original command line string as a vector of c-strings. |
Evan Martin
2008/10/15 21:54:40
This comment is no longer accurate. ("c-strings"
|
+ const std::vector<std::string>& argv() const; |
+#endif |
+ |
// Returns the program part of the command line string (the first item). |
std::wstring program() const; |
@@ -80,6 +86,16 @@ |
// Treat everything after this argument as loose parameters. |
static const wchar_t kSwitchTerminator[]; |
+ // Return a copy of the string prefixed with a switch prefix. |
+ // Used internally. |
+ static std::wstring PrefixedSwitchString(const std::wstring& switch_string); |
+ |
+ // Return a copy of the string prefixed with a switch prefix, |
+ // and appended with the given value. Used internally. |
+ static std::wstring PrefixedSwitchStringWithValue( |
+ const std::wstring& switch_string, |
+ const std::wstring& value_string); |
+ |
// 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, |