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

Unified Diff: ui/base/dragdrop/os_exchange_data_provider_win.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 | « net/base/filename_util_unsafe.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/dragdrop/os_exchange_data_provider_win.cc
diff --git a/ui/base/dragdrop/os_exchange_data_provider_win.cc b/ui/base/dragdrop/os_exchange_data_provider_win.cc
index 3b614bc15618736b9376ba580eb160c20941be19..ba0b893fc4f94fbd655681ba797c826c72fe3f39 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_win.cc
+++ b/ui/base/dragdrop/os_exchange_data_provider_win.cc
@@ -416,10 +416,13 @@ bool OSExchangeDataProviderWin::GetURLAndTitle(
DCHECK(url->is_valid());
return true;
} else if (GetPlainTextURL(source_object_.get(), url)) {
- if (url->is_valid())
- *title = net::GetSuggestedFilename(*url, "", "", "", "", std::string());
- else
+ if (url->is_valid()) {
+ *title = net::GenerateFileName(*url, std::string(), std::string(),
+ std::string(), std::string(),
+ std::string()).AsUTF16Unsafe();
+ } else {
title->clear();
+ }
return true;
}
return false;
@@ -907,8 +910,9 @@ static void CreateValidFileNameFromTitle(const GURL& url,
base::string16* validated) {
if (title.empty()) {
if (url.is_valid()) {
- *validated = net::GetSuggestedFilename(url, "", "", "", "",
- std::string());
+ *validated = net::GenerateFileName(url, std::string(), std::string(),
+ std::string(), std::string(),
+ std::string()).AsUTF16Unsafe();
} else {
// Nothing else can be done, just use a default.
*validated =
« no previous file with comments | « net/base/filename_util_unsafe.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698