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 /chrome/browser/search_engines/template_url_parser.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 'chrome/browser/search_engines/template_url_parser.cc')
-rw-r--r-- | chrome/browser/search_engines/template_url_parser.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/chrome/browser/search_engines/template_url_parser.cc b/chrome/browser/search_engines/template_url_parser.cc index 06948cb..245ca3f 100644 --- a/chrome/browser/search_engines/template_url_parser.cc +++ b/chrome/browser/search_engines/template_url_parser.cc @@ -10,6 +10,7 @@ #include "base/logging.h" #include "base/scoped_ptr.h" +#include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "chrome/browser/search_engines/template_url.h" @@ -313,11 +314,11 @@ void ParseURL(const xmlChar** atts, ParsingContext* context) { } else if (name == kURLTemplateAttribute) { template_url = XMLCharToString(value); } else if (name == kURLIndexOffsetAttribute) { - index_offset = - std::max(1, StringToInt(WideToUTF16Hack(XMLCharToWide(value)))); + base::StringToInt(XMLCharToString(value), &index_offset); + index_offset = std::max(1, index_offset); } else if (name == kURLPageOffsetAttribute) { - page_offset = - std::max(1, StringToInt(WideToUTF16Hack(XMLCharToWide(value)))); + base::StringToInt(XMLCharToString(value), &page_offset); + page_offset = std::max(1, page_offset); } else if (name == kParamMethodAttribute) { is_post = LowerCaseEqualsASCII(XMLCharToString(value), "post"); } @@ -350,9 +351,9 @@ void ParseImage(const xmlChar** atts, ParsingContext* context) { if (name == kImageTypeAttribute) { type = XMLCharToWide(value); } else if (name == kImageWidthAttribute) { - width = StringToInt(WideToUTF16Hack(XMLCharToWide(value))); + base::StringToInt(XMLCharToString(value), &width); } else if (name == kImageHeightAttribute) { - height = StringToInt(WideToUTF16Hack(XMLCharToWide(value))); + base::StringToInt(XMLCharToString(value), &height); } attributes += 2; } |