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

Unified Diff: base/command_line.h

Issue 7249: Store the command line in a more convenient format on non-windows platforms. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 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
===================================================================
--- 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,
« 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