Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1301)

Unified Diff: chrome/browser/browser_init.cc

Issue 28281: Get rid of wstring variants of StringToFoo. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/browser_init.cc
===================================================================
--- chrome/browser/browser_init.cc (revision 10641)
+++ chrome/browser/browser_init.cc (working copy)
@@ -217,7 +217,7 @@
if (!RenderProcessHost::run_renderer_in_process()) {
std::wstring port_str =
command_line_.GetSwitchValue(switches::kRemoteShellPort);
- int64 port = StringToInt64(port_str);
+ int64 port = StringToInt64(WideToUTF16Hack(port_str));
if (port > 0 && port < 65535) {
g_browser_process->InitDebuggerWrapper(static_cast<int>(port));
} else {
@@ -421,7 +421,7 @@
command_line.GetSwitchValue(switches::kOmniBoxPopupCount);
if (!popup_count_string.empty()) {
int count = 0;
- if (StringToInt(popup_count_string, &count)) {
+ if (StringToInt(WideToUTF16Hack(popup_count_string), &count)) {
const int popup_count = std::max(0, count);
AutocompleteResult::set_max_matches(popup_count);
AutocompleteProvider::set_max_matches(popup_count / 2);
@@ -435,7 +435,7 @@
command_line.GetSwitchValue(switches::kTabCountToLoadOnSessionRestore);
if (!tab_count_string.empty()) {
int count = 0;
- if (StringToInt(tab_count_string, &count)) {
+ if (StringToInt(WideToUTF16Hack(tab_count_string), &count)) {
const int tab_count = std::max(0, count);
SessionRestore::num_tabs_to_load_ = static_cast<size_t>(tab_count);
}

Powered by Google App Engine
This is Rietveld 408576698