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

Issue 650043002: Improve ResourceRequestInfo::HasUserGesture API docs (Closed)

Created:
6 years, 2 months ago by jochen (gone - plz use gerrit)
Modified:
6 years, 2 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, mattm
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Improve ResourceRequestInfo::HasUserGesture API docs The name is misleading, as e.g. a request for a top-level resource in a new window won't have the flag set, even if it was triggered by a user gesture The flag is exposed via the webvia API, so we can't just rip it out. BUG=420649 R=mkosiba@chromium.org NOTRY=true Committed: https://crrev.com/d426dceb346561b7f78742111c5dfe6f7f59b0af Cr-Commit-Position: refs/heads/master@{#300082}

Patch Set 1 #

Patch Set 2 : updates #

Patch Set 3 : updates #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -0 lines) Patch
M content/public/browser/resource_request_info.h View 1 2 1 chunk +7 lines, -0 lines 2 comments Download

Messages

Total messages: 13 (2 generated)
jochen (gone - plz use gerrit)
6 years, 2 months ago (2014-10-13 07:37:52 UTC) #1
jochen (gone - plz use gerrit)
ptal
6 years, 2 months ago (2014-10-17 07:09:55 UTC) #2
mkosiba (inactive)
lgtm https://codereview.chromium.org/650043002/diff/220001/content/public/browser/resource_request_info.h File content/public/browser/resource_request_info.h (right): https://codereview.chromium.org/650043002/diff/220001/content/public/browser/resource_request_info.h#newcode107 content/public/browser/resource_request_info.h:107: // DO NOT BASE SECURITY DECISIONS ON THIS ...
6 years, 2 months ago (2014-10-17 08:54:33 UTC) #3
jochen (gone - plz use gerrit)
+mattm for safe browsing +rdsmith for downloads
6 years, 2 months ago (2014-10-17 08:56:21 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/650043002/220001
6 years, 2 months ago (2014-10-17 08:56:57 UTC) #6
commit-bot: I haz the power
Committed patchset #3 (id:220001)
6 years, 2 months ago (2014-10-17 08:57:22 UTC) #7
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/d426dceb346561b7f78742111c5dfe6f7f59b0af Cr-Commit-Position: refs/heads/master@{#300082}
6 years, 2 months ago (2014-10-17 08:58:11 UTC) #8
Randy Smith (Not in Mondays)
+asanka, FHI. https://codereview.chromium.org/650043002/diff/220001/content/public/browser/resource_request_info.h File content/public/browser/resource_request_info.h (right): https://codereview.chromium.org/650043002/diff/220001/content/public/browser/resource_request_info.h#newcode107 content/public/browser/resource_request_info.h:107: // DO NOT BASE SECURITY DECISIONS ON ...
6 years, 2 months ago (2014-10-20 14:20:46 UTC) #10
mkosiba (inactive)
On 2014/10/20 14:20:46, rdsmith wrote: > https://codereview.chromium.org/650043002/diff/220001/content/public/browser/resource_request_info.h#newcode107 > content/public/browser/resource_request_info.h:107: // DO NOT BASE SECURITY > ...
6 years, 2 months ago (2014-10-20 14:58:51 UTC) #11
Randy Smith (Not in Mondays)
On 2014/10/20 14:58:51, mkosiba wrote: > On 2014/10/20 14:20:46, rdsmith wrote: > > > https://codereview.chromium.org/650043002/diff/220001/content/public/browser/resource_request_info.h#newcode107 ...
6 years, 2 months ago (2014-10-20 15:01:45 UTC) #12
asanka
6 years, 2 months ago (2014-10-20 15:28:09 UTC) #13
Message was sent while issue was closed.
On 2014/10/20 15:01:45, rdsmith wrote:
> On 2014/10/20 14:58:51, mkosiba wrote:
> > On 2014/10/20 14:20:46, rdsmith wrote:
> > >
> >
>
https://codereview.chromium.org/650043002/diff/220001/content/public/browser/...
> > > content/public/browser/resource_request_info.h:107: // DO NOT BASE
SECURITY
> > > DECISIONS ON THIS FLAG!
> > > On 2014/10/17 08:54:33, mkosiba wrote:
> > > > Yes, you should be especially wary of using this to determine what to do
> > with
> > > a
> > > > download :D
> > > 
> > > We'd welcome other other suggestions as to how to make download decisions
> (but
> > > you'll probably have to mind-meld extensively with the current conditional
> > > cascade and you may feel dirty afterwards :-}).  Whether and how to
download
> > 
> > Sorry, I just wanted to point out to Jochen that there already is code using
> > that field for security purposes. Not that you guys should change your
> > implementation.
> > I have indeed mind-melded and embarrassingly enough even written such code,
> > so I can totally relate.
> > 
> > > resources has a pretty strong tension between security and convenience,
and
> > when
> > > we've moved towards security (e.g. prompting people around downloading
PDFs
> > > because they can contain arbitrary executable code) we've gotten howls of
> > > protest.  I don't expect we're going to change our current use of user
> > gesture,
> > > even though we do indeed know it's not reliable :-{.
> > 
> > I think this is fine as long as you guys are aware of the quirks.
> 
> Somewhat painfully aware :-}.  Thanks!

Yup. Thanks for the heads up. There seems to be some extensions handling logic
that's not taking the unreliability of the "has user gesture" flag. I'll try to
get that resolved.

The downloads code is supposed to only use this flag when it's paired with some
other signal (like the user having a history of having visited the referrer
site).

Powered by Google App Engine
This is Rietveld 408576698