Index: base/command_line.h |
diff --git a/base/command_line.h b/base/command_line.h |
index fd06e61c774ce0c13a2ef03817a5a8d7ee0561dc..b4555597579b506ca1dd4b283a8259fffcf906d7 100644 |
--- a/base/command_line.h |
+++ b/base/command_line.h |
@@ -94,15 +94,23 @@ class BASE_EXPORT CommandLine { |
void InitFromArgv(int argc, const CharType* const* argv); |
void InitFromArgv(const StringVector& argv); |
- // Constructs and returns the represented command line string. |
- // CAUTION! This should be avoided on POSIX because quoting behavior is |
+ // Constructs and returns the represented command line string. If the optional |
+ // |quote_placeholders| is true, assumes the command line contains |
+ // placeholders (eg, %1) and quotes any program or argument with a '%' in it. |
+ // CAUTION! This method should be avoided on POSIX because quoting behavior is |
// unclear. |
- StringType GetCommandLineString() const; |
- |
- // Constructs and returns the represented arguments string. |
- // CAUTION! This should be avoided on POSIX because quoting behavior is |
+ StringType GetCommandLineString() const { |
+ return GetCommandLineString(false); |
+ } |
+ StringType GetCommandLineString(bool quote_placeholders) const; |
+ |
+ // Constructs and returns the represented arguments string. If the optional |
+ // |quote_placeholders| is true, assumes the command line contains |
+ // placeholders (eg, %1) and quotes any argument with a '%' in it. |
+ // CAUTION! This method should be avoided on POSIX because quoting behavior is |
// unclear. |
- StringType GetArgumentsString() const; |
+ StringType GetArgumentsString() const { return GetArgumentsString(false); } |
+ StringType GetArgumentsString(bool quote_placeholders) const; |
Mark Mentovai
2014/09/25 03:40:43
Overloading’s discouraged.
Let’s just give this o
Matt Giuca
2014/09/25 04:35:30
Done.
|
// Returns the original command line string as a vector of strings. |
const StringVector& argv() const { return argv_; } |