summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_init.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-31 17:29:25 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-31 17:29:25 +0000
commite83326f8400791e92875546b2fd1885a3a17d1b1 (patch)
treeedbe773208b1a9f6965b45b55da10afd210ea7bb /chrome/browser/browser_init.cc
parent8e0a03bf3b1aacaa7a2bc2561d8eb1b83eb9c2e5 (diff)
downloadchromium_src-e83326f8400791e92875546b2fd1885a3a17d1b1.zip
chromium_src-e83326f8400791e92875546b2fd1885a3a17d1b1.tar.gz
chromium_src-e83326f8400791e92875546b2fd1885a3a17d1b1.tar.bz2
Convert more callers of the integer/string functions to using
string_number_conversions.h TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3013046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54454 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_init.cc')
-rw-r--r--chrome/browser/browser_init.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index 8dc4cec..58615eb 100644
--- a/chrome/browser/browser_init.cc
+++ b/chrome/browser/browser_init.cc
@@ -13,6 +13,7 @@
#include "base/histogram.h"
#include "base/path_service.h"
#include "base/scoped_ptr.h"
+#include "base/string_number_conversions.h"
#include "chrome/browser/automation/automation_provider.h"
#include "chrome/browser/automation/automation_provider_list.h"
#include "chrome/browser/automation/chrome_frame_automation_provider.h"
@@ -499,16 +500,16 @@ bool BrowserInit::LaunchWithProfile::Launch(Profile* profile,
if (command_line_.HasSwitch(switches::kRemoteShellPort)) {
std::string port_str =
command_line_.GetSwitchValueASCII(switches::kRemoteShellPort);
- int64 port = StringToInt64(port_str);
- if (port > 0 && port < 65535)
+ int64 port;
+ if (base::StringToInt64(port_str, &port) && port > 0 && port < 65535)
g_browser_process->InitDebuggerWrapper(static_cast<int>(port), false);
else
DLOG(WARNING) << "Invalid remote shell port number " << port;
} else if (command_line_.HasSwitch(switches::kRemoteDebuggingPort)) {
std::string port_str =
command_line_.GetSwitchValueASCII(switches::kRemoteDebuggingPort);
- int64 port = StringToInt64(port_str);
- if (port > 0 && port < 65535)
+ int64 port;
+ if (base::StringToInt64(port_str, &port) && port > 0 && port < 65535)
g_browser_process->InitDebuggerWrapper(static_cast<int>(port), true);
else
DLOG(WARNING) << "Invalid http debugger port number " << port;
@@ -940,7 +941,7 @@ bool BrowserInit::ProcessCmdLineImpl(const CommandLine& command_line,
if (command_line.HasSwitch(switches::kRestoreLastSession)) {
std::string restore_session_value(
command_line.GetSwitchValueASCII(switches::kRestoreLastSession));
- StringToInt(restore_session_value, &expected_tab_count);
+ base::StringToInt(restore_session_value, &expected_tab_count);
} else {
expected_tab_count =
std::max(1, static_cast<int>(command_line.args().size()));