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

Issue 1701593002: Replace DidGetUserGesture with DidGetUserInteraction in the download request limiter. (Closed)

Created:
4 years, 10 months ago by dominickn
Modified:
4 years, 10 months ago
Reviewers:
asanka
CC:
asanka, chrome-apps-syd-reviews_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@download-request-limiter
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Replace DidGetUserGesture with DidGetUserInteraction in the download request limiter. User gestures such as clicks, gesture taps, and keyboard enter or space are currently used as signals in the download request limiter that the user is interacting with a page and therefore will accept a download from the page. These gestures are currently signaled via WebContentsObserver::DidGetUserGesture. This CL replaces DidGetUserGesture with DidGetUserInteraction, which triggers on all keyboard events and scrolls in addition to clicks and taps. The latter method has a simpler implementation in content, signals the type of interaction that triggered it, and is replacing the older DidGetUserGesture method, of which the download request limiter is one of only two clients. Scrolls are ignored, but other gestures are accepted by the limiter (with tests updated to check this). Functionally, the only change is that the limiter will now accept any keyboard input as a gesture signal, rather than just enter or space. This is appropriate as the gesture is being used as a heuristic for user interaction with the page. BUG=584154 Committed: https://crrev.com/71ad14d5cbffc802636071337a5db461357aae4c Cr-Commit-Position: refs/heads/master@{#376865}

Patch Set 1 #

Patch Set 2 : Fix tests on Android #

Patch Set 3 : Fix comment #

Total comments: 2

Patch Set 4 : Addressing reviewer comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -16 lines) Patch
M chrome/browser/download/download_request_limiter.h View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/download/download_request_limiter.cc View 1 2 3 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/download/download_request_limiter_unittest.cc View 1 6 chunks +38 lines, -10 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
dominickn
PTAL, thanks! rdsmith@ verbally okay'd this change, but he defers to your judgement as a ...
4 years, 10 months ago (2016-02-15 03:56:11 UTC) #2
dominickn
Ping.
4 years, 10 months ago (2016-02-18 22:53:50 UTC) #3
asanka
LGTM % comment update https://codereview.chromium.org/1701593002/diff/40001/chrome/browser/download/download_request_limiter.cc File chrome/browser/download/download_request_limiter.cc (right): https://codereview.chromium.org/1701593002/diff/40001/chrome/browser/download/download_request_limiter.cc#newcode104 chrome/browser/download/download_request_limiter.cc:104: // scrolled. It seems the ...
4 years, 10 months ago (2016-02-22 22:16:50 UTC) #4
dominickn
Thanks! https://codereview.chromium.org/1701593002/diff/40001/chrome/browser/download/download_request_limiter.cc File chrome/browser/download/download_request_limiter.cc (right): https://codereview.chromium.org/1701593002/diff/40001/chrome/browser/download/download_request_limiter.cc#newcode104 chrome/browser/download/download_request_limiter.cc:104: // scrolled. On 2016/02/22 22:16:50, asanka wrote: > ...
4 years, 10 months ago (2016-02-22 23:39:26 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1701593002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1701593002/60001
4 years, 10 months ago (2016-02-22 23:41:05 UTC) #8
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 10 months ago (2016-02-23 00:24:29 UTC) #9
commit-bot: I haz the power
4 years, 10 months ago (2016-02-23 00:25:40 UTC) #11
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/71ad14d5cbffc802636071337a5db461357aae4c
Cr-Commit-Position: refs/heads/master@{#376865}

Powered by Google App Engine
This is Rietveld 408576698