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/courgette_tool.cc | |
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/courgette_tool.cc')
-rw-r--r-- | courgette/courgette_tool.cc | 12 |
1 files changed, 4 insertions, 8 deletions
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 + |