Bug 220596

Summary: PCM: Output logs by default, including to Web Inspector
Product: WebKit Reporter: John Wilander <wilander>
Component: WebKit Misc.Assignee: John Wilander <wilander>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, cdumez, ews-watchlist, japhet, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description John Wilander 2021-01-13 11:21:14 PST
Logging for PCM should be readily available in Web Inspector and not require the experimental PCM Debug Mode.
Comment 1 Radar WebKit Bug Importer 2021-01-13 11:21:37 PST
<rdar://problem/73159180>
Comment 2 John Wilander 2021-01-13 11:31:13 PST
Created attachment 417550 [details]
Patch
Comment 3 John Wilander 2021-01-13 13:15:09 PST
mac-debug-wk1 layout test failure unrelated. Looks flaky in history view. I pinged the bot watchers.
Comment 4 Brent Fulgham 2021-01-13 15:21:37 PST
Comment on attachment 417550 [details]
Patch

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

r=me

> Source/WebCore/loader/PrivateClickMeasurement.cpp:65
> +        return makeUnexpected("[Private Click Measurement] Conversion was not accepted because the URL's protocol is not HTTPS or the URL contains one or more of username, password, query string, and fragment."_s);

Do we need to do any kind of feature check to decide whether to handle the attribution requests? Or does the flag only controlling emitting the report?

After thinking about it, I think that makes good sense since a developer could test (and see this output in WebInspector) without actually triggering any conversion events.
Comment 5 John Wilander 2021-01-13 15:42:57 PST
(In reply to Brent Fulgham from comment #4)
> Comment on attachment 417550 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=417550&action=review
> 
> r=me
> 
> > Source/WebCore/loader/PrivateClickMeasurement.cpp:65
> > +        return makeUnexpected("[Private Click Measurement] Conversion was not accepted because the URL's protocol is not HTTPS or the URL contains one or more of username, password, query string, and fragment."_s);
> 
> Do we need to do any kind of feature check to decide whether to handle the
> attribution requests? Or does the flag only controlling emitting the report?
> 
> After thinking about it, I think that makes good sense since a developer
> could test (and see this output in WebInspector) without actually triggering
> any conversion events.

Yes, I think that's right. Thanks for the review!
Comment 6 EWS 2021-01-13 16:10:12 PST
Committed r271473: <https://trac.webkit.org/changeset/271473>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 417550 [details].