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

Unified Diff: net/base/mime_util.cc

Issue 1423663012: Removing x-x509-user-cert mime handler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify checks and add Download handler for user certs. Created 5 years, 2 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 | « content/browser/loader/mime_type_resource_handler.cc ('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 0d511201fd0cdfdda126ad480bc0157e5385e33f..8e7496442107da13e9779f826766c35ca53a0657 100644
--- a/net/base/mime_util.cc
+++ b/net/base/mime_util.cc
@@ -359,6 +359,12 @@ bool GetWellKnownMimeTypeFromExtension(const base::FilePath::StringType& ext,
bool GetPreferredExtensionForMimeType(const std::string& mime_type,
base::FilePath::StringType* extension) {
+ // Force .crt extension for client certificates.
+ if (mime_type == "application/x-x509-user-cert") {
+ *extension = "crt";
mmenke 2015/10/29 16:40:46 Shouldn't this just be in secondary_mappings, or p
svaldez 2015/10/29 16:54:59 Putting it in primary/secondary_mappings restricts
+ return true;
+ }
+
return g_mime_util.Get().GetPreferredExtensionForMimeType(mime_type,
extension);
}
« no previous file with comments | « content/browser/loader/mime_type_resource_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698