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

Unified Diff: net/base/filename_util_internal.cc

Issue 1423663012: Removing x-x509-user-cert mime handler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix C-D setting. Created 4 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 | « content/content_browser.gypi ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/filename_util_internal.cc
diff --git a/net/base/filename_util_internal.cc b/net/base/filename_util_internal.cc
index cdfb03c7a2e57b6b6f7e49dd41ac381029e3cfe7..d2143473633005b8b87ed42df90d27fce1b24ffb 100644
--- a/net/base/filename_util_internal.cc
+++ b/net/base/filename_util_internal.cc
@@ -245,6 +245,9 @@ base::string16 GetSuggestedFilenameImpl(
if (filename.empty() && !suggested_name.empty())
filename = suggested_name;
+ if (filename.empty() && mime_type == "application/x-x509-user-cert")
+ filename = "user.crt";
asanka 2016/01/11 21:16:34 Let's move this logic to DownloadTargetDeterminer
svaldez 2016/01/11 21:34:55 Done.
+
// Now try extracting the filename from the URL. GetFileNameFromURL() only
// looks at the last component of the URL and doesn't return the hostname as a
// failover.
« no previous file with comments | « content/content_browser.gypi ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698