summaryrefslogtreecommitdiffstats
path: root/net/base/mime_util.cc
diff options
context:
space:
mode:
authorabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-22 08:21:00 +0000
committerabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-22 08:21:00 +0000
commite5c537aa4654e79406fe5867a06e896c7c840693 (patch)
tree7f182129d5a2aea3ce9d2d5bc50598b75df4496e /net/base/mime_util.cc
parentc44c97d3695e73e3f25738e047ac604d86aca5ff (diff)
downloadchromium_src-e5c537aa4654e79406fe5867a06e896c7c840693.zip
chromium_src-e5c537aa4654e79406fe5867a06e896c7c840693.tar.gz
chromium_src-e5c537aa4654e79406fe5867a06e896c7c840693.tar.bz2
We should download text/csv mime types instead of displaying them.
BUG=6079 R=darin Review URL: http://codereview.chromium.org/18349 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8448 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/mime_util.cc')
-rw-r--r--net/base/mime_util.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc
index e3ef145..03d09ad 100644
--- a/net/base/mime_util.cc
+++ b/net/base/mime_util.cc
@@ -242,12 +242,9 @@ bool MimeUtil::IsViewSourceMimeType(const char* mime_type) const {
// Mirrors WebViewImpl::CanShowMIMEType()
bool MimeUtil::IsSupportedMimeType(const std::string& mime_type) const {
- 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;
+ return (mime_type.compare(0, 6, "image/") == 0 &&
+ IsSupportedImageMimeType(mime_type.c_str())) ||
+ IsSupportedNonImageMimeType(mime_type.c_str());
}
bool MimeUtil::MatchesMimeType(const std::string &mime_type_pattern,