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

Unified Diff: content/public/browser/android/download_controller_android.h

Issue 1717783002: Fix an issue that download filename from content disposition is not sanitized (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pass localized default download file name Created 4 years, 10 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/public/browser/android/download_controller_android.h
diff --git a/content/public/browser/android/download_controller_android.h b/content/public/browser/android/download_controller_android.h
index 08fe6f749a60e95ee71fee3b3632cea5407ab06b..e048afda0ccb5149055ac48ce5775d08650bf426 100644
--- a/content/public/browser/android/download_controller_android.h
+++ b/content/public/browser/android/download_controller_android.h
@@ -57,6 +57,10 @@ class CONTENT_EXPORT DownloadControllerAndroid : public DownloadItem::Observer {
// Called by unit test to approve or disapprove file access request.
virtual void SetApproveFileAccessRequestForTesting(bool approve) {};
+ // Called to set the default download file name if it cannot be resolved
+ // from url and content disposition
+ virtual void SetDefaultDownloadFileName(const std::string& file_name) {}
+
protected:
~DownloadControllerAndroid() override {};
static DownloadControllerAndroid* download_controller_;

Powered by Google App Engine
This is Rietveld 408576698