diff options
Diffstat (limited to 'chrome/browser/search_engines')
-rw-r--r-- | chrome/browser/search_engines/template_url_model.cc | 2 | ||||
-rw-r--r-- | chrome/browser/search_engines/template_url_parser.cc | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/search_engines/template_url_model.cc b/chrome/browser/search_engines/template_url_model.cc index 316ad80..cac5bea 100644 --- a/chrome/browser/search_engines/template_url_model.cc +++ b/chrome/browser/search_engines/template_url_model.cc @@ -828,7 +828,7 @@ bool TemplateURLModel::LoadDefaultSearchProviderFromPrefs( (*default_provider)->SetURL(search_url, 0, 0); (*default_provider)->SetSuggestionsURL(suggest_url, 0, 0); if (!id_string.empty()) - (*default_provider)->set_id(StringToInt64(id_string)); + (*default_provider)->set_id(StringToInt64(WideToUTF16Hack(id_string))); return true; } 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; } - - |