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

Unified Diff: content/public/browser/download_manager_delegate.h

Issue 2060923002: Neutralize dangerous subresource files during Save Page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@save-package-cleanup-1
Patch Set: Reword note in README.md Created 4 years, 6 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_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/download_manager_delegate.h
diff --git a/content/public/browser/download_manager_delegate.h b/content/public/browser/download_manager_delegate.h
index 13b395721c7d6b7cef81f083a95beb3d38004a04..bf68f15801a930637a88df2a40c9ff299aebd8db 100644
--- a/content/public/browser/download_manager_delegate.h
+++ b/content/public/browser/download_manager_delegate.h
@@ -119,6 +119,16 @@ class CONTENT_EXPORT DownloadManagerDelegate {
const SavePackagePathPickedCallback& callback) {
}
+ // Sanitize a filename that's going to be used for a subresource of a
jam 2016/06/16 23:13:06 should SavePackage be in the method name to make i
asanka 2016/06/21 15:39:38 Done.
+ // SavePackage.
+ //
+ // If the delegate does nothing, the default filename already populated in
+ // |filename| will be used. Otherwise, the delegate can update |filename| to
+ // the desired filename.
+ //
+ // |filename->DirName()| must be the same both before and after the call.
jam 2016/06/16 23:13:06 why not just pass in a file name that doesn't incl
asanka 2016/06/21 15:39:38 Done. This was already the case, but I've commente
+ virtual void SanitizeSaveItemFilename(base::FilePath* filename) {}
+
// Opens the file associated with this download.
virtual void OpenDownload(DownloadItem* download) {}
« no previous file with comments | « content/browser/download/save_package_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698