Bug 219791

Summary: Expose SPI for enabling/disabling Private Click Measurement
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebKit Misc.Assignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, sam, wilander
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Brent Fulgham 2020-12-11 10:42:03 PST
Now that the work on the Private Click Measurement standard is approaching consensus we need to make the setting available to clients.

(See <https://github.com/privacycg/private-click-measurement> for background on the feature).

This patch creates a WebKit preference that developers can use to disable PCM if they do not wish their applications to participate in such measurements.
Comment 1 Brent Fulgham 2020-12-11 10:52:26 PST
<rdar://problem/70502198>
Comment 2 Brent Fulgham 2020-12-11 11:28:37 PST
Created attachment 416018 [details]
Patch
Comment 3 Alex Christensen 2020-12-11 13:07:53 PST
Comment on attachment 416018 [details]
Patch

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

> Source/WebKit/UIProcess/API/C/WKPreferencesRef.h:356
> +WK_EXPORT bool WKPreferencesGetPrivateClickMeasurementEnabled(WKPreferencesRef preferencesRef);

Let's not add more C API unless we really need it.
Comment 4 Brent Fulgham 2020-12-11 13:52:47 PST
Created attachment 416042 [details]
Patch for landing
Comment 5 EWS 2020-12-11 14:34:50 PST
Committed r270710: <https://trac.webkit.org/changeset/270710>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 416042 [details].
Comment 6 Sam Weinig 2020-12-19 11:15:02 PST
Comment on attachment 416042 [details]
Patch for landing

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

> Source/WebKit/WebProcess/WebPage/WebPage.cpp:3791
> +    settings.setPrivateClickMeasurementEnabled(store.getBoolValueForKey(WebPreferencesKey::privateClickMeasurementEnabledKey()));

This line is not necessary and is duplicating work done by the generated preferences code.