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

Unified Diff: content/browser/web_contents/web_drag_source_mac.mm

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 | « content/browser/download/save_package.cc ('k') | content/child/web_url_loader_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_drag_source_mac.mm
diff --git a/content/browser/web_contents/web_drag_source_mac.mm b/content/browser/web_contents/web_drag_source_mac.mm
index 57e12a0b04ceb8575c9703a386726e8499f0a4c0..de66ebc1851202f7a6841f9a92a9f38099fbe9a7 100644
--- a/content/browser/web_contents/web_drag_source_mac.mm
+++ b/content/browser/web_contents/web_drag_source_mac.mm
@@ -69,12 +69,9 @@ base::FilePath GetFileNameFromDragData(const DropData& drop_data) {
// Images without ALT text will only have a file extension so we need to
// synthesize one from the provided extension and URL.
if (file_name.empty()) {
- // Retrieve the name from the URL.
- base::string16 suggested_filename =
- net::GetSuggestedFilename(drop_data.url, "", "", "", "", "");
- const std::string extension = file_name.Extension();
- file_name = FilePathFromFilename(suggested_filename);
- file_name = file_name.ReplaceExtension(extension);
+ file_name =
+ net::GenerateFileName(drop_data.url, std::string(), std::string(),
+ std::string(), std::string(), std::string());
}
return file_name;
« no previous file with comments | « content/browser/download/save_package.cc ('k') | content/child/web_url_loader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698