Bug 203195

Summary: Resource Load Statistics: Update cookie blocking in NetworkStorageSession after first user interaction
Product: WebKit Reporter: John Wilander <wilander>
Component: WebKit Misc.Assignee: John Wilander <wilander>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, cdumez, commit-queue, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch for landing none

Description John Wilander 2019-10-21 09:13:53 PDT
After a call to WebResourceLoadStatisticsStore::logUserInteraction(), we should update cookie blocking state in NetworkStorageSession if this interaction changed the domain's hadUserInteraction field to true.
Comment 1 Radar WebKit Bug Importer 2019-10-21 09:14:15 PDT
<rdar://problem/56464567>
Comment 2 John Wilander 2019-10-21 11:11:48 PDT
Created attachment 381420 [details]
Patch
Comment 3 John Wilander 2019-10-21 13:08:43 PDT
Created attachment 381433 [details]
Patch
Comment 4 John Wilander 2019-10-21 13:25:04 PDT
Cc'ing Chris for him to take a look at the innerCompletionHandler part.
Comment 5 Chris Dumez 2019-10-21 13:51:29 PDT
Comment on attachment 381433 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=381433&action=review

LGTM with 1 nit.

> Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:551
> +            postTaskReply([completionHandler = WTFMove(completionHandler)]() mutable {

Doesn't postTaskReply(WTFMove(completionHandler)); work?
Comment 6 John Wilander 2019-10-21 13:53:12 PDT
(In reply to Chris Dumez from comment #5)
> Comment on attachment 381433 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=381433&action=review
> 
> LGTM with 1 nit.
> 
> > Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:551
> > +            postTaskReply([completionHandler = WTFMove(completionHandler)]() mutable {
> 
> Doesn't postTaskReply(WTFMove(completionHandler)); work?

I actually started that way then reviewed how we've done it previously. I'll switch to that.

Thanks both of you!
Comment 7 John Wilander 2019-10-21 14:03:31 PDT
Created attachment 381448 [details]
Patch for landing
Comment 8 WebKit Commit Bot 2019-10-21 15:33:54 PDT
Comment on attachment 381448 [details]
Patch for landing

Clearing flags on attachment: 381448

Committed r251391: <https://trac.webkit.org/changeset/251391>
Comment 9 WebKit Commit Bot 2019-10-21 15:33:56 PDT
All reviewed patches have been landed.  Closing bug.