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

Unified Diff: chrome/browser/download/download_target_determiner.cc

Issue 869233006: [net] Cleanup filename_util and make it portable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@clang-format-filename-tests
Patch Set: Created 5 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 | « no previous file | content/browser/download/save_package.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_target_determiner.cc
diff --git a/chrome/browser/download/download_target_determiner.cc b/chrome/browser/download/download_target_determiner.cc
index ad40bc067a679bb3e6b3eaa8a9ad713907ba75be..e19d7ef96038d25e85894798919dec24aec68804 100644
--- a/chrome/browser/download/download_target_determiner.cc
+++ b/chrome/browser/download/download_target_determiner.cc
@@ -269,10 +269,8 @@ void DownloadTargetDeterminer::NotifyExtensionsDone(
// Downloads/music/music/music/bar.mp3.
base::FilePath new_path(download_prefs_->DownloadPath().Append(
suggested_path).NormalizePathSeparators());
- // Do not pass a mime type to GenerateSafeFileName so that it does not force
- // the filename to have an extension if the (Chrome) extension does not
- // suggest it.
- net::GenerateSafeFileName(std::string(), false, &new_path);
+ net::EnsureSafePortableFileName(
+ std::string(), net::EXTENSION_OPTION_KEEP_EXISTING, &new_path);
virtual_path_ = new_path;
create_target_directory_ = true;
}
« no previous file with comments | « no previous file | content/browser/download/save_package.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698