summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-24 17:57:39 +0000
committerwtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-24 17:57:39 +0000
commit8c1445388c4f9cdf1f2214d7924935b5891150ca (patch)
tree3b958cf7aa1bb706402096b6212eda42b28d6d80
parent8a3422c9488ce79e305973d29a01811762e35465 (diff)
downloadchromium_src-8c1445388c4f9cdf1f2214d7924935b5891150ca.zip
chromium_src-8c1445388c4f9cdf1f2214d7924935b5891150ca.tar.gz
chromium_src-8c1445388c4f9cdf1f2214d7924935b5891150ca.tar.bz2
Don't use WideToASCII because there is an IsStringASCII
assertion in WideToASCII. Since mime_type comes from an external source, we can't assert that it is 7-bit ASCII. R=darin BUG=b/1361712 Review URL: http://codereview.chromium.org/252 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2554 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/glue/webframeloaderclient_impl.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/webkit/glue/webframeloaderclient_impl.cc b/webkit/glue/webframeloaderclient_impl.cc
index 97ba400..3250144 100644
--- a/webkit/glue/webframeloaderclient_impl.cc
+++ b/webkit/glue/webframeloaderclient_impl.cc
@@ -1165,8 +1165,11 @@ bool WebFrameLoaderClient::canShowMIMEType(const String& mime_type) const {
// "internally" (i.e. inside the browser) regardless of whether or not the
// browser or a plugin is doing the rendering.
+ // mime_type strings are supposed to be ASCII, but if they are not for some
+ // reason, then it just means that the mime type will fail all of these "is
+ // supported" checks and go down the path of an unhandled mime type.
if (net::IsSupportedMimeType(
- WideToASCII(webkit_glue::StringToStdWString(mime_type))))
+ webkit_glue::CStringToStdString(mime_type.latin1())))
return true;
// See if the type is handled by an installed plugin, if so, we can show it.