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

Unified Diff: content/browser/download/save_package.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
Index: content/browser/download/save_package.cc
diff --git a/content/browser/download/save_package.cc b/content/browser/download/save_package.cc
index 8300c2d95b2b13d568acd91085b973af4d129fb1..64758792460709acd80b90c030059719660e5701 100644
--- a/content/browser/download/save_package.cc
+++ b/content/browser/download/save_package.cc
@@ -1402,10 +1402,9 @@ void SavePackage::OnPathPicked(
(type == SAVE_PAGE_TYPE_AS_COMPLETE_HTML)) << type;
// Ensure the filename is safe.
saved_main_file_path_ = final_name;
- // TODO(asanka): This call may block on IO and shouldn't be made
- // from the UI thread. See http://crbug.com/61827.
- net::GenerateSafeFileName(web_contents()->GetContentsMimeType(), false,
- &saved_main_file_path_);
+ net::EnsureSafePortableFileName(std::string(),
+ net::EXTENSION_OPTION_KEEP_EXISTING,
+ &saved_main_file_path_);
saved_main_directory_path_ = saved_main_file_path_.DirName();
save_type_ = type;
« no previous file with comments | « chrome/browser/download/download_target_determiner.cc ('k') | content/browser/web_contents/web_drag_source_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698