summaryrefslogtreecommitdiffstats
path: root/chrome/browser/search_engines/template_url_parser.cc
diff options
context:
space:
mode:
authordsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-28 01:01:50 +0000
committerdsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-28 01:01:50 +0000
commit41fb1d7d262e44d8561a5c4d6d7e353f638b56e8 (patch)
tree0b6159a725069a98f9fb6e6e451949a6ce37ccfa /chrome/browser/search_engines/template_url_parser.cc
parent3131a289c0edff9d58da46cae16beae6bd6c0650 (diff)
downloadchromium_src-41fb1d7d262e44d8561a5c4d6d7e353f638b56e8.zip
chromium_src-41fb1d7d262e44d8561a5c4d6d7e353f638b56e8.tar.gz
chromium_src-41fb1d7d262e44d8561a5c4d6d7e353f638b56e8.tar.bz2
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
Diffstat (limited to 'chrome/browser/search_engines/template_url_parser.cc')
-rw-r--r--chrome/browser/search_engines/template_url_parser.cc12
1 files changed, 6 insertions, 6 deletions
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;
}
-
-