Bug 229770 - Move PCM::Store ownership from WebResourceLoadStatisticsStore to PrivateClickMeasurementManager
Summary: Move PCM::Store ownership from WebResourceLoadStatisticsStore to PrivateClick...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-09-01 14:25 PDT by Alex Christensen
Modified: 2021-09-02 07:51 PDT (History)
2 users (show)

See Also:


Attachments
Patch (37.60 KB, patch)
2021-09-01 14:26 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (41.13 KB, patch)
2021-09-01 15:34 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2021-09-01 14:25:26 PDT
Move PCM::Store ownership from WebResourceLoadStatisticsStore to PrivateClickMeasurementManager
Comment 1 Alex Christensen 2021-09-01 14:26:28 PDT
Created attachment 437067 [details]
Patch
Comment 2 Kate Cheney 2021-09-01 15:06:02 PDT
Comment on attachment 437067 [details]
Patch

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

Looks good except for the recreateResourceLoadStatistics function that no longer deletes the PCM database, we should probably rename it and instead recreate the PCM store to simulate a browser restart.

> Source/WebKit/NetworkProcess/NetworkSession.cpp:213
>      destroyResourceLoadStatistics([this, weakThis = makeWeakPtr(*this), completionHandler = WTFMove(completionHandler)] () mutable {

This seems like it might cause layout test issues. I used recreateResourceLoadStatistics to simulate a session restart in https://bugs.webkit.org/show_bug.cgi?id=219134, specifically for http/tests/privateClickMeasurement/expired-ad-click-gets-removed-on-session-start.html and http/tests/privateClickMeasurement/expired-attribution-report-gets-sent-on-session-start.html. We might need to rename it to simulatePrivateClickMeasurementSessionRestart and instead recreate the PCM database to keep these tests doing what they are supposed to do.
Comment 3 Alex Christensen 2021-09-01 15:34:32 PDT
Created attachment 437074 [details]
Patch
Comment 4 EWS 2021-09-01 16:26:57 PDT
Committed r281886 (241216@main): <https://commits.webkit.org/241216@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 437074 [details].
Comment 5 Radar WebKit Bug Importer 2021-09-01 16:27:25 PDT
<rdar://problem/82650844>