summaryrefslogtreecommitdiffstats
path: root/chrome/browser
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 /chrome/browser
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
Diffstat (limited to 'chrome/browser')
-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
24 files changed, 91 insertions, 101 deletions
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);