Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(797)

Unified Diff: net/base/mime_util.cc

Issue 18086: We should download text/csv mime types instead of displaying them.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/base/mime_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/mime_util.cc
===================================================================
--- net/base/mime_util.cc (revision 7938)
+++ net/base/mime_util.cc (working copy)
@@ -242,12 +242,9 @@
// 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,
« no previous file with comments | « no previous file | net/base/mime_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698