summaryrefslogtreecommitdiffstats
path: root/net/base/mime_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/base/mime_util.cc')
-rw-r--r--net/base/mime_util.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc
index 03d09ad..e3ef145 100644
--- a/net/base/mime_util.cc
+++ b/net/base/mime_util.cc
@@ -242,9 +242,12 @@ bool MimeUtil::IsViewSourceMimeType(const char* mime_type) const {
// Mirrors WebViewImpl::CanShowMIMEType()
bool MimeUtil::IsSupportedMimeType(const std::string& mime_type) const {
- return (mime_type.compare(0, 6, "image/") == 0 &&
- IsSupportedImageMimeType(mime_type.c_str())) ||
- IsSupportedNonImageMimeType(mime_type.c_str());
+ if (mime_type.compare(0, 5, "text/") == 0 ||
+ (mime_type.compare(0, 6, "image/") == 0 &&
+ IsSupportedImageMimeType(mime_type.c_str())) ||
+ IsSupportedNonImageMimeType(mime_type.c_str()))
+ return true;
+ return false;
}
bool MimeUtil::MatchesMimeType(const std::string &mime_type_pattern,