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

Unified Diff: content/browser/android/download_controller_android_impl.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/browser/android/download_controller_android_impl.h
diff --git a/content/browser/android/download_controller_android_impl.h b/content/browser/android/download_controller_android_impl.h
index 386135e00cced06d46587e6ea533fe86f42998f1..9045d2992efa5418b2ee733f041c70061aa193fe 100644
--- a/content/browser/android/download_controller_android_impl.h
+++ b/content/browser/android/download_controller_android_impl.h
@@ -59,6 +59,7 @@ class DownloadControllerAndroidImpl : public DownloadControllerAndroid {
void AcquireFileAccessPermission(
WebContents* web_contents,
const AcquireFileAccessPermissionCallback& callback) override;
+ void SetDefaultDownloadFileName(const std::string& file_name) override;
private:
// Used to store all the information about an Android download.
@@ -142,6 +143,8 @@ class DownloadControllerAndroidImpl : public DownloadControllerAndroid {
JavaObject* java_object_;
+ std::string default_file_name_;
+
ScopedVector<DeferredDownloadObserver> deferred_downloads_;
DISALLOW_COPY_AND_ASSIGN(DownloadControllerAndroidImpl);

Powered by Google App Engine
This is Rietveld 408576698