| Index: base/command_line.cc
|
| diff --git a/base/command_line.cc b/base/command_line.cc
|
| index 835ad9d93e56338cad3d61876cdd98ace28d1610..9b5824e629aca2cc4b872ca79fcf4a3552d73580 100644
|
| --- a/base/command_line.cc
|
| +++ b/base/command_line.cc
|
| @@ -352,37 +352,10 @@ std::string CommandLine::command_line_string() const {
|
| }
|
| #endif
|
|
|
| -// static
|
| -std::wstring CommandLine::PrefixedSwitchString(
|
| - const std::string& switch_string) {
|
| -#if defined(OS_WIN)
|
| - return kSwitchPrefixes[0] + ASCIIToWide(switch_string);
|
| -#else
|
| - return ASCIIToWide(kSwitchPrefixes[0] + switch_string);
|
| -#endif
|
| -}
|
| -
|
| -// static
|
| -std::wstring CommandLine::PrefixedSwitchStringWithValue(
|
| - const std::string& switch_string, const std::wstring& value_string) {
|
| - if (value_string.empty()) {
|
| - return PrefixedSwitchString(switch_string);
|
| - }
|
| -
|
| - return PrefixedSwitchString(switch_string +
|
| -#if defined(OS_WIN)
|
| - WideToASCII(kSwitchValueSeparator)
|
| -#else
|
| - kSwitchValueSeparator
|
| -#endif
|
| - ) + value_string;
|
| -}
|
| -
|
| #if defined(OS_WIN)
|
| void CommandLine::AppendSwitch(const std::string& switch_string) {
|
| - std::wstring prefixed_switch_string = PrefixedSwitchString(switch_string);
|
| command_line_string_.append(L" ");
|
| - command_line_string_.append(prefixed_switch_string);
|
| + command_line_string_.append(kSwitchPrefixes[0] + ASCIIToWide(switch_string));
|
| switches_[switch_string] = L"";
|
| }
|
|
|
| @@ -408,7 +381,9 @@ void CommandLine::AppendSwitchNative(const std::string& switch_string,
|
| }
|
|
|
| std::wstring combined_switch_string =
|
| - PrefixedSwitchStringWithValue(switch_string, value_string_edit);
|
| + kSwitchPrefixes[0] + ASCIIToWide(switch_string);
|
| + if (!value_string_edit.empty())
|
| + combined_switch_string += kSwitchValueSeparator + value_string_edit;
|
|
|
| command_line_string_.append(L" ");
|
| command_line_string_.append(combined_switch_string);
|
| @@ -453,8 +428,10 @@ void CommandLine::AppendSwitch(const std::string& switch_string) {
|
|
|
| void CommandLine::AppendSwitchNative(const std::string& switch_string,
|
| const std::string& value) {
|
| - argv_.push_back(kSwitchPrefixes[0] + switch_string +
|
| - kSwitchValueSeparator + value);
|
| + std::string combined_switch_string = kSwitchPrefixes[0] + switch_string;
|
| + if (!value.empty())
|
| + combined_switch_string += kSwitchValueSeparator + value;
|
| + argv_.push_back(combined_switch_string);
|
| switches_[switch_string] = value;
|
| }
|
|
|
|
|