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

Unified Diff: chrome/browser/android/download/download_controller.cc

Issue 2801793002: Pass file name when downloading OMA DRM files (Closed)
Patch Set: Created 3 years, 8 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 | « chrome/browser/android/download/chrome_download_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/download/download_controller.cc
diff --git a/chrome/browser/android/download/download_controller.cc b/chrome/browser/android/download/download_controller.cc
index ec34ef218a8ec188536f8e61d66e53f18b5d1585..92083f1e48480b034ee75e9716a1663dc6dc41ef 100644
--- a/chrome/browser/android/download/download_controller.cc
+++ b/chrome/browser/android/download/download_controller.cc
@@ -267,11 +267,15 @@ void DownloadController::StartAndroidDownloadInternal(
return;
}
- ChromeDownloadDelegate::FromWebContents(web_contents)->
- EnqueueDownloadManagerRequest(
- info.url.spec(), info.user_agent,
- info.content_disposition, info.original_mime_type,
- info.cookie, info.referer);
+ base::string16 filename =
+ net::GetSuggestedFilename(info.url, info.content_disposition,
+ std::string(), // referrer_charset
+ std::string(), // suggested_name
+ info.original_mime_type, default_file_name_);
+ ChromeDownloadDelegate::FromWebContents(web_contents)
+ ->EnqueueDownloadManagerRequest(info.url.spec(), info.user_agent,
+ filename, info.original_mime_type,
+ info.cookie, info.referer);
}
bool DownloadController::HasFileAccessPermission(
« no previous file with comments | « chrome/browser/android/download/chrome_download_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698