summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-30 22:35:33 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-30 22:35:33 +0000
commit0436fcd542e8ce436fe9395a64cc03fa369276b1 (patch)
tree089866b06c42ae4fa41b9d5b8a595c06603f3a57
parenta33cad2b626eef69aa54943c985f9ab030a8edb9 (diff)
downloadchromium_src-0436fcd542e8ce436fe9395a64cc03fa369276b1.zip
chromium_src-0436fcd542e8ce436fe9395a64cc03fa369276b1.tar.gz
chromium_src-0436fcd542e8ce436fe9395a64cc03fa369276b1.tar.bz2
Remove deprecated CommandLine API.
Cleaned up the final few callers, punting the remaining harder ones to TODOs. Review URL: http://codereview.chromium.org/3043033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54400 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/command_line.cc12
-rw-r--r--base/command_line.h9
-rw-r--r--chrome/browser/browser_uitest.cc3
-rw-r--r--chrome/browser/sessions/session_restore_uitest.cc3
-rw-r--r--chrome/nacl/broker_thread.cc5
-rw-r--r--net/tools/dump_cache/dump_cache.cc3
6 files changed, 7 insertions, 28 deletions
diff --git a/base/command_line.cc b/base/command_line.cc
index b94e837..de7870d 100644
--- a/base/command_line.cc
+++ b/base/command_line.cc
@@ -388,11 +388,6 @@ void CommandLine::AppendSwitchASCII(const std::string& switch_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);
-}
-
void CommandLine::AppendSwitchNative(const std::string& switch_string,
const std::wstring& value_string) {
std::wstring value_string_edit;
@@ -463,13 +458,6 @@ void CommandLine::AppendSwitchASCII(const std::string& switch_string,
AppendSwitchNative(switch_string, value_string);
}
-void CommandLine::AppendSwitchWithValue(const std::string& switch_string,
- const std::wstring& value_string) {
- // TODO(evanm): deprecate.
- std::string mb_value = base::SysWideToNativeMB(value_string);
- AppendSwitchNative(switch_string, mb_value);
-}
-
void CommandLine::AppendLooseValue(const std::wstring& value) {
argv_.push_back(base::SysWideToNativeMB(value));
}
diff --git a/base/command_line.h b/base/command_line.h
index ae05021..2178bdf 100644
--- a/base/command_line.h
+++ b/base/command_line.h
@@ -165,15 +165,6 @@ class CommandLine {
void AppendSwitchASCII(const std::string& switch_string,
const std::string& value);
- // Append a switch and value to the command line.
- // TODO(evanm): remove all AppendSwitchWithValue() instances.
- void AppendSwitchWithValue(const std::string& switch_string,
- const std::wstring& value_string);
- void AppendSwitchWithValue(const std::string& switch_string,
- const std::string& value_string) {
- AppendSwitchASCII(switch_string, value_string);
- }
-
// Append a loose value to the command line.
void AppendLooseValue(const std::wstring& value);
diff --git a/chrome/browser/browser_uitest.cc b/chrome/browser/browser_uitest.cc
index dce449d..de569ca 100644
--- a/chrome/browser/browser_uitest.cc
+++ b/chrome/browser/browser_uitest.cc
@@ -311,8 +311,7 @@ class AppModeTest : public UITest {
test_file = test_file.AppendASCII("title1.html");
GURL test_file_url(net::FilePathToFileURL(test_file));
- launch_arguments_.AppendSwitchWithValue(switches::kApp,
- test_file_url.spec());
+ launch_arguments_.AppendSwitchASCII(switches::kApp, test_file_url.spec());
}
};
diff --git a/chrome/browser/sessions/session_restore_uitest.cc b/chrome/browser/sessions/session_restore_uitest.cc
index 5b48fa1..655fd09 100644
--- a/chrome/browser/sessions/session_restore_uitest.cc
+++ b/chrome/browser/sessions/session_restore_uitest.cc
@@ -420,8 +420,7 @@ TEST_F(SessionRestoreUITest,
include_testing_id_ = false;
clear_profile_ = false;
CommandLine app_launch_arguments = launch_arguments_;
- app_launch_arguments.AppendSwitchWithValue(switches::kApp,
- UTF8ToWide(url2_.spec()));
+ app_launch_arguments.AppendSwitchASCII(switches::kApp, url2_.spec());
LaunchAnotherBrowserBlockUntilClosed(app_launch_arguments);
ASSERT_TRUE(automation()->WaitForWindowCountToBecome(2));
diff --git a/chrome/nacl/broker_thread.cc b/chrome/nacl/broker_thread.cc
index 04bebda..b0cdba5 100644
--- a/chrome/nacl/broker_thread.cc
+++ b/chrome/nacl/broker_thread.cc
@@ -52,8 +52,9 @@ void NaClBrokerThread::OnLaunchLoaderThroughBroker(
cmd_line->AppendSwitchASCII(switches::kProcessType,
switches::kNaClLoaderProcess);
- cmd_line->AppendSwitchWithValue(switches::kProcessChannelID,
- loader_channel_id);
+ // TODO(evanm): remove needless usage of wstring for channel id.
+ cmd_line->AppendSwitchASCII(switches::kProcessChannelID,
+ WideToASCII(loader_channel_id));
loader_process = sandbox::StartProcessWithAccess(cmd_line, FilePath());
if (loader_process) {
diff --git a/net/tools/dump_cache/dump_cache.cc b/net/tools/dump_cache/dump_cache.cc
index 29caefda..a8a477f 100644
--- a/net/tools/dump_cache/dump_cache.cc
+++ b/net/tools/dump_cache/dump_cache.cc
@@ -95,7 +95,8 @@ int LaunchSlave(const CommandLine& command_line,
if (do_upgrade || do_convert_to_text)
new_command_line.AppendSwitch(kSlave);
- new_command_line.AppendSwitchWithValue(kPipe, pipe_number);
+ // TODO(evanm): remove needless usage of wstring from here and elsewhere.
+ new_command_line.AppendSwitchASCII(kPipe, WideToASCII(pipe_number));
if (!base::LaunchApp(new_command_line, false, false, NULL)) {
printf("Unable to launch the needed version of this tool: %ls\n",
new_program.c_str());