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

Unified Diff: chrome/browser/resources/md_downloads/action_service.js

Issue 2535483003: Require user gesture for powerful download operations (Closed)
Patch Set: Run vulcanize.py Created 4 years, 1 month 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 | « no previous file | chrome/browser/resources/md_downloads/crisper.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/md_downloads/action_service.js
diff --git a/chrome/browser/resources/md_downloads/action_service.js b/chrome/browser/resources/md_downloads/action_service.js
index 6c10e035dbb43149082e683b864f6ad8a73aecbd..c3557124dea08ddc18ac5b46061bc0cda63d6d74 100644
--- a/chrome/browser/resources/md_downloads/action_service.js
+++ b/chrome/browser/resources/md_downloads/action_service.js
@@ -78,12 +78,14 @@ cr.define('downloads', function() {
},
/** Opens the current local destination for downloads. */
- openDownloadsFolder: chrome.send.bind(chrome, 'openDownloadsFolder'),
+ openDownloadsFolder: function() {
+ chrome.send('openDownloadsFolderRequiringGesture');
+ },
/**
* @param {string} id ID of the download to run locally on the user's box.
*/
- openFile: chromeSendWithId('openFile'),
+ openFile: chromeSendWithId('openFileRequiringGesture'),
/** @param {string} id ID the of the progressing download to pause. */
pause: chromeSendWithId('pause'),
@@ -98,7 +100,7 @@ cr.define('downloads', function() {
* @param {string} id ID of the dangerous download to save despite
* warnings.
*/
- saveDangerous: chromeSendWithId('saveDangerous'),
+ saveDangerous: chromeSendWithId('saveDangerousRequiringGesture'),
/**
* @param {string} searchText What to search for.
« no previous file with comments | « no previous file | chrome/browser/resources/md_downloads/crisper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698