From 41fb1d7d262e44d8561a5c4d6d7e353f638b56e8 Mon Sep 17 00:00:00 2001 From: "dsh@google.com" Date: Sat, 28 Feb 2009 01:01:50 +0000 Subject: Get rid of wstring variants of StringToFoo. Review URL: http://codereview.chromium.org/28281 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10664 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/search_engines/template_url_parser.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'chrome/browser/search_engines/template_url_parser.cc') diff --git a/chrome/browser/search_engines/template_url_parser.cc b/chrome/browser/search_engines/template_url_parser.cc index 0bec982..8c44933 100644 --- a/chrome/browser/search_engines/template_url_parser.cc +++ b/chrome/browser/search_engines/template_url_parser.cc @@ -311,9 +311,11 @@ void ParseURL(const xmlChar** atts, ParsingContext* context) { } else if (name == kURLTemplateAttribute) { template_url = XMLCharToWide(value); } else if (name == kURLIndexOffsetAttribute) { - index_offset = std::max(1, StringToInt(XMLCharToWide(value))); + index_offset = + std::max(1, StringToInt(WideToUTF16Hack(XMLCharToWide(value)))); } else if (name == kURLPageOffsetAttribute) { - page_offset = std::max(1, StringToInt(XMLCharToWide(value))); + page_offset = + std::max(1, StringToInt(WideToUTF16Hack(XMLCharToWide(value)))); } else if (name == kParamMethodAttribute) { is_post = LowerCaseEqualsASCII(XMLCharToString(value), "post"); } @@ -346,9 +348,9 @@ void ParseImage(const xmlChar** atts, ParsingContext* context) { if (name == kImageTypeAttribute) { type = XMLCharToWide(value); } else if (name == kImageWidthAttribute) { - width = StringToInt(XMLCharToWide(value)); + width = StringToInt(WideToUTF16Hack(XMLCharToWide(value))); } else if (name == kImageHeightAttribute) { - height = StringToInt(XMLCharToWide(value)); + height = StringToInt(WideToUTF16Hack(XMLCharToWide(value))); } attributes += 2; } @@ -585,5 +587,3 @@ bool TemplateURLParser::Parse(const unsigned char* data, size_t length, } return false; } - - -- cgit v1.1