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

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: Fix windows strings. 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
Index: net/base/mime_util.cc
diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc
index 0d511201fd0cdfdda126ad480bc0157e5385e33f..b2a9d35cfd47e9ed9c077b324337dab91005267f 100644
--- a/net/base/mime_util.cc
+++ b/net/base/mime_util.cc
@@ -359,6 +359,16 @@ 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") {
+#if defined(OS_WIN)
+ *extension = base::UTF8ToUTF16("crt");
+#else
+ *extension = "crt";
+#endif
Ryan Sleevi 2015/10/30 23:33:47 BUG: Don't #ifdef this *extension = FILE_PATH_LIT
svaldez 2015/11/02 16:27:38 Done.
+ return true;
+ }
+
return g_mime_util.Get().GetPreferredExtensionForMimeType(mime_type,
extension);
}

Powered by Google App Engine
This is Rietveld 408576698