diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 01:47:55 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 01:47:55 +0000 |
commit | 884fbb700931254eeb7dd9ec61bbd3480c83e0ae (patch) | |
tree | dc609108c65482a283428bbb4f2d1a0c25cc9f85 /chrome/app/chrome_dll_main.cc | |
parent | 04f70572887672c0457d8d4f58eb19a5297d1e8d (diff) | |
download | chromium_src-884fbb700931254eeb7dd9ec61bbd3480c83e0ae.zip chromium_src-884fbb700931254eeb7dd9ec61bbd3480c83e0ae.tar.gz chromium_src-884fbb700931254eeb7dd9ec61bbd3480c83e0ae.tar.bz2 |
De-wstringify some browser startup code and net utility.
Review URL: http://codereview.chromium.org/3054042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54860 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/chrome_dll_main.cc')
-rw-r--r-- | chrome/app/chrome_dll_main.cc | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc index a3c1cbb..e65ac91 100644 --- a/chrome/app/chrome_dll_main.cc +++ b/chrome/app/chrome_dll_main.cc @@ -332,11 +332,9 @@ void SetupCRT(const CommandLine& parsed_command_line) { // Enable the low fragmentation heap for the CRT heap. The heap is not changed // if the process is run under the debugger is enabled or if certain gflags // are set. - bool use_lfh = false; - if (parsed_command_line.HasSwitch(switches::kUseLowFragHeapCrt)) - use_lfh = parsed_command_line.GetSwitchValue(switches::kUseLowFragHeapCrt) - != L"false"; - if (use_lfh) { + if (parsed_command_line.HasSwitch(switches::kUseLowFragHeapCrt) && + (parsed_command_line.GetSwitchValueASCII(switches::kUseLowFragHeapCrt) + != "false")) { void* crt_heap = reinterpret_cast<void*>(_get_heap_handle()); ULONG enable_lfh = 2; HeapSetInformation(crt_heap, HeapCompatibilityInformation, @@ -581,11 +579,11 @@ int ChromeMain(int argc, char** argv) { base::ProcessId browser_pid = base::GetCurrentProcId(); if (SubprocessIsBrowserChild(process_type)) { #if defined(OS_WIN) - std::wstring channel_name = - parsed_command_line.GetSwitchValue(switches::kProcessChannelID); + std::string channel_name = + parsed_command_line.GetSwitchValueASCII(switches::kProcessChannelID); int browser_pid_int; - base::StringToInt(WideToUTF8(channel_name), &browser_pid_int); + base::StringToInt(channel_name, &browser_pid_int); browser_pid = static_cast<base::ProcessId>(browser_pid_int); DCHECK_NE(browser_pid, 0u); #elif defined(OS_MACOSX) @@ -744,8 +742,8 @@ int ChromeMain(int argc, char** argv) { // via the preference prefs::kApplicationLocale. The browser process uses // the --lang flag to passe the value of the PrefService in here. Maybe this // value could be passed in a different way. - ResourceBundle::InitSharedInstance( - parsed_command_line.GetSwitchValue(switches::kLang)); + ResourceBundle::InitSharedInstance(ASCIIToWide( + parsed_command_line.GetSwitchValueASCII(switches::kLang))); #if defined(OS_MACOSX) // Update the process name (need resources to get the strings, so |