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

Unified Diff: net/base/mime_util.cc

Issue 7064044: Enabling MHTML. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 7 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 | « build/features_override.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/mime_util.cc
diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc
index 51bf9643a3641ba24d0436e2ef04781f820ebf9e..b6aa539429798ce5645c0950c90188f88b79e733 100644
--- a/net/base/mime_util.cc
+++ b/net/base/mime_util.cc
@@ -117,7 +117,8 @@ static const MimeInfo secondary_mappings[] = {
{ "application/rdf+xml", "rdf" },
{ "text/xml", "xsl,xbl" },
{ "application/vnd.mozilla.xul+xml", "xul" },
- { "application/x-shockwave-flash", "swf,swl" }
+ { "application/x-shockwave-flash", "swf,swl" },
+ { "multipart/related", "mht,mhtml" }
};
static const char* FindMimeType(const MimeInfo* mappings,
@@ -266,12 +267,13 @@ static const char* const supported_non_image_types[] = {
"application/atom+xml",
"application/json",
"application/x-x509-user-cert",
+ "multipart/related", // For MHTML support.
"multipart/x-mixed-replace"
// Note: ADDING a new type here will probably render it AS HTML. This can
// result in cross site scripting.
};
-COMPILE_ASSERT(arraysize(supported_non_image_types) == 16,
- supported_non_images_types_must_equal_16);
+COMPILE_ASSERT(arraysize(supported_non_image_types) == 17,
+ supported_non_images_types_must_equal_17);
wtc 2011/05/25 00:31:49 This COMPILE_ASSERT probably should be removed. A
// Mozilla 1.8 and WinIE 7 both accept text/javascript and text/ecmascript.
// Mozilla 1.8 accepts application/javascript, application/ecmascript, and
« no previous file with comments | « build/features_override.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698