Bug 181556 - Add optional logging of ITP-related user interaction information
Summary: Add optional logging of ITP-related user interaction information
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Rollin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-01-11 13:26 PST by Keith Rollin
Modified: 2018-01-11 17:55 PST (History)
8 users (show)

See Also:


Attachments
Patch (8.45 KB, patch)
2018-01-11 13:30 PST, Keith Rollin
no flags Details | Formatted Diff | Diff
Patch (8.21 KB, patch)
2018-01-11 16:20 PST, Keith Rollin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Rollin 2018-01-11 13:26:50 PST
In order to support the tracking of the efficacy of Intelligent Tracking Protection, add some logging indicating when the user interacts with a page in a way that affects cookie partitioning. This logging is off by default, and is enabled with `defaults write -g WebKitLogCookieInformation -bool true`.
Comment 1 Keith Rollin 2018-01-11 13:30:52 PST
Created attachment 331109 [details]
Patch
Comment 2 EWS Watchlist 2018-01-11 13:32:36 PST
Attachment 331109 [details] did not pass style-queue:


ERROR: Source/WebCore/loader/ResourceLoadObserver.cpp:309:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebCore/loader/ResourceLoadObserver.cpp:310:  Missing space before {  [whitespace/braces] [5]
Total errors found: 2 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Brent Fulgham 2018-01-11 14:51:34 PST
Comment on attachment 331109 [details]
Patch

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

> Source/WebCore/loader/ResourceLoadObserver.cpp:305
> +        auto counter = ++m_loggingCounter;

I think this is guaranteed to always happen on the Main Thread, so m_loggingCounter might not need to be <atomic>. But this only happens in instrumented builds, so it's not worth worrying about.
Comment 4 Brent Fulgham 2018-01-11 14:51:47 PST
So r=me.
Comment 5 Chris Dumez 2018-01-11 15:00:49 PST
Comment on attachment 331109 [details]
Patch

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

>> Source/WebCore/loader/ResourceLoadObserver.cpp:305
>> +        auto counter = ++m_loggingCounter;
> 
> I think this is guaranteed to always happen on the Main Thread, so m_loggingCounter might not need to be <atomic>. But this only happens in instrumented builds, so it's not worth worrying about.

Yes, always called from the same thread, otherwise the call to m_notificationTimer.stop(); above would be very unsafe. Please drop the atomic.
Comment 6 Keith Rollin 2018-01-11 16:20:43 PST
Created attachment 331138 [details]
Patch
Comment 7 EWS Watchlist 2018-01-11 16:22:21 PST
Attachment 331138 [details] did not pass style-queue:


ERROR: Source/WebCore/loader/ResourceLoadObserver.cpp:309:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebCore/loader/ResourceLoadObserver.cpp:310:  Missing space before {  [whitespace/braces] [5]
Total errors found: 2 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 WebKit Commit Bot 2018-01-11 17:54:04 PST
Comment on attachment 331138 [details]
Patch

Clearing flags on attachment: 331138

Committed r226835: <https://trac.webkit.org/changeset/226835>
Comment 9 WebKit Commit Bot 2018-01-11 17:54:06 PST
All reviewed patches have been landed.  Closing bug.
Comment 10 Radar WebKit Bug Importer 2018-01-11 17:55:19 PST
<rdar://problem/36455886>