diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-13 02:07:25 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-13 02:07:25 +0000 |
commit | b7e0a2a3ccf5aceb891d5e1dfaf9db1bbaaa5f78 (patch) | |
tree | d723b8556ad386a0b8a6e999e3a842e0bfe6f9b0 /chrome/browser | |
parent | 1976d41ac728fcceb30f2df3c243cb7417f538f1 (diff) | |
download | chromium_src-b7e0a2a3ccf5aceb891d5e1dfaf9db1bbaaa5f78.zip chromium_src-b7e0a2a3ccf5aceb891d5e1dfaf9db1bbaaa5f78.tar.gz chromium_src-b7e0a2a3ccf5aceb891d5e1dfaf9db1bbaaa5f78.tar.bz2 |
Use ASCII strings for switch names.
Review URL: http://codereview.chromium.org/270062
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28779 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/first_run_win.cc | 4 | ||||
-rw-r--r-- | chrome/browser/gtk/browser_titlebar.cc | 2 | ||||
-rw-r--r-- | chrome/browser/importer/firefox_importer_unittest_utils_mac.cc | 2 | ||||
-rw-r--r-- | chrome/browser/locale_tests_uitest.cc | 6 | ||||
-rw-r--r-- | chrome/browser/nacl_process_host.cc | 2 | ||||
-rw-r--r-- | chrome/browser/net/chrome_url_request_context.cc | 2 | ||||
-rw-r--r-- | chrome/browser/plugin_process_host.cc | 2 | ||||
-rw-r--r-- | chrome/browser/printing/printing_layout_uitest.cc | 4 | ||||
-rw-r--r-- | chrome/browser/process_singleton_linux_uitest.cc | 1 | ||||
-rw-r--r-- | chrome/browser/profile.cc | 6 | ||||
-rw-r--r-- | chrome/browser/renderer_host/browser_render_process_host.cc | 2 | ||||
-rw-r--r-- | chrome/browser/sandbox_policy.cc | 2 |
12 files changed, 17 insertions, 18 deletions
diff --git a/chrome/browser/first_run_win.cc b/chrome/browser/first_run_win.cc index 379df70..464ad0d 100644 --- a/chrome/browser/first_run_win.cc +++ b/chrome/browser/first_run_win.cc @@ -110,7 +110,7 @@ bool InvokeGoogleUpdateForRename() { return false; } -bool LaunchSetupWithParam(const std::wstring& param, const std::wstring& value, +bool LaunchSetupWithParam(const std::string& param, const std::wstring& value, int* ret_code) { FilePath exe_path; if (!PathService::Get(base::DIR_MODULE, &exe_path)) @@ -208,7 +208,7 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir, FilePath inner_html; if (WriteEULAtoTempFile(&inner_html)) { int retcode = 0; - const std::wstring& eula = installer_util::switches::kShowEula; + const std::string eula = WideToASCII(installer_util::switches::kShowEula); if (!LaunchSetupWithParam(eula, inner_html.ToWStringHack(), &retcode) || (retcode == installer_util::EULA_REJECTED)) { LOG(WARNING) << "EULA rejected. Fast exit."; diff --git a/chrome/browser/gtk/browser_titlebar.cc b/chrome/browser/gtk/browser_titlebar.cc index 5f5bc5c..76ded96 100644 --- a/chrome/browser/gtk/browser_titlebar.cc +++ b/chrome/browser/gtk/browser_titlebar.cc @@ -305,7 +305,7 @@ void BrowserTitlebar::Init() { gtk_box_pack_start(GTK_BOX(titlebar_buttons_box_), buttons_hbox, FALSE, FALSE, 0); - if (CommandLine::ForCurrentProcess()->HasSwitch(L"glen")) { + if (CommandLine::ForCurrentProcess()->HasSwitch("glen")) { close_button_.reset(BuildTitlebarButton(IDR_GLEN, IDR_GLEN, IDR_GLEN, buttons_hbox, IDS_GLEN)); } else { diff --git a/chrome/browser/importer/firefox_importer_unittest_utils_mac.cc b/chrome/browser/importer/firefox_importer_unittest_utils_mac.cc index d44b336..bfea202 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(L"client", L"NSSDecrypterChildProcess"); + cl.AppendSwitchWithValue("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 808ecae..c403b6e 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(L"lang", L"da"); + launch_arguments_.AppendSwitchWithValue("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(L"lang", L"he"); + launch_arguments_.AppendSwitchWithValue("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(L"lang", L"zh-TW"); + launch_arguments_.AppendSwitchWithValue("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_process_host.cc b/chrome/browser/nacl_process_host.cc index bb13ab7..22fb446 100644 --- a/chrome/browser/nacl_process_host.cc +++ b/chrome/browser/nacl_process_host.cc @@ -107,7 +107,7 @@ bool NaClProcessHost::LaunchSelLdr(ResourceMessageFilter* renderer_msg_filter, // propagate the following switches to the plugin command line (along with // any associated values) if present in the browser command line // TODO(gregoryd): check which flags of those below can be supported. - static const wchar_t* const switch_names[] = { + static const char* const switch_names[] = { switches::kNoSandbox, switches::kTestSandbox, switches::kDisableBreakpad, diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc index 2918b1f..6d6632c 100644 --- a/chrome/browser/net/chrome_url_request_context.cc +++ b/chrome/browser/net/chrome_url_request_context.cc @@ -30,7 +30,7 @@ net::ProxyConfig* CreateProxyConfig(const CommandLine& command_line) { // Scan for all "enable" type proxy switches. - static const wchar_t* proxy_switches[] = { + static const char* proxy_switches[] = { switches::kProxyServer, switches::kProxyPacUrl, switches::kProxyAutoDetect, diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc index a24885b..525e640 100644 --- a/chrome/browser/plugin_process_host.cc +++ b/chrome/browser/plugin_process_host.cc @@ -375,7 +375,7 @@ bool PluginProcessHost::Init(const WebPluginInfo& info, // Propagate the following switches to the plugin command line (along with // any associated values) if present in the browser command line - static const wchar_t* const switch_names[] = { + static const char* const switch_names[] = { switches::kPluginStartupDialog, switches::kNoSandbox, switches::kSafePlugins, diff --git a/chrome/browser/printing/printing_layout_uitest.cc b/chrome/browser/printing/printing_layout_uitest.cc index 2eaba30..80093fe 100644 --- a/chrome/browser/printing/printing_layout_uitest.cc +++ b/chrome/browser/printing/printing_layout_uitest.cc @@ -21,7 +21,7 @@ namespace { using printing::Image; -const wchar_t* const kGenerateSwitch = L"print-layout-generate"; +const char kGenerateSwitch[] = "print-layout-generate"; const wchar_t kDocRoot[] = L"chrome/test/data"; class PrintingLayoutTest : public PrintingTest<UITest> { @@ -29,7 +29,7 @@ class PrintingLayoutTest : public PrintingTest<UITest> { PrintingLayoutTest() { emf_path_ = browser_directory_; emf_path_ = emf_path_.AppendASCII("metafile_dumps"); - launch_arguments_.AppendSwitchWithValue(L"debug-print", + launch_arguments_.AppendSwitchWithValue("debug-print", L'"' + emf_path_.value() + L'"'); show_window_ = true; } diff --git a/chrome/browser/process_singleton_linux_uitest.cc b/chrome/browser/process_singleton_linux_uitest.cc index 2e775f4..795a023 100644 --- a/chrome/browser/process_singleton_linux_uitest.cc +++ b/chrome/browser/process_singleton_linux_uitest.cc @@ -25,7 +25,6 @@ #include "chrome/test/ui/ui_test.h" #include "testing/gtest/include/gtest/gtest.h" - namespace { typedef UITest ProcessSingletonLinuxTest; diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc index 87c9713..c799d1a 100644 --- a/chrome/browser/profile.cc +++ b/chrome/browser/profile.cc @@ -93,10 +93,10 @@ void GetCacheParameters(ContextType type, FilePath* cache_path, *cache_path = FilePath::FromWStringHack(user_path); } - const wchar_t* arg = kNormalContext == type ? switches::kDiskCacheSize : - switches::kMediaCacheSize; + const char* arg = kNormalContext == type ? switches::kDiskCacheSize : + switches::kMediaCacheSize; std::string value = - WideToASCII(CommandLine::ForCurrentProcess()->GetSwitchValue(arg)); + CommandLine::ForCurrentProcess()->GetSwitchValueASCII(arg); // By default we let the cache determine the right size. *max_size = 0; diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc index bd92c8f..b43b878 100644 --- a/chrome/browser/renderer_host/browser_render_process_host.cc +++ b/chrome/browser/renderer_host/browser_render_process_host.cc @@ -483,7 +483,7 @@ void BrowserRenderProcessHost::PropogateBrowserCommandLineToRenderer( CommandLine* renderer_cmd) const { // Propagate the following switches to the renderer command line (along // with any associated values) if present in the browser command line. - static const wchar_t* const switch_names[] = { + static const char* const switch_names[] = { switches::kRendererAssertTest, switches::kRendererCrashTest, switches::kRendererStartupDialog, diff --git a/chrome/browser/sandbox_policy.cc b/chrome/browser/sandbox_policy.cc index ed61980..5c21a67 100644 --- a/chrome/browser/sandbox_policy.cc +++ b/chrome/browser/sandbox_policy.cc @@ -337,7 +337,7 @@ base::ProcessHandle StartProcessWithAccess(CommandLine* cmd_line, base::ProcessHandle process = 0; const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); ChildProcessInfo::ProcessType type; - std::wstring type_str = cmd_line->GetSwitchValue(switches::kProcessType); + std::string type_str = cmd_line->GetSwitchValueASCII(switches::kProcessType); if (type_str == switches::kRendererProcess) { type = ChildProcessInfo::RENDER_PROCESS; } else if (type_str == switches::kPluginProcess) { |