summaryrefslogtreecommitdiffstats
path: root/base/command_line.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-30 02:14:22 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-30 02:14:22 +0000
commitd420c31e107cd932582a4a8add0ce2676e4b52da (patch)
tree0e666287eac5bbd12cc709a932a84d4bb852964b /base/command_line.cc
parentf6215a232664e488b9c6c66e191c6507d377edcb (diff)
downloadchromium_src-d420c31e107cd932582a4a8add0ce2676e4b52da.zip
chromium_src-d420c31e107cd932582a4a8add0ce2676e4b52da.tar.gz
chromium_src-d420c31e107cd932582a4a8add0ce2676e4b52da.tar.bz2
Add an AppendSwitchASCII to CommandLine, and convert a test to it.
I'm removing all the AppendSwitchWithValue() users due to wstrings, and this is one caller. Since fixing this one caller requires touching many files, I thought I'd isolate this change from the other WithValue->ASCII conversions. Review URL: http://codereview.chromium.org/2878065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54257 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/command_line.cc')
-rw-r--r--base/command_line.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/base/command_line.cc b/base/command_line.cc
index 19f508a..b94e837 100644
--- a/base/command_line.cc
+++ b/base/command_line.cc
@@ -383,6 +383,11 @@ void CommandLine::AppendSwitch(const std::string& switch_string) {
switches_[switch_string] = L"";
}
+void CommandLine::AppendSwitchASCII(const std::string& switch_string,
+ const std::string& value_string) {
+ AppendSwitchNative(switch_string, ASCIIToWide(value_string));
+}
+
void CommandLine::AppendSwitchWithValue(const std::string& switch_string,
const std::wstring& value_string) {
AppendSwitchNative(switch_string, value_string);
@@ -453,6 +458,11 @@ void CommandLine::AppendSwitchNative(const std::string& switch_string,
switches_[switch_string] = value;
}
+void CommandLine::AppendSwitchASCII(const std::string& switch_string,
+ const std::string& value_string) {
+ AppendSwitchNative(switch_string, value_string);
+}
+
void CommandLine::AppendSwitchWithValue(const std::string& switch_string,
const std::wstring& value_string) {
// TODO(evanm): deprecate.
@@ -493,11 +503,6 @@ void CommandLine::AppendSwitchPath(const std::string& switch_string,
AppendSwitchNative(switch_string, path.value());
}
-void CommandLine::AppendSwitchWithValue(const std::string& switch_string,
- const std::string& value_string) {
- AppendSwitchWithValue(switch_string, ASCIIToWide(value_string));
-}
-
void CommandLine::CopySwitchesFrom(const CommandLine& source,
const char* const switches[],
size_t count) {