WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
237969
Implement PCM to SKAdNetwork bridge
https://bugs.webkit.org/show_bug.cgi?id=237969
Summary
Implement PCM to SKAdNetwork bridge
Alex Christensen
Reported
2022-03-16 10:40:37 PDT
Implement PCM to SKAdNetwork bridge
Attachments
Patch
(36.72 KB, patch)
2022-03-16 10:47 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(35.10 KB, patch)
2022-03-16 14:05 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(37.17 KB, patch)
2022-03-22 16:07 PDT
,
Alex Christensen
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2022-03-16 10:47:25 PDT
Created
attachment 454864
[details]
Patch
Alex Christensen
Comment 2
2022-03-16 14:05:40 PDT
Created
attachment 454891
[details]
Patch
John Wilander
Comment 3
2022-03-21 20:35:54 PDT
Comment on
attachment 454891
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=454891&action=review
r=me with comments. Please make sure the WK2 bots are green before landing.
> Source/WTF/wtf/PlatformHave.h:1227 > +#if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 160000)
I think this should be TBD.
> Source/WebKit/ChangeLog:8 > +
Please add some comments on the changes in the WebKit layer.
> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:1822 > +void NetworkSessionCocoa::donateToSKAdNetwork(WebCore::PrivateClickMeasurement&& pcm)
This method doesn't move the pcm object further. Would it make sense to use & const instead?
> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:1826 > + config.get().appAdamId = @(*pcm.adamID());
I think we should check that there is an adamID and if not, broadcast an error message and return without forwarding to the daemon. See my comment further down on isSKAdNetworkAttribution().
> Source/WebKit/UIProcess/WebPageProxy.cpp:4982 > + if (privateClickMeasurement->destinationSite().matches(frame->url()) || privateClickMeasurement->adamID())
Since we use it this way, I'd prefer a convenience function isSKAdNetworkAttribution() which internally checks whether it is a valid such PCM object.
> Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:599 > + EXPECT_WK_STREQ(consoleMessages[1], "Submitting potential install attribution for AdamId: 1234567890, adNetworkRegistrableDomain: destination, impressionId: MTIzNDU2Nzg5MDEyMzQ1Ng, sourceWebRegistrableDomain: example.com, version: 3");
Huh, I didn't know you could test console messages. Neat.
Alex Christensen
Comment 4
2022-03-22 16:07:15 PDT
Created
attachment 455446
[details]
Patch
Alex Christensen
Comment 5
2022-03-22 16:09:10 PDT
(In reply to John Wilander from
comment #3
)
> This method doesn't move the pcm object further. Would it make sense to use > & const instead?
It is consuming the pcm, so although it doesn't call a move constructor or anything, I think move semantics is conceptually how we should be thinking about the pcm that is moved here and we shouldn't do anything with it afterwards.
> Since we use it this way, I'd prefer a convenience function > isSKAdNetworkAttribution() which internally checks whether it is a valid > such PCM object.
Good idea. Better name for the same thing.
> > Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:599 > > + EXPECT_WK_STREQ(consoleMessages[1], "Submitting potential install attribution for AdamId: 1234567890, adNetworkRegistrableDomain: destination, impressionId: MTIzNDU2Nzg5MDEyMzQ1Ng, sourceWebRegistrableDomain: example.com, version: 3"); > > Huh, I didn't know you could test console messages. Neat.
You can on macOS
Alex Christensen
Comment 6
2022-03-22 22:26:21 PDT
r291735
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug