diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-31 17:29:25 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-31 17:29:25 +0000 |
commit | e83326f8400791e92875546b2fd1885a3a17d1b1 (patch) | |
tree | edbe773208b1a9f6965b45b55da10afd210ea7bb /courgette | |
parent | 8e0a03bf3b1aacaa7a2bc2561d8eb1b83eb9c2e5 (diff) | |
download | chromium_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 'courgette')
-rw-r--r-- | courgette/adjustment_method.cc | 5 | ||||
-rw-r--r-- | courgette/courgette_tool.cc | 12 |
2 files changed, 7 insertions, 10 deletions
diff --git a/courgette/adjustment_method.cc b/courgette/adjustment_method.cc index 930dc59..e82d669 100644 --- a/courgette/adjustment_method.cc +++ b/courgette/adjustment_method.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -13,6 +13,7 @@ #include "base/basictypes.h" #include "base/logging.h" +#include "base/string_number_conversions.h" #include "base/string_util.h" #include "courgette/assembly_program.h" @@ -183,7 +184,7 @@ static std::string ToString(Node* node) { s += StringPrintf("%u", node->count_); s += " @"; - s += Uint64ToString(node->edges_in_frequency_order.size()); + s += base::Uint64ToString(node->edges_in_frequency_order.size()); s += "}"; return s; } diff --git a/courgette/courgette_tool.cc b/courgette/courgette_tool.cc index ef9fa71..30714d3 100644 --- a/courgette/courgette_tool.cc +++ b/courgette/courgette_tool.cc @@ -10,8 +10,9 @@ #include "base/command_line.h" #include "base/file_util.h" #include "base/logging.h" +#include "base/string_number_conversions.h" #include "base/string_util.h" - +#include "base/utf_string_conversions.h" #include "courgette/third_party/bsdiff.h" #include "courgette/courgette.h" #include "courgette/streams.h" @@ -234,7 +235,7 @@ void DisassembleAdjustDiff(const std::wstring& model_file, if (status != courgette::OK) Problem("-xxx failed."); WriteSinkToFile(&patch_stream, - output_file_root + L"-" + IntToWString(i)); + output_file_root + L"-" + UTF8ToWide(base::IntToString(i))); } } @@ -339,11 +340,6 @@ void ApplyBSDiffPatch(const std::wstring& old_file, WriteSinkToFile(&new_stream, new_file); } -bool WideStringToInt(const std::wstring& str, int *output) { - string16 copy(str.begin(), str.end()); - return StringToInt(copy, output); -} - int main(int argc, const char* argv[]) { base::AtExitManager at_exit_manager; CommandLine::Init(argc, argv); @@ -374,7 +370,7 @@ int main(int argc, const char* argv[]) { int repeat_count = 1; std::string repeat_switch = command_line.GetSwitchValueASCII("repeat"); if (!repeat_switch.empty()) - if (!StringToInt(repeat_switch, &repeat_count)) + if (!base::StringToInt(repeat_switch, &repeat_count)) repeat_count = 1; if (cmd_dis + cmd_asm + cmd_disadj + cmd_make_patch + cmd_apply_patch + |