From 64b92b56cd3c2fccdf4dbca1f930d12aef4c32b2 Mon Sep 17 00:00:00 2001 From: "jungshik@google.com" Date: Tue, 25 Nov 2008 19:03:18 +0000 Subject: Enable the encoding menu for javascript and css files. BUG=3565 TEST=Open a JS or CSS file by clicking a link to it in view-source and see if the encoding menu is enabled. Review URL: http://codereview.chromium.org/12619 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5982 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/download/save_package.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'chrome') diff --git a/chrome/browser/download/save_package.cc b/chrome/browser/download/save_package.cc index 3e206c8..52f9485 100644 --- a/chrome/browser/download/save_package.cc +++ b/chrome/browser/download/save_package.cc @@ -31,6 +31,7 @@ #include "chrome/common/pref_service.h" #include "chrome/common/stl_util-inl.h" #include "chrome/common/win_util.h" +#include "net/base/mime_util.h" #include "net/base/net_util.h" #include "net/url_request/url_request_context.h" #include "webkit/glue/dom_serializer_delegate.h" @@ -1026,7 +1027,9 @@ bool SavePackage::IsSavableContents(const std::string& contents_mime_type) { return contents_mime_type == "text/html" || contents_mime_type == "text/xml" || contents_mime_type == "application/xhtml+xml" || - contents_mime_type == "text/plain"; + contents_mime_type == "text/plain" || + contents_mime_type == "text/css" || + net::IsSupportedJavascriptMimeType(contents_mime_type.c_str()); } // Static -- cgit v1.1