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

Unified Diff: chrome/browser/download/download_request_limiter.cc

Issue 1701593002: Replace DidGetUserGesture with DidGetUserInteraction in the download request limiter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@download-request-limiter
Patch Set: Fix comment 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: chrome/browser/download/download_request_limiter.cc
diff --git a/chrome/browser/download/download_request_limiter.cc b/chrome/browser/download/download_request_limiter.cc
index a2bdf3f71edbf62599d96cc87c5ecd60221a371b..68684b9dd63c104fe6293db316d7c46f29ebe2d2 100644
--- a/chrome/browser/download/download_request_limiter.cc
+++ b/chrome/browser/download/download_request_limiter.cc
@@ -97,9 +97,11 @@ void DownloadRequestLimiter::TabDownloadState::DidNavigateMainFrame(
}
}
-void DownloadRequestLimiter::TabDownloadState::DidGetUserGesture() {
- if (is_showing_prompt()) {
- // Don't change the state if the user clicks on the page somewhere.
+void DownloadRequestLimiter::TabDownloadState::DidGetUserInteraction(
+ const blink::WebInputEvent::Type type) {
+ if (is_showing_prompt() || type == blink::WebInputEvent::MouseWheel) {
+ // Don't change the state if the user clicks on the page somewhere or has
+ // scrolled.
asanka 2016/02/22 22:16:50 It seems the code is trying to avoid changing the
dominickn 2016/02/22 23:39:26 Done.
return;
}
« no previous file with comments | « chrome/browser/download/download_request_limiter.h ('k') | chrome/browser/download/download_request_limiter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698