summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-30 05:59:57 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-30 05:59:57 +0000
commit05076ba206e040b31fdb41a39cc10a2ecc4adf9d (patch)
tree58c20da4c63a0384c2241b5ddd676a6b7bddf927
parent4c4aae74e9f32f7ff06226b3d5e2fd1723127913 (diff)
downloadchromium_src-05076ba206e040b31fdb41a39cc10a2ecc4adf9d.zip
chromium_src-05076ba206e040b31fdb41a39cc10a2ecc4adf9d.tar.gz
chromium_src-05076ba206e040b31fdb41a39cc10a2ecc4adf9d.tar.bz2
Convert a bunch of easy AppendSwitchWithValue to *ASCII.
For this patch, I skipped over any instance where it wasn't a nearly trivial change. Review URL: http://codereview.chromium.org/3069014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54285 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/command_line_unittest.cc18
-rw-r--r--chrome/browser/browser_child_process_host.cc12
-rw-r--r--chrome/browser/browser_process_impl.cc2
-rw-r--r--chrome/browser/browser_shutdown.cc2
-rw-r--r--chrome/browser/chromeos/login/login_browsertest.cc7
-rw-r--r--chrome/browser/chromeos/login/screen_locker_browsertest.cc2
-rw-r--r--chrome/browser/command_line_pref_store_unittest.cc16
-rw-r--r--chrome/browser/configuration_policy_pref_store_unittest.cc24
-rw-r--r--chrome/browser/extensions/extension_browsertest.cc6
-rw-r--r--chrome/browser/first_run/first_run_gtk.cc12
-rw-r--r--chrome/browser/first_run/first_run_win.cc13
-rw-r--r--chrome/browser/gpu_process_host.cc6
-rw-r--r--chrome/browser/importer/firefox_importer_unittest_utils_mac.cc2
-rw-r--r--chrome/browser/locale_tests_uitest.cc6
-rw-r--r--chrome/browser/nacl_host/nacl_broker_host_win.cc6
-rw-r--r--chrome/browser/nacl_host/nacl_process_host.cc6
-rw-r--r--chrome/browser/net/chrome_url_request_context_unittest.cc21
-rw-r--r--chrome/browser/plugin_process_host.cc5
-rw-r--r--chrome/browser/profile_import_process_host.cc6
-rw-r--r--chrome/browser/profile_manager_unittest.cc2
-rw-r--r--chrome/browser/renderer_host/browser_render_process_host.cc12
-rw-r--r--chrome/browser/sanity_uitest.cc2
-rw-r--r--chrome/browser/utility_process_host.cc8
-rw-r--r--chrome/browser/worker_host/worker_process_host.cc11
-rw-r--r--chrome/browser/zygote_host_linux.cc3
-rw-r--r--chrome/common/debug_flags.cc5
-rw-r--r--chrome/common/sandbox_policy.cc2
-rw-r--r--chrome/nacl/broker_thread.cc8
-rw-r--r--chrome/renderer/external_extension_uitest.cc3
-rw-r--r--chrome/renderer/renderer_main_unittest.cc3
-rw-r--r--chrome/service/service_utility_process_host.cc5
-rw-r--r--chrome/test/automation/automation_proxy_uitest.cc3
-rw-r--r--chrome/test/in_process_browser_test.cc2
-rw-r--r--chrome/test/live_sync/live_sync_test.cc8
-rw-r--r--chrome/test/nacl/nacl_test.cc2
-rw-r--r--chrome/test/page_cycler/page_cycler_test.cc4
-rw-r--r--chrome/test/plugin/plugin_test.cpp4
-rw-r--r--chrome/test/tab_switching/tab_switching_test.cc2
-rw-r--r--chrome/test/test_launcher/out_of_proc_test_runner.cc4
-rw-r--r--chrome/test/ui/pepper_uitest.cc2
-rw-r--r--chrome/test/ui/sandbox_uitests.cc4
-rw-r--r--chrome/test/ui/ui_test.cc10
-rw-r--r--chrome/test/ui_test_utils.cc4
-rw-r--r--chrome_frame/chrome_frame_automation.cc4
-rw-r--r--chrome_frame/chrome_launcher_unittest.cc2
-rw-r--r--chrome_frame/chrome_tab.cc4
-rw-r--r--chrome_frame/test/perf/chrome_frame_perftest.cc2
47 files changed, 141 insertions, 156 deletions
diff --git a/base/command_line_unittest.cc b/base/command_line_unittest.cc
index c3fb04c..e44f240 100644
--- a/base/command_line_unittest.cc
+++ b/base/command_line_unittest.cc
@@ -101,24 +101,24 @@ TEST(CommandLineTest, EmptyString) {
TEST(CommandLineTest, AppendSwitches) {
std::string switch1 = "switch1";
std::string switch2 = "switch2";
- std::wstring value = L"value";
+ std::string value = "value";
std::string switch3 = "switch3";
- std::wstring value3 = L"a value with spaces";
+ std::string value3 = "a value with spaces";
std::string switch4 = "switch4";
- std::wstring value4 = L"\"a value with quotes\"";
+ std::string value4 = "\"a value with quotes\"";
CommandLine cl(FilePath(FILE_PATH_LITERAL("Program")));
cl.AppendSwitch(switch1);
- cl.AppendSwitchWithValue(switch2, value);
- cl.AppendSwitchWithValue(switch3, value3);
- cl.AppendSwitchWithValue(switch4, value4);
+ cl.AppendSwitchASCII(switch2, value);
+ cl.AppendSwitchASCII(switch3, value3);
+ cl.AppendSwitchASCII(switch4, value4);
EXPECT_TRUE(cl.HasSwitch(switch1));
EXPECT_TRUE(cl.HasSwitch(switch2));
- EXPECT_EQ(value, cl.GetSwitchValue(switch2));
+ EXPECT_EQ(value, cl.GetSwitchValueASCII(switch2));
EXPECT_TRUE(cl.HasSwitch(switch3));
- EXPECT_EQ(value3, cl.GetSwitchValue(switch3));
+ EXPECT_EQ(value3, cl.GetSwitchValueASCII(switch3));
EXPECT_TRUE(cl.HasSwitch(switch4));
- EXPECT_EQ(value4, cl.GetSwitchValue(switch4));
+ EXPECT_EQ(value4, cl.GetSwitchValueASCII(switch4));
}
diff --git a/chrome/browser/browser_child_process_host.cc b/chrome/browser/browser_child_process_host.cc
index d700475..8dbf668 100644
--- a/chrome/browser/browser_child_process_host.cc
+++ b/chrome/browser/browser_child_process_host.cc
@@ -88,15 +88,15 @@ void BrowserChildProcessHost::SetCrashReporterCommandLine(
#if defined(USE_LINUX_BREAKPAD)
const bool unattended = (getenv(env_vars::kHeadless) != NULL);
if (unattended || GoogleUpdateSettings::GetCollectStatsConsent()) {
- command_line->AppendSwitchWithValue(switches::kEnableCrashReporter,
- ASCIIToWide(google_update::posix_guid +
- "," +
- base::GetLinuxDistro()));
+ command_line->AppendSwitchASCII(switches::kEnableCrashReporter,
+ google_update::posix_guid +
+ "," +
+ base::GetLinuxDistro());
}
#elif defined(OS_MACOSX)
if (GoogleUpdateSettings::GetCollectStatsConsent())
- command_line->AppendSwitchWithValue(switches::kEnableCrashReporter,
- ASCIIToWide(google_update::posix_guid));
+ command_line->AppendSwitchASCII(switches::kEnableCrashReporter,
+ google_update::posix_guid);
#endif // OS_MACOSX
}
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index cb3ddc9..af3808f 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -745,7 +745,7 @@ void BrowserProcessImpl::RestartPersistentInstance() {
switches.begin(); i != switches.end(); ++i) {
CommandLine::StringType switch_value = i->second;
if (switch_value.length() > 0) {
- new_cl->AppendSwitchWithValue(i->first, i->second);
+ new_cl->AppendSwitchNative(i->first, i->second);
} else {
new_cl->AppendSwitch(i->first);
}
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc
index 9646ad8..99f3c69 100644
--- a/chrome/browser/browser_shutdown.cc
+++ b/chrome/browser/browser_shutdown.cc
@@ -181,7 +181,7 @@ void Shutdown() {
switches.begin(); i != switches.end(); ++i) {
CommandLine::StringType switch_value = i->second;
if (!switch_value.empty())
- new_cl->AppendSwitchWithValue(i->first, i->second);
+ new_cl->AppendSwitchNative(i->first, i->second);
else
new_cl->AppendSwitch(i->first);
}
diff --git a/chrome/browser/chromeos/login/login_browsertest.cc b/chrome/browser/chromeos/login/login_browsertest.cc
index dd89fb3..a4c4804 100644
--- a/chrome/browser/chromeos/login/login_browsertest.cc
+++ b/chrome/browser/chromeos/login/login_browsertest.cc
@@ -81,9 +81,8 @@ class LoginUserTest : public LoginTestBase {
}
virtual void SetUpCommandLine(CommandLine* command_line) {
- command_line->AppendSwitchWithValue(
- switches::kLoginUser, "TestUser@gmail.com");
- command_line->AppendSwitchWithValue(switches::kLoginProfile, "user");
+ command_line->AppendSwitchASCII(switches::kLoginUser, "TestUser@gmail.com");
+ command_line->AppendSwitchASCII(switches::kLoginProfile, "user");
command_line->AppendSwitch(switches::kNoFirstRun);
}
};
@@ -96,7 +95,7 @@ class LoginProfileTest : public LoginTestBase {
}
virtual void SetUpCommandLine(CommandLine* command_line) {
- command_line->AppendSwitchWithValue(switches::kLoginProfile, "user");
+ command_line->AppendSwitchASCII(switches::kLoginProfile, "user");
command_line->AppendSwitch(switches::kNoFirstRun);
}
};
diff --git a/chrome/browser/chromeos/login/screen_locker_browsertest.cc b/chrome/browser/chromeos/login/screen_locker_browsertest.cc
index a01bbd7..f3354a6 100644
--- a/chrome/browser/chromeos/login/screen_locker_browsertest.cc
+++ b/chrome/browser/chromeos/login/screen_locker_browsertest.cc
@@ -141,7 +141,7 @@ class ScreenLockerTest : public CrosInProcessBrowserTest {
}
virtual void SetUpCommandLine(CommandLine* command_line) {
- command_line->AppendSwitchWithValue(switches::kLoginProfile, "user");
+ command_line->AppendSwitchASCII(switches::kLoginProfile, "user");
command_line->AppendSwitch(switches::kNoFirstRun);
}
diff --git a/chrome/browser/command_line_pref_store_unittest.cc b/chrome/browser/command_line_pref_store_unittest.cc
index eb5dab4..115ab1d 100644
--- a/chrome/browser/command_line_pref_store_unittest.cc
+++ b/chrome/browser/command_line_pref_store_unittest.cc
@@ -32,7 +32,7 @@ static const wchar_t* unknown_string = L"unknown_other_switch";
// Tests a simple string pref on the command line.
TEST(CommandLinePrefStoreTest, SimpleStringPref) {
CommandLine cl(CommandLine::ARGUMENTS_ONLY);
- cl.AppendSwitchWithValue(switches::kLang, "hi-MOM");
+ cl.AppendSwitchASCII(switches::kLang, "hi-MOM");
CommandLinePrefStore store(&cl);
EXPECT_EQ(store.ReadPrefs(), PrefStore::PREF_READ_ERROR_NONE);
@@ -57,7 +57,7 @@ TEST(CommandLinePrefStoreTest, SimpleBooleanPref) {
TEST(CommandLinePrefStoreTest, NoPrefs) {
CommandLine cl(CommandLine::ARGUMENTS_ONLY);
cl.AppendSwitch(WideToASCII(unknown_string));
- cl.AppendSwitchWithValue(WideToASCII(unknown_bool), "a value");
+ cl.AppendSwitchASCII(WideToASCII(unknown_bool), "a value");
CommandLinePrefStore store(&cl);
EXPECT_EQ(store.ReadPrefs(), PrefStore::PREF_READ_ERROR_NONE);
@@ -75,9 +75,9 @@ TEST(CommandLinePrefStoreTest, MultipleSwitches) {
CommandLine cl(CommandLine::ARGUMENTS_ONLY);
cl.AppendSwitch(WideToASCII(unknown_string));
cl.AppendSwitch(switches::kProxyAutoDetect);
- cl.AppendSwitchWithValue(switches::kProxyServer, "proxy");
- cl.AppendSwitchWithValue(switches::kProxyBypassList, "list");
- cl.AppendSwitchWithValue(WideToASCII(unknown_bool), "a value");
+ cl.AppendSwitchASCII(switches::kProxyServer, "proxy");
+ cl.AppendSwitchASCII(switches::kProxyBypassList, "list");
+ cl.AppendSwitchASCII(WideToASCII(unknown_bool), "a value");
CommandLinePrefStore store(&cl);
EXPECT_EQ(store.ReadPrefs(), PrefStore::PREF_READ_ERROR_NONE);
@@ -121,9 +121,9 @@ TEST(CommandLinePrefStoreTest, ProxySwitchValidation) {
// All proxy switches except no-proxy.
CommandLine cl2(CommandLine::ARGUMENTS_ONLY);
cl2.AppendSwitch(switches::kProxyAutoDetect);
- cl2.AppendSwitchWithValue(switches::kProxyServer, "server");
- cl2.AppendSwitchWithValue(switches::kProxyPacUrl, "url");
- cl2.AppendSwitchWithValue(switches::kProxyBypassList, "list");
+ cl2.AppendSwitchASCII(switches::kProxyServer, "server");
+ cl2.AppendSwitchASCII(switches::kProxyPacUrl, "url");
+ cl2.AppendSwitchASCII(switches::kProxyBypassList, "list");
TestCommandLinePrefStore store4(&cl2);
EXPECT_EQ(store4.ReadPrefs(), PrefStore::PREF_READ_ERROR_NONE);
EXPECT_TRUE(store4.ProxySwitchesAreValid());
diff --git a/chrome/browser/configuration_policy_pref_store_unittest.cc b/chrome/browser/configuration_policy_pref_store_unittest.cc
index 0cac13f..44eb782 100644
--- a/chrome/browser/configuration_policy_pref_store_unittest.cc
+++ b/chrome/browser/configuration_policy_pref_store_unittest.cc
@@ -197,12 +197,12 @@ TEST_F(ConfigurationPolicyPrefStoreTest, TestSettingsProxyConfig) {
CommandLine command_line(unused_path);
command_line.AppendSwitch(switches::kNoProxyServer);
command_line.AppendSwitch(switches::kProxyAutoDetect);
- command_line.AppendSwitchWithValue(switches::kProxyPacUrl,
- "http://chromium.org/test.pac");
- command_line.AppendSwitchWithValue(switches::kProxyServer,
- "http://chromium2.org");
- command_line.AppendSwitchWithValue(switches::kProxyBypassList,
- "http://chromium3.org");
+ command_line.AppendSwitchASCII(switches::kProxyPacUrl,
+ "http://chromium.org/test.pac");
+ command_line.AppendSwitchASCII(switches::kProxyServer,
+ "http://chromium2.org");
+ command_line.AppendSwitchASCII(switches::kProxyBypassList,
+ "http://chromium3.org");
ConfigurationPolicyPrefStore store(&command_line, NULL);
EXPECT_EQ(store.ReadPrefs(), PrefStore::PREF_READ_ERROR_NONE);
@@ -231,12 +231,12 @@ TEST_F(ConfigurationPolicyPrefStoreTest, TestPolicyProxyConfigManualOverride) {
CommandLine command_line(unused_path);
command_line.AppendSwitch(switches::kNoProxyServer);
command_line.AppendSwitch(switches::kProxyAutoDetect);
- command_line.AppendSwitchWithValue(switches::kProxyPacUrl,
- "http://chromium.org/test.pac");
- command_line.AppendSwitchWithValue(switches::kProxyServer,
- "http://chromium.org");
- command_line.AppendSwitchWithValue(switches::kProxyBypassList,
- "http://chromium.org");
+ command_line.AppendSwitchASCII(switches::kProxyPacUrl,
+ "http://chromium.org/test.pac");
+ command_line.AppendSwitchASCII(switches::kProxyServer,
+ "http://chromium.org");
+ command_line.AppendSwitchASCII(switches::kProxyBypassList,
+ "http://chromium.org");
scoped_ptr<MockConfigurationPolicyProvider> provider(
new MockConfigurationPolicyProvider());
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index 71c9706..dedcf8f 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -53,9 +53,9 @@ void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) {
// This makes sure that we create the Default profile first, with no
// ExtensionsService and then the real profile with one, as we do when
// running on chromeos.
- command_line->AppendSwitchWithValue(
- switches::kLoginUser, "TestUser@gmail.com");
- command_line->AppendSwitchWithValue(switches::kLoginProfile, "user");
+ command_line->AppendSwitchASCII(switches::kLoginUser,
+ "TestUser@gmail.com");
+ command_line->AppendSwitchASCII(switches::kLoginProfile, "user");
command_line->AppendSwitch(switches::kNoFirstRun);
#endif
}
diff --git a/chrome/browser/first_run/first_run_gtk.cc b/chrome/browser/first_run/first_run_gtk.cc
index d758585..d533823 100644
--- a/chrome/browser/first_run/first_run_gtk.cc
+++ b/chrome/browser/first_run/first_run_gtk.cc
@@ -113,7 +113,7 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir,
return false;
}
-// TODO(port): This is just a piece of the silent import functionality from
+// TODO(port): This is just a piece of the silent import functionality from
// ImportSettings for Windows. It would be nice to get the rest of it ported.
bool FirstRun::ImportBookmarks(const std::wstring& import_bookmarks_path) {
const CommandLine& cmdline = *CommandLine::ForCurrentProcess();
@@ -121,16 +121,14 @@ bool FirstRun::ImportBookmarks(const std::wstring& import_bookmarks_path) {
// Propagate user data directory switch.
if (cmdline.HasSwitch(switches::kUserDataDir)) {
- import_cmd.AppendSwitchWithValue(
- switches::kUserDataDir,
- cmdline.GetSwitchValueASCII(switches::kUserDataDir));
+ import_cmd.AppendSwitchPath(switches::kUserDataDir,
+ cmdline.GetSwitchValuePath(switches::kUserDataDir));
}
// Since ImportSettings is called before the local state is stored on disk
// we pass the language as an argument. GetApplicationLocale checks the
// current command line as fallback.
- import_cmd.AppendSwitchWithValue(
- switches::kLang,
- ASCIIToWide(g_browser_process->GetApplicationLocale()));
+ import_cmd.AppendSwitchASCII(switches::kLang,
+ g_browser_process->GetApplicationLocale());
import_cmd.CommandLine::AppendSwitchWithValue(
switches::kImportFromFile, import_bookmarks_path);
diff --git a/chrome/browser/first_run/first_run_win.cc b/chrome/browser/first_run/first_run_win.cc
index 2c22c42..9790558 100644
--- a/chrome/browser/first_run/first_run_win.cc
+++ b/chrome/browser/first_run/first_run_win.cc
@@ -135,7 +135,7 @@ bool LaunchSetupWithParam(const std::string& param, const std::wstring& value,
exe_path = exe_path.Append(installer_util::kSetupExe);
base::ProcessHandle ph;
CommandLine cl(exe_path);
- cl.AppendSwitchWithValue(param, value);
+ cl.AppendSwitchNative(param, value);
CommandLine* browser_command_line = CommandLine::ForCurrentProcess();
if (browser_command_line->HasSwitch(switches::kChromeFrame)) {
@@ -580,8 +580,8 @@ class HungImporterMonitor : public WorkerThreadTicker::Callback {
DISALLOW_COPY_AND_ASSIGN(HungImporterMonitor);
};
-std::wstring EncodeImportParams(int browser_type, int options, HWND window) {
- return StringPrintf(L"%d@%d@%d", browser_type, options, window);
+std::string EncodeImportParams(int browser_type, int options, HWND window) {
+ return StringPrintf("%d@%d@%d", browser_type, options, window);
}
bool DecodeImportParams(const std::wstring& encoded,
@@ -693,12 +693,11 @@ bool FirstRun::ImportSettings(Profile* profile, int browser_type,
// Since ImportSettings is called before the local state is stored on disk
// we pass the language as an argument. GetApplicationLocale checks the
// current command line as fallback.
- import_cmd.AppendSwitchWithValue(
- switches::kLang,
- ASCIIToWide(g_browser_process->GetApplicationLocale()));
+ import_cmd.AppendSwitchASCII(switches::kLang,
+ g_browser_process->GetApplicationLocale());
if (items_to_import) {
- import_cmd.CommandLine::AppendSwitchWithValue(switches::kImport,
+ import_cmd.CommandLine::AppendSwitchASCII(switches::kImport,
EncodeImportParams(browser_type, items_to_import, parent_window));
}
diff --git a/chrome/browser/gpu_process_host.cc b/chrome/browser/gpu_process_host.cc
index 03222fd..2f774fd 100644
--- a/chrome/browser/gpu_process_host.cc
+++ b/chrome/browser/gpu_process_host.cc
@@ -84,10 +84,8 @@ bool GpuProcessHost::Init() {
return false;
CommandLine* cmd_line = new CommandLine(exe_path);
- cmd_line->AppendSwitchWithValue(switches::kProcessType,
- switches::kGpuProcess);
- cmd_line->AppendSwitchWithValue(switches::kProcessChannelID,
- ASCIIToWide(channel_id()));
+ cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess);
+ cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id());
// Propagate relevant command line switches.
static const char* const kSwitchNames[] = {
diff --git a/chrome/browser/importer/firefox_importer_unittest_utils_mac.cc b/chrome/browser/importer/firefox_importer_unittest_utils_mac.cc
index 03dddc7..c20940f4 100644
--- a/chrome/browser/importer/firefox_importer_unittest_utils_mac.cc
+++ b/chrome/browser/importer/firefox_importer_unittest_utils_mac.cc
@@ -34,7 +34,7 @@ const char kTestChannelID[] = "T1";
bool LaunchNSSDecrypterChildProcess(const std::wstring& nss_path,
const IPC::Channel& channel, base::ProcessHandle* handle) {
CommandLine cl(*CommandLine::ForCurrentProcess());
- cl.AppendSwitchWithValue("client", "NSSDecrypterChildProcess");
+ cl.AppendSwitchASCII("client", "NSSDecrypterChildProcess");
FilePath ff_dylib_dir = FilePath::FromWStringHack(nss_path);
// Set env variable needed for FF encryption libs to load.
diff --git a/chrome/browser/locale_tests_uitest.cc b/chrome/browser/locale_tests_uitest.cc
index b5869dc..54cf202 100644
--- a/chrome/browser/locale_tests_uitest.cc
+++ b/chrome/browser/locale_tests_uitest.cc
@@ -29,7 +29,7 @@ class LocaleTestsBase : public UITest {
class LocaleTestsDa : public LocaleTestsBase {
public:
LocaleTestsDa() : LocaleTestsBase() {
- launch_arguments_.AppendSwitchWithValue("lang", "da");
+ launch_arguments_.AppendSwitchASCII("lang", "da");
// Linux doesn't use --lang, it only uses environment variables to set the
// language.
@@ -43,7 +43,7 @@ class LocaleTestsDa : public LocaleTestsBase {
class LocaleTestsHe : public LocaleTestsBase {
public:
LocaleTestsHe() : LocaleTestsBase() {
- launch_arguments_.AppendSwitchWithValue("lang", "he");
+ launch_arguments_.AppendSwitchASCII("lang", "he");
#if defined(OS_LINUX)
old_lc_all_ = getenv("LC_ALL");
setenv("LC_ALL", "he_IL.UTF-8", 1);
@@ -54,7 +54,7 @@ class LocaleTestsHe : public LocaleTestsBase {
class LocaleTestsZhTw : public LocaleTestsBase {
public:
LocaleTestsZhTw() : LocaleTestsBase() {
- launch_arguments_.AppendSwitchWithValue("lang", "zh-TW");
+ launch_arguments_.AppendSwitchASCII("lang", "zh-TW");
#if defined(OS_LINUX)
old_lc_all_ = getenv("LC_ALL");
setenv("LC_ALL", "zh_TW.UTF-8", 1);
diff --git a/chrome/browser/nacl_host/nacl_broker_host_win.cc b/chrome/browser/nacl_host/nacl_broker_host_win.cc
index 2847e85..7cd9bf2 100644
--- a/chrome/browser/nacl_host/nacl_broker_host_win.cc
+++ b/chrome/browser/nacl_host/nacl_broker_host_win.cc
@@ -44,10 +44,10 @@ bool NaClBrokerHost::Init() {
CommandLine* cmd_line = new CommandLine(nacl_path);
nacl::CopyNaClCommandLineArguments(cmd_line);
- cmd_line->AppendSwitchWithValue(switches::kProcessType,
- switches::kNaClBrokerProcess);
+ cmd_line->AppendSwitchASCII(switches::kProcessType,
+ switches::kNaClBrokerProcess);
- cmd_line->AppendSwitchWithValue(switches::kProcessChannelID, channel_id());
+ cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id());
BrowserChildProcessHost::Launch(FilePath(), cmd_line);
return true;
diff --git a/chrome/browser/nacl_host/nacl_process_host.cc b/chrome/browser/nacl_host/nacl_process_host.cc
index dde5cb1..6adccd0 100644
--- a/chrome/browser/nacl_host/nacl_process_host.cc
+++ b/chrome/browser/nacl_host/nacl_process_host.cc
@@ -131,10 +131,10 @@ bool NaClProcessHost::LaunchSelLdr() {
CommandLine* cmd_line = new CommandLine(exe_path);
nacl::CopyNaClCommandLineArguments(cmd_line);
- cmd_line->AppendSwitchWithValue(switches::kProcessType,
- switches::kNaClLoaderProcess);
+ cmd_line->AppendSwitchASCII(switches::kProcessType,
+ switches::kNaClLoaderProcess);
- cmd_line->AppendSwitchWithValue(switches::kProcessChannelID, channel_id());
+ cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id());
// On Windows we might need to start the broker process to launch a new loader
#if defined(OS_WIN)
diff --git a/chrome/browser/net/chrome_url_request_context_unittest.cc b/chrome/browser/net/chrome_url_request_context_unittest.cc
index 9f42e7b..eaaddf5 100644
--- a/chrome/browser/net/chrome_url_request_context_unittest.cc
+++ b/chrome/browser/net/chrome_url_request_context_unittest.cc
@@ -24,24 +24,23 @@ TEST(ChromeURLRequestContextTest, CreateProxyConfigTest) {
no_proxy.AppendSwitch(switches::kNoProxyServer);
CommandLine no_proxy_extra_params(unused_path);
no_proxy_extra_params.AppendSwitch(switches::kNoProxyServer);
- no_proxy_extra_params.AppendSwitchWithValue(switches::kProxyServer,
- "http://proxy:8888");
+ no_proxy_extra_params.AppendSwitchASCII(switches::kProxyServer,
+ "http://proxy:8888");
CommandLine single_proxy(unused_path);
- single_proxy.AppendSwitchWithValue(switches::kProxyServer,
- "http://proxy:8888");
+ single_proxy.AppendSwitchASCII(switches::kProxyServer, "http://proxy:8888");
CommandLine per_scheme_proxy(unused_path);
- per_scheme_proxy.AppendSwitchWithValue(switches::kProxyServer,
- "http=httpproxy:8888;ftp=ftpproxy:8889");
+ per_scheme_proxy.AppendSwitchASCII(switches::kProxyServer,
+ "http=httpproxy:8888;ftp=ftpproxy:8889");
CommandLine per_scheme_proxy_bypass(unused_path);
- per_scheme_proxy_bypass.AppendSwitchWithValue(switches::kProxyServer,
+ per_scheme_proxy_bypass.AppendSwitchASCII(
+ switches::kProxyServer,
"http=httpproxy:8888;ftp=ftpproxy:8889");
- per_scheme_proxy_bypass.AppendSwitchWithValue(
+ per_scheme_proxy_bypass.AppendSwitchASCII(
switches::kProxyBypassList,
".google.com, foo.com:99, 1.2.3.4:22, 127.0.0.1/8");
CommandLine with_pac_url(unused_path);
- with_pac_url.AppendSwitchWithValue(switches::kProxyPacUrl,
- "http://wpad/wpad.dat");
- with_pac_url.AppendSwitchWithValue(
+ with_pac_url.AppendSwitchASCII(switches::kProxyPacUrl, "http://wpad/wpad.dat");
+ with_pac_url.AppendSwitchASCII(
switches::kProxyBypassList,
".google.com, foo.com:99, 1.2.3.4:22, 127.0.0.1/8");
CommandLine with_auto_detect(unused_path);
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc
index d6380cc..3dc50f5 100644
--- a/chrome/browser/plugin_process_host.cc
+++ b/chrome/browser/plugin_process_host.cc
@@ -361,8 +361,7 @@ bool PluginProcessHost::Init(const WebPluginInfo& info,
CommandLine* cmd_line = new CommandLine(exe_path);
// Put the process type and plugin path first so they're easier to see
// in process listings using native process management tools.
- cmd_line->AppendSwitchWithValue(switches::kProcessType,
- switches::kPluginProcess);
+ cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kPluginProcess);
cmd_line->AppendSwitchPath(switches::kPluginPath, info.path);
if (logging::DialogsAreSuppressed())
@@ -414,7 +413,7 @@ bool PluginProcessHost::Init(const WebPluginInfo& info,
DCHECK(!data_dir.empty());
cmd_line->AppendSwitchPath(switches::kPluginDataDir, data_dir);
- cmd_line->AppendSwitchWithValue(switches::kProcessChannelID, channel_id());
+ cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id());
SetCrashReporterCommandLine(cmd_line);
diff --git a/chrome/browser/profile_import_process_host.cc b/chrome/browser/profile_import_process_host.cc
index eaeb6dc..1926204 100644
--- a/chrome/browser/profile_import_process_host.cc
+++ b/chrome/browser/profile_import_process_host.cc
@@ -85,9 +85,9 @@ bool ProfileImportProcessHost::StartProcess() {
}
CommandLine* cmd_line = new CommandLine(exe_path);
- cmd_line->AppendSwitchWithValue(switches::kProcessType,
- switches::kProfileImportProcess);
- cmd_line->AppendSwitchWithValue(switches::kProcessChannelID, channel_id());
+ cmd_line->AppendSwitchASCII(switches::kProcessType,
+ switches::kProfileImportProcess);
+ cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id());
SetCrashReporterCommandLine(cmd_line);
diff --git a/chrome/browser/profile_manager_unittest.cc b/chrome/browser/profile_manager_unittest.cc
index ca8bf0b..95f71aa 100644
--- a/chrome/browser/profile_manager_unittest.cc
+++ b/chrome/browser/profile_manager_unittest.cc
@@ -95,7 +95,7 @@ TEST_F(ProfileManagerTest, LoggedInProfileDir) {
ProfileManager profile_manager;
std::string profile_dir("my_user");
- cl->AppendSwitchWithValue(switches::kLoginProfile, profile_dir);
+ cl->AppendSwitchASCII(switches::kLoginProfile, profile_dir);
cl->AppendSwitch(switches::kTestType);
FilePath expected_default =
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
index 2506617..9bf1742 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.cc
+++ b/chrome/browser/renderer_host/browser_render_process_host.cc
@@ -331,7 +331,7 @@ bool BrowserRenderProcessHost::Init(bool is_extensions_process,
if (!renderer_prefix.empty())
cmd_line->PrependWrapper(renderer_prefix);
AppendRendererCommandLine(cmd_line);
- cmd_line->AppendSwitchWithValue(switches::kProcessChannelID, channel_id);
+ cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id);
// Spawn the child process asynchronously to avoid blocking the UI thread.
// As long as there's no renderer prefix, we can use the zygote process
@@ -445,7 +445,7 @@ void BrowserRenderProcessHost::AppendRendererCommandLine(
// Pass the process type first, so it shows first in process listings.
// Extensions use a special pseudo-process type to make them distinguishable,
// even though they're just renderers.
- command_line->AppendSwitchWithValue(switches::kProcessType,
+ command_line->AppendSwitchASCII(switches::kProcessType,
extension_process_ ? switches::kExtensionProcess :
switches::kRendererProcess);
@@ -458,7 +458,7 @@ void BrowserRenderProcessHost::AppendRendererCommandLine(
// Pass on the browser locale.
const std::string locale = g_browser_process->GetApplicationLocale();
- command_line->AppendSwitchWithValue(switches::kLang, locale);
+ command_line->AppendSwitchASCII(switches::kLang, locale);
// If we run FieldTrials, we want to pass to their state to the renderer so
// that it can act in accordance with each state, or record histograms
@@ -466,8 +466,8 @@ void BrowserRenderProcessHost::AppendRendererCommandLine(
std::string field_trial_states;
FieldTrialList::StatesToString(&field_trial_states);
if (!field_trial_states.empty()) {
- command_line->AppendSwitchWithValue(switches::kForceFieldTestNameAndValue,
- field_trial_states);
+ command_line->AppendSwitchASCII(switches::kForceFieldTestNameAndValue,
+ field_trial_states);
}
BrowserChildProcessHost::SetCrashReporterCommandLine(command_line);
@@ -480,7 +480,7 @@ void BrowserRenderProcessHost::AppendRendererCommandLine(
const std::string& profile =
browser_command_line.GetSwitchValueASCII(switches::kProfile);
if (!profile.empty())
- command_line->AppendSwitchWithValue(switches::kProfile, profile);
+ command_line->AppendSwitchASCII(switches::kProfile, profile);
#endif
}
diff --git a/chrome/browser/sanity_uitest.cc b/chrome/browser/sanity_uitest.cc
index c2fe48c..29fde79 100644
--- a/chrome/browser/sanity_uitest.cc
+++ b/chrome/browser/sanity_uitest.cc
@@ -60,7 +60,7 @@ class EarlyReturnTest : public UITest {
// handshake that will never come.
set_command_execution_timeout_ms(1);
set_action_timeout_ms(1);
- launch_arguments_.AppendSwitchWithValue(switches::kTryChromeAgain, "10001");
+ launch_arguments_.AppendSwitchASCII(switches::kTryChromeAgain, "10001");
}
};
diff --git a/chrome/browser/utility_process_host.cc b/chrome/browser/utility_process_host.cc
index dbcf94b..4e3852f 100644
--- a/chrome/browser/utility_process_host.cc
+++ b/chrome/browser/utility_process_host.cc
@@ -78,11 +78,11 @@ bool UtilityProcessHost::StartProcess(const FilePath& exposed_dir) {
}
CommandLine* cmd_line = new CommandLine(exe_path);
- cmd_line->AppendSwitchWithValue(switches::kProcessType,
- switches::kUtilityProcess);
- cmd_line->AppendSwitchWithValue(switches::kProcessChannelID, channel_id());
+ cmd_line->AppendSwitchASCII(switches::kProcessType,
+ switches::kUtilityProcess);
+ cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id());
std::string locale = g_browser_process->GetApplicationLocale();
- cmd_line->AppendSwitchWithValue(switches::kLang, locale);
+ cmd_line->AppendSwitchASCII(switches::kLang, locale);
SetCrashReporterCommandLine(cmd_line);
diff --git a/chrome/browser/worker_host/worker_process_host.cc b/chrome/browser/worker_host/worker_process_host.cc
index f995cbd..d9b1ebc 100644
--- a/chrome/browser/worker_host/worker_process_host.cc
+++ b/chrome/browser/worker_host/worker_process_host.cc
@@ -105,9 +105,8 @@ bool WorkerProcessHost::Init() {
return false;
CommandLine* cmd_line = new CommandLine(exe_path);
- cmd_line->AppendSwitchWithValue(switches::kProcessType,
- switches::kWorkerProcess);
- cmd_line->AppendSwitchWithValue(switches::kProcessChannelID, channel_id());
+ cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kWorkerProcess);
+ cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id());
SetCrashReporterCommandLine(cmd_line);
if (CommandLine::ForCurrentProcess()->HasSwitch(
@@ -136,10 +135,10 @@ bool WorkerProcessHost::Init() {
}
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kLoggingLevel)) {
- const std::wstring level =
- CommandLine::ForCurrentProcess()->GetSwitchValue(
+ const std::string level =
+ CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kLoggingLevel);
- cmd_line->AppendSwitchWithValue(switches::kLoggingLevel, level);
+ cmd_line->AppendSwitchASCII(switches::kLoggingLevel, level);
}
if (CommandLine::ForCurrentProcess()->HasSwitch(
diff --git a/chrome/browser/zygote_host_linux.cc b/chrome/browser/zygote_host_linux.cc
index 983e2ce..5c58d6c 100644
--- a/chrome/browser/zygote_host_linux.cc
+++ b/chrome/browser/zygote_host_linux.cc
@@ -67,8 +67,7 @@ void ZygoteHost::Init(const std::string& sandbox_cmd) {
CHECK(PathService::Get(base::FILE_EXE, &chrome_path));
CommandLine cmd_line(chrome_path);
- cmd_line.AppendSwitchWithValue(switches::kProcessType,
- switches::kZygoteProcess);
+ cmd_line.AppendSwitchASCII(switches::kProcessType, switches::kZygoteProcess);
int fds[2];
CHECK(socketpair(PF_UNIX, SOCK_SEQPACKET, 0, fds) == 0);
diff --git a/chrome/common/debug_flags.cc b/chrome/common/debug_flags.cc
index dd2eaee..31c6c0a 100644
--- a/chrome/common/debug_flags.cc
+++ b/chrome/common/debug_flags.cc
@@ -29,7 +29,7 @@ bool DebugFlags::ProcessDebugFlags(CommandLine* command_line,
command_line->AppendSwitch(switches::kDebugOnStart);
should_help_child = true;
}
- command_line->AppendSwitchWithValue(switches::kDebugChildren, value);
+ command_line->AppendSwitchASCII(switches::kDebugChildren, value);
} else if (current_cmd_line.HasSwitch(switches::kWaitForDebuggerChildren)) {
// Look to pass-on the kWaitForDebugger flag.
std::string value = current_cmd_line.GetSwitchValueASCII(
@@ -43,8 +43,7 @@ bool DebugFlags::ProcessDebugFlags(CommandLine* command_line,
value == switches::kPluginProcess)) {
command_line->AppendSwitch(switches::kWaitForDebugger);
}
- command_line->AppendSwitchWithValue(switches::kWaitForDebuggerChildren,
- value);
+ command_line->AppendSwitchASCII(switches::kWaitForDebuggerChildren, value);
}
return should_help_child;
}
diff --git a/chrome/common/sandbox_policy.cc b/chrome/common/sandbox_policy.cc
index aa5249f..ef76fe6 100644
--- a/chrome/common/sandbox_policy.cc
+++ b/chrome/common/sandbox_policy.cc
@@ -455,7 +455,7 @@ base::ProcessHandle StartProcessWithAccess(CommandLine* cmd_line,
// Hack for Google Desktop crash. Trick GD into not injecting its DLL into
// this subprocess. See
// http://code.google.com/p/chromium/issues/detail?id=25580
- cmd_line->AppendSwitchWithValue("ignored", " --type=renderer ");
+ cmd_line->AppendSwitchASCII("ignored", " --type=renderer ");
}
}
diff --git a/chrome/nacl/broker_thread.cc b/chrome/nacl/broker_thread.cc
index a199c08..e3e6b03 100644
--- a/chrome/nacl/broker_thread.cc
+++ b/chrome/nacl/broker_thread.cc
@@ -49,11 +49,11 @@ void NaClBrokerThread::OnLaunchLoaderThroughBroker(
CommandLine* cmd_line = new CommandLine(exe_path);
nacl::CopyNaClCommandLineArguments(cmd_line);
- cmd_line->AppendSwitchWithValue(switches::kProcessType,
- switches::kNaClLoaderProcess);
+ cmd_line->AppendSwitchASCII(switches::kProcessType,
+ switches::kNaClLoaderProcess);
- cmd_line->AppendSwitchWithValue(switches::kProcessChannelID,
- loader_channel_id);
+ cmd_line->AppendSwitchASCII(switches::kProcessChannelID,
+ loader_channel_id);
loader_process = sandbox::StartProcessWithAccess(cmd_line, FilePath());
if (loader_process) {
diff --git a/chrome/renderer/external_extension_uitest.cc b/chrome/renderer/external_extension_uitest.cc
index fcd19b8..4cdfe19 100644
--- a/chrome/renderer/external_extension_uitest.cc
+++ b/chrome/renderer/external_extension_uitest.cc
@@ -43,8 +43,7 @@ SearchProviderTest::SearchProviderTest()
host_rule.append(":");
host_rule.append(server_url.port());
}
- launch_arguments_.AppendSwitchWithValue(switches::kHostRules,
- host_rule);
+ launch_arguments_.AppendSwitchASCII(switches::kHostRules, host_rule);
}
SearchProviderTest::~SearchProviderTest() {
diff --git a/chrome/renderer/renderer_main_unittest.cc b/chrome/renderer/renderer_main_unittest.cc
index fcc4f6f..f329337 100644
--- a/chrome/renderer/renderer_main_unittest.cc
+++ b/chrome/renderer/renderer_main_unittest.cc
@@ -78,8 +78,7 @@ class SuicidalListener : public IPC::Channel::Listener {
MULTIPROCESS_TEST_MAIN(SimpleRenderer) {
SandboxInitWrapper dummy_sandbox_init;
CommandLine cl(*CommandLine::ForCurrentProcess());
- cl.AppendSwitchWithValue(switches::kProcessChannelID,
- kRendererTestChannelName);
+ cl.AppendSwitchASCII(switches::kProcessChannelID, kRendererTestChannelName);
MainFunctionParams dummy_params(cl, dummy_sandbox_init, NULL);
return RendererMain(dummy_params);
diff --git a/chrome/service/service_utility_process_host.cc b/chrome/service/service_utility_process_host.cc
index 3776bc0..21daaf6 100644
--- a/chrome/service/service_utility_process_host.cc
+++ b/chrome/service/service_utility_process_host.cc
@@ -81,9 +81,8 @@ bool ServiceUtilityProcessHost::StartProcess() {
}
CommandLine cmd_line(exe_path);
- cmd_line.AppendSwitchWithValue(switches::kProcessType,
- switches::kUtilityProcess);
- cmd_line.AppendSwitchWithValue(switches::kProcessChannelID, channel_id());
+ cmd_line.AppendSwitchASCII(switches::kProcessType, switches::kUtilityProcess);
+ cmd_line.AppendSwitchASCII(switches::kProcessChannelID, channel_id());
cmd_line.AppendSwitch(switches::kLang);
return Launch(&cmd_line);
diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc
index a16ac12..d9cf8f2 100644
--- a/chrome/test/automation/automation_proxy_uitest.cc
+++ b/chrome/test/automation/automation_proxy_uitest.cc
@@ -44,8 +44,7 @@ class AutomationProxyTest : public UITest {
protected:
AutomationProxyTest() {
dom_automation_enabled_ = true;
- launch_arguments_.AppendSwitchWithValue(switches::kLang,
- "en-US");
+ launch_arguments_.AppendSwitchASCII(switches::kLang, "en-US");
}
};
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc
index b8b8d90..4d2fb9b 100644
--- a/chrome/test/in_process_browser_test.cc
+++ b/chrome/test/in_process_browser_test.cc
@@ -142,7 +142,7 @@ void InProcessBrowserTest::SetUp() {
command_line->AppendSwitch(switches::kNoFirstRun);
// This is a Browser test.
- command_line->AppendSwitchWithValue(switches::kTestType, kBrowserTestType);
+ command_line->AppendSwitchASCII(switches::kTestType, kBrowserTestType);
// Single-process mode is not set in BrowserMain so it needs to be processed
// explicitly.
diff --git a/chrome/test/live_sync/live_sync_test.cc b/chrome/test/live_sync/live_sync_test.cc
index 207eb99..8f87da3 100644
--- a/chrome/test/live_sync/live_sync_test.cc
+++ b/chrome/test/live_sync/live_sync_test.cc
@@ -60,8 +60,8 @@ void LiveSyncTest::SetUp() {
// TODO(rsimha): Until we implement a fake Tango server against which tests
// can run, we need to set the --sync-notification-method to "transitional".
if (!cl->HasSwitch(switches::kSyncNotificationMethod)) {
- cl->AppendSwitchWithValue(switches::kSyncNotificationMethod,
- "transitional");
+ cl->AppendSwitchASCII(switches::kSyncNotificationMethod,
+ "transitional");
}
// Unless a sync server was explicitly provided, run a test one locally.
@@ -183,9 +183,9 @@ void LiveSyncTest::SetUpLocalTestServer() {
started_local_test_server_ = true;
CommandLine* cl = CommandLine::ForCurrentProcess();
- cl->AppendSwitchWithValue(switches::kSyncServiceURL,
+ cl->AppendSwitchASCII(switches::kSyncServiceURL,
StringPrintf("http://%s:%d/chromiumsync", server_.kHostName,
- server_.kOKHTTPSPort));
+ server_.kOKHTTPSPort));
}
void LiveSyncTest::TearDownLocalTestServer() {
diff --git a/chrome/test/nacl/nacl_test.cc b/chrome/test/nacl/nacl_test.cc
index 5a249c3..a2c0afb 100644
--- a/chrome/test/nacl/nacl_test.cc
+++ b/chrome/test/nacl/nacl_test.cc
@@ -33,7 +33,7 @@ NaClTest::NaClTest()
#if defined(OS_LINUX) && defined(USE_SECCOMP_SANDBOX)
launch_arguments_.AppendSwitch(switches::kDisableSeccompSandbox);
#endif
- launch_arguments_.AppendSwitchWithValue(switches::kLoggingLevel, "0");
+ launch_arguments_.AppendSwitchASCII(switches::kLoggingLevel, "0");
}
NaClTest::~NaClTest() {}
diff --git a/chrome/test/page_cycler/page_cycler_test.cc b/chrome/test/page_cycler/page_cycler_test.cc
index 1b4fa0e..276c446 100644
--- a/chrome/test/page_cycler/page_cycler_test.cc
+++ b/chrome/test/page_cycler/page_cycler_test.cc
@@ -162,8 +162,8 @@ class PageCyclerTest : public UITest {
// Expose garbage collection for the page cycler tests.
- launch_arguments_.AppendSwitchWithValue(switches::kJavaScriptFlags,
- "--expose_gc");
+ launch_arguments_.AppendSwitchASCII(switches::kJavaScriptFlags,
+ "--expose_gc");
#if defined(OS_MACOSX)
static rlim_t initial_fd_limit = GetFileDescriptorLimit();
fd_limit_ = initial_fd_limit;
diff --git a/chrome/test/plugin/plugin_test.cpp b/chrome/test/plugin/plugin_test.cpp
index 80643b7..e047121 100644
--- a/chrome/test/plugin/plugin_test.cpp
+++ b/chrome/test/plugin/plugin_test.cpp
@@ -64,8 +64,8 @@ class PluginTest : public UITest {
// the new plugin.
launch_arguments_.AppendSwitch(kUseOldWMPPluginSwitch);
} else if (strcmp(test_info->name(), "FlashSecurity") == 0) {
- launch_arguments_.AppendSwitchWithValue(switches::kTestSandbox,
- "security_tests.dll");
+ launch_arguments_.AppendSwitchASCII(switches::kTestSandbox,
+ "security_tests.dll");
}
UITest::SetUp();
diff --git a/chrome/test/tab_switching/tab_switching_test.cc b/chrome/test/tab_switching/tab_switching_test.cc
index 72677d8..20386c8 100644
--- a/chrome/test/tab_switching/tab_switching_test.cc
+++ b/chrome/test/tab_switching/tab_switching_test.cc
@@ -174,7 +174,7 @@ class TabSwitchingUITest : public UITest {
void AddLaunchArguments() {
launch_arguments_.AppendSwitch(switches::kEnableLogging);
launch_arguments_.AppendSwitch(switches::kDumpHistogramsOnExit);
- launch_arguments_.AppendSwitchWithValue(switches::kLoggingLevel, "0");
+ launch_arguments_.AppendSwitchASCII(switches::kLoggingLevel, "0");
}
DISALLOW_COPY_AND_ASSIGN(TabSwitchingUITest);
diff --git a/chrome/test/test_launcher/out_of_proc_test_runner.cc b/chrome/test/test_launcher/out_of_proc_test_runner.cc
index 28fd5dd9..8f675b8 100644
--- a/chrome/test/test_launcher/out_of_proc_test_runner.cc
+++ b/chrome/test/test_launcher/out_of_proc_test_runner.cc
@@ -66,13 +66,13 @@ class OutOfProcTestRunner : public tests::TestRunner {
switches.erase(kGTestOutputFlag);
for (CommandLine::SwitchMap::const_iterator iter = switches.begin();
iter != switches.end(); ++iter) {
- new_cmd_line.AppendSwitchWithValue((*iter).first, (*iter).second);
+ new_cmd_line.AppendSwitchNative((*iter).first, (*iter).second);
}
// Always enable disabled tests. This method is not called with disabled
// tests unless this flag was specified to the browser test executable.
new_cmd_line.AppendSwitch("gtest_also_run_disabled_tests");
- new_cmd_line.AppendSwitchWithValue("gtest_filter", test_name);
+ new_cmd_line.AppendSwitchASCII("gtest_filter", test_name);
new_cmd_line.AppendSwitch(kChildProcessFlag);
// Do not let the child ignore failures. We need to propagate the
diff --git a/chrome/test/ui/pepper_uitest.cc b/chrome/test/ui/pepper_uitest.cc
index 37654ee..8a8c0025 100644
--- a/chrome/test/ui/pepper_uitest.cc
+++ b/chrome/test/ui/pepper_uitest.cc
@@ -32,7 +32,7 @@ class PepperTester : public NPAPITesterBase {
launch_arguments_.AppendSwitch(switches::kEnableGPUPlugin);
// Use Mesa software renderer so it can run on testbots without any
// graphics hardware.
- launch_arguments_.AppendSwitchWithValue(switches::kUseGL, "osmesa");
+ launch_arguments_.AppendSwitchASCII(switches::kUseGL, "osmesa");
NPAPITesterBase::SetUp();
}
};
diff --git a/chrome/test/ui/sandbox_uitests.cc b/chrome/test/ui/sandbox_uitests.cc
index 172028b..e65abfc 100644
--- a/chrome/test/ui/sandbox_uitests.cc
+++ b/chrome/test/ui/sandbox_uitests.cc
@@ -13,8 +13,8 @@ class SandboxTest : public UITest {
protected:
// Launches chrome with the --test-sandbox=security_tests.dll flag.
SandboxTest() : UITest() {
- launch_arguments_.AppendSwitchWithValue(switches::kTestSandbox,
- "security_tests.dll");
+ launch_arguments_.AppendSwitchASCII(switches::kTestSandbox,
+ "security_tests.dll");
}
};
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index f3eff50..d088661 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -334,7 +334,7 @@ void UITestBase::StartHttpServerWithPort(const FilePath& root_directory,
const std::wstring& port) {
scoped_ptr<CommandLine> cmd_line(CreateHttpServerCommandLine());
ASSERT_TRUE(cmd_line.get());
- cmd_line->AppendSwitchWithValue("server", "start");
+ cmd_line->AppendSwitchASCII("server", "start");
cmd_line->AppendSwitch("register_cygwin");
cmd_line->AppendSwitchPath("root", root_directory);
@@ -355,7 +355,7 @@ void UITestBase::StartHttpServerWithPort(const FilePath& root_directory,
void UITestBase::StopHttpServer() {
scoped_ptr<CommandLine> cmd_line(CreateHttpServerCommandLine());
ASSERT_TRUE(cmd_line.get());
- cmd_line->AppendSwitchWithValue("server", "stop");
+ cmd_line->AppendSwitchASCII("server", "stop");
RunCommand(*cmd_line.get());
}
@@ -1118,7 +1118,7 @@ bool UITestBase::LaunchBrowserHelper(const CommandLine& arguments,
command_line.AppendSwitch(switches::kNoDefaultBrowserCheck);
// This is a UI test.
- command_line.AppendSwitchWithValue(switches::kTestType, kUITestType);
+ command_line.AppendSwitchASCII(switches::kTestType, kUITestType);
// Tell the browser to use a temporary directory just for this test.
command_line.AppendSwitchPath(switches::kUserDataDir, user_data_dir());
@@ -1131,8 +1131,8 @@ bool UITestBase::LaunchBrowserHelper(const CommandLine& arguments,
command_line.AppendSwitch(switches::kDomAutomationController);
if (include_testing_id_) {
- command_line.AppendSwitchWithValue(switches::kTestingChannelID,
- server_->channel_id());
+ command_line.AppendSwitchASCII(switches::kTestingChannelID,
+ server_->channel_id());
}
if (!show_error_dialogs_ &&
diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc
index a1abccd..a6dde7c 100644
--- a/chrome/test/ui_test_utils.cc
+++ b/chrome/test/ui_test_utils.cc
@@ -615,7 +615,7 @@ void AppendToPythonPath(const FilePath& dir) {
TestWebSocketServer::TestWebSocketServer(const FilePath& root_directory) {
scoped_ptr<CommandLine> cmd_line(CreateWebSocketServerCommandLine());
- cmd_line->AppendSwitchWithValue("server", "start");
+ cmd_line->AppendSwitchASCII("server", "start");
cmd_line->AppendSwitch("chromium");
cmd_line->AppendSwitch("register_cygwin");
cmd_line->AppendSwitchPath("root", root_directory);
@@ -661,7 +661,7 @@ CommandLine* TestWebSocketServer::CreateWebSocketServerCommandLine() {
TestWebSocketServer::~TestWebSocketServer() {
scoped_ptr<CommandLine> cmd_line(CreateWebSocketServerCommandLine());
- cmd_line->AppendSwitchWithValue("server", "stop");
+ cmd_line->AppendSwitchASCII("server", "stop");
cmd_line->AppendSwitch("chromium");
cmd_line->AppendSwitchPath("pidfile", websocket_pid_file_);
base::LaunchApp(*cmd_line.get(), true, false, NULL);
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc
index fdf5831..72c488c 100644
--- a/chrome_frame/chrome_frame_automation.cc
+++ b/chrome_frame/chrome_frame_automation.cc
@@ -279,8 +279,8 @@ void ProxyFactory::CreateProxy(ProxyFactory::ProxyCacheEntry* entry,
// Launch browser
scoped_ptr<CommandLine> command_line(
chrome_launcher::CreateLaunchCommandLine());
- command_line->AppendSwitchWithValue(switches::kAutomationClientChannelID,
- proxy->channel_id());
+ command_line->AppendSwitchASCII(switches::kAutomationClientChannelID,
+ proxy->channel_id());
// Run Chrome in Chrome Frame mode. In practice, this modifies the paths
// and registry keys that Chrome looks in via the BrowserDistribution
diff --git a/chrome_frame/chrome_launcher_unittest.cc b/chrome_frame/chrome_launcher_unittest.cc
index 9511b40..3d233ac 100644
--- a/chrome_frame/chrome_launcher_unittest.cc
+++ b/chrome_frame/chrome_launcher_unittest.cc
@@ -20,7 +20,7 @@ TEST(ChromeLauncher, IsValidCommandLine) {
CommandLine good(FilePath(L"dummy.exe"));
good.AppendSwitch(switches::kNoFirstRun); // in whitelist
- good.AppendSwitchWithValue(switches::kUserDataDir, "foo"); // in whitelist
+ good.AppendSwitchASCII(switches::kUserDataDir, "foo"); // in whitelist
EXPECT_TRUE(chrome_launcher::IsValidCommandLine(
good.command_line_string().c_str()));
diff --git a/chrome_frame/chrome_tab.cc b/chrome_frame/chrome_tab.cc
index f7ff496..002d700 100644
--- a/chrome_frame/chrome_tab.cc
+++ b/chrome_frame/chrome_tab.cc
@@ -280,8 +280,8 @@ HRESULT SetupRunOnce() {
RegKey run_once;
if (run_once.Create(HKEY_CURRENT_USER, kRunOnce, KEY_READ | KEY_WRITE)) {
CommandLine run_once_command(chrome_launcher::GetChromeExecutablePath());
- run_once_command.AppendSwitchWithValue(
- switches::kAutomationClientChannelID, "0");
+ run_once_command.AppendSwitchASCII(switches::kAutomationClientChannelID,
+ "0");
run_once_command.AppendSwitch(switches::kChromeFrame);
run_once.WriteValue(L"A", run_once_command.command_line_string().c_str());
}
diff --git a/chrome_frame/test/perf/chrome_frame_perftest.cc b/chrome_frame/test/perf/chrome_frame_perftest.cc
index 0b5d5d8..e00e45b 100644
--- a/chrome_frame/test/perf/chrome_frame_perftest.cc
+++ b/chrome_frame/test/perf/chrome_frame_perftest.cc
@@ -1300,7 +1300,7 @@ bool RunSingleTestOutOfProc(const std::string& test_name) {
// Always enable disabled tests. This method is not called with disabled
// tests unless this flag was specified to the browser test executable.
cmd_line.AppendSwitch("gtest_also_run_disabled_tests");
- cmd_line.AppendSwitchWithValue("gtest_filter", test_name);
+ cmd_line.AppendSwitchASCII("gtest_filter", test_name);
base::ProcessHandle process_handle;
if (!base::LaunchApp(cmd_line, false, false, &process_handle))