summaryrefslogtreecommitdiffstats
path: root/net/tools
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 /net/tools
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 'net/tools')
-rw-r--r--net/tools/crash_cache/crash_cache.cc4
-rw-r--r--net/tools/fetch/fetch_client.cc7
-rw-r--r--net/tools/hresolv/hresolv.cc7
3 files changed, 12 insertions, 6 deletions
diff --git a/net/tools/crash_cache/crash_cache.cc b/net/tools/crash_cache/crash_cache.cc
index 1d11013..561f092 100644
--- a/net/tools/crash_cache/crash_cache.cc
+++ b/net/tools/crash_cache/crash_cache.cc
@@ -16,8 +16,10 @@
#include "base/message_loop.h"
#include "base/path_service.h"
#include "base/process_util.h"
+#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "base/thread.h"
+#include "base/utf_string_conversions.h"
#include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h"
#include "net/disk_cache/backend_impl.h"
@@ -43,7 +45,7 @@ int RunSlave(RankCrashes action) {
PathService::Get(base::FILE_EXE, &exe);
CommandLine cmdline(exe);
- cmdline.AppendLooseValue(ASCIIToWide(IntToString(action)));
+ cmdline.AppendLooseValue(UTF8ToWide(base::IntToString(action)));
base::ProcessHandle handle;
if (!base::LaunchApp(cmdline, false, false, &handle)) {
diff --git a/net/tools/fetch/fetch_client.cc b/net/tools/fetch/fetch_client.cc
index 8863dd7..15d6e16 100644
--- a/net/tools/fetch/fetch_client.cc
+++ b/net/tools/fetch/fetch_client.cc
@@ -9,6 +9,7 @@
#include "base/message_loop.h"
#include "base/singleton.h"
#include "base/stats_counters.h"
+#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "net/base/completion_callback.h"
#include "net/base/host_resolver.h"
@@ -125,8 +126,10 @@ int main(int argc, char**argv) {
if (!url.length())
usage(argv[0]);
int client_limit = 1;
- if (parsed_command_line.HasSwitch("n"))
- StringToInt(parsed_command_line.GetSwitchValueASCII("n"), &client_limit);
+ if (parsed_command_line.HasSwitch("n")) {
+ base::StringToInt(parsed_command_line.GetSwitchValueASCII("n"),
+ &client_limit);
+ }
bool use_cache = parsed_command_line.HasSwitch("use-cache");
// Do work here.
diff --git a/net/tools/hresolv/hresolv.cc b/net/tools/hresolv/hresolv.cc
index d524bd7..3a0a902 100644
--- a/net/tools/hresolv/hresolv.cc
+++ b/net/tools/hresolv/hresolv.cc
@@ -28,6 +28,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/message_loop.h"
+#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "base/thread.h"
#include "base/time.h"
@@ -324,7 +325,7 @@ bool ParseCommandLine(CommandLine* command_line, CommandLineOptions* options) {
options->async = command_line->HasSwitch(kAsync);
if (command_line->HasSwitch(kCacheSize)) {
std::string cache_size = command_line->GetSwitchValueASCII(kCacheSize);
- bool valid_size = StringToInt(cache_size, &options->cache_size);
+ bool valid_size = base::StringToInt(cache_size, &options->cache_size);
if (valid_size) {
valid_size = options->cache_size >= 0;
}
@@ -336,7 +337,7 @@ bool ParseCommandLine(CommandLine* command_line, CommandLineOptions* options) {
if (command_line->HasSwitch(kCacheTtl)) {
std::string cache_ttl = command_line->GetSwitchValueASCII(kCacheTtl);
- bool valid_ttl = StringToInt(cache_ttl, &options->cache_ttl);
+ bool valid_ttl = base::StringToInt(cache_ttl, &options->cache_ttl);
if (valid_ttl) {
valid_ttl = options->cache_ttl >= 0;
}
@@ -400,7 +401,7 @@ bool ReadHostsAndTimesFromFile(const FilePath& path,
}
case 2: {
int timestamp;
- if (!StringToInt(tokens[1], &timestamp)) {
+ if (!base::StringToInt(tokens[1], &timestamp)) {
// Unexpected value - keep going.
}
if (timestamp < previous_timestamp) {