<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[269671] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/269671">269671</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2020-11-10 20:55:57 -0800 (Tue, 10 Nov 2020)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unreviewed, reverting <a href="http://trac.webkit.org/projects/webkit/changeset/269660">r269660</a>.
https://bugs.webkit.org/show_bug.cgi?id=218786

Crashing in EWS iOS simulator bots

Reverted changeset:

"PCM: Change from ad-click-attribution to private-click-
measurement (in all forms, including .well-known URL)"
https://bugs.webkit.org/show_bug.cgi?id=218730
https://trac.webkit.org/changeset/269660</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsTestExpectations">trunk/LayoutTests/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2TestExpectations">trunk/LayoutTests/platform/mac-wk2/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformwk2TestExpectations">trunk/LayoutTests/platform/wk2/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformwpeTestExpectations">trunk/LayoutTests/platform/wpe/TestExpectations</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorConsoleMessagecpp">trunk/Source/JavaScriptCore/inspector/ConsoleMessage.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorprotocolConsolejson">trunk/Source/JavaScriptCore/inspector/protocol/Console.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorprotocolPagejson">trunk/Source/JavaScriptCore/inspector/protocol/Page.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeConsoleClientcpp">trunk/Source/JavaScriptCore/runtime/ConsoleClient.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeConsoleTypesh">trunk/Source/JavaScriptCore/runtime/ConsoleTypes.h</a></li>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFScriptsPreferencesWebPreferencesExperimentalyaml">trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreHeaderscmake">trunk/Source/WebCore/Headers.cmake</a></li>
<li><a href="#trunkSourceWebCoreSourcestxt">trunk/Source/WebCore/Sources.txt</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLAnchorElementcpp">trunk/Source/WebCore/html/HTMLAnchorElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLAnchorElementh">trunk/Source/WebCore/html/HTMLAnchorElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLAnchorElementidl">trunk/Source/WebCore/html/HTMLAnchorElement.idl</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorClienth">trunk/Source/WebCore/inspector/InspectorClient.h</a></li>
<li><a href="#trunkSourceWebCoreinspectoragentsInspectorPageAgentcpp">trunk/Source/WebCore/inspector/agents/InspectorPageAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectoragentspagePageConsoleAgentcpp">trunk/Source/WebCore/inspector/agents/page/PageConsoleAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderFrameLoadercpp">trunk/Source/WebCore/loader/FrameLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderFrameLoaderh">trunk/Source/WebCore/loader/FrameLoader.h</a></li>
<li><a href="#trunkSourceWebCoreloaderNavigationActionh">trunk/Source/WebCore/loader/NavigationAction.h</a></li>
<li><a href="#trunkSourceWebCorepageRuntimeEnabledFeaturesh">trunk/Source/WebCore/page/RuntimeEnabledFeatures.h</a></li>
<li><a href="#trunkSourceWebCoreplatformLoggingh">trunk/Source/WebCore/platform/Logging.h</a></li>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs">trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceBaseMainjs">trunk/Source/WebInspectorUI/UserInterface/Base/Main.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsConsoleMessagejs">trunk/Source/WebInspectorUI/UserInterface/Models/ConsoleMessage.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsIssueMessagejs">trunk/Source/WebInspectorUI/UserInterface/Models/IssueMessage.js</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessNetworkProcesscpp">trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessNetworkProcessh">trunk/Source/WebKit/NetworkProcess/NetworkProcess.h</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessNetworkProcessmessagesin">trunk/Source/WebKit/NetworkProcess/NetworkProcess.messages.in</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessNetworkProcessCreationParameterscpp">trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessNetworkProcessCreationParametersh">trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessNetworkResourceLoadercpp">trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessNetworkResourceLoaderh">trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.h</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessNetworkSessioncpp">trunk/Source/WebKit/NetworkProcess/NetworkSession.cpp</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessNetworkSessionh">trunk/Source/WebKit/NetworkProcess/NetworkSession.h</a></li>
<li><a href="#trunkSourceWebKitPlatformLoggingh">trunk/Source/WebKit/Platform/Logging.h</a></li>
<li><a href="#trunkSourceWebKitSharedNavigationActionDatacpp">trunk/Source/WebKit/Shared/NavigationActionData.cpp</a></li>
<li><a href="#trunkSourceWebKitSharedNavigationActionDatah">trunk/Source/WebKit/Shared/NavigationActionData.h</a></li>
<li><a href="#trunkSourceWebKitSharedWebsiteDataWebsiteDatacpp">trunk/Source/WebKit/Shared/WebsiteData/WebsiteData.cpp</a></li>
<li><a href="#trunkSourceWebKitSharedWebsiteDataWebsiteDataTypeh">trunk/Source/WebKit/Shared/WebsiteData/WebsiteDataType.h</a></li>
<li><a href="#trunkSourceWebKitSourcestxt">trunk/Source/WebKit/Sources.txt</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPIAPINavigationh">trunk/Source/WebKit/UIProcess/API/APINavigation.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICWKPagecpp">trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICWKPagePrivateh">trunk/Source/WebKit/UIProcess/API/C/WKPagePrivate.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICWKWebsiteDataStoreRefcpp">trunk/Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICWKWebsiteDataStoreRefh">trunk/Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICocoaWKWebsiteDataRecordmm">trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataRecord.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICocoaWKWebsiteDataRecordInternalh">trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICocoaWKWebsiteDataRecordPrivateh">trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICocoaWKWebsiteDataStoremm">trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessCocoaWebProcessPoolCocoamm">trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessInspectorWebInspectorProxycpp">trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessNetworkNetworkProcessProxycpp">trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessNetworkNetworkProcessProxyh">trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebPageProxycpp">trunk/Source/WebKit/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebPageProxyh">trunk/Source/WebKit/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebsiteDataWebsiteDataStorecpp">trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebsiteDataWebsiteDataStoreh">trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h</a></li>
<li><a href="#trunkSourceWebKitWebKitxcodeprojprojectpbxproj">trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebCoreSupportWebChromeClientcpp">trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebCoreSupportWebFrameLoaderClientcpp">trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp</a></li>
<li><a href="#trunkSourceWebKitLegacymacChangeLog">trunk/Source/WebKitLegacy/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitLegacymacWebCoreSupportWebChromeClientmm">trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm</a></li>
<li><a href="#trunkSourceWebKitLegacymacWebViewWebPreferenceKeysPrivateh">trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h</a></li>
<li><a href="#trunkSourceWebKitLegacymacWebViewWebPreferencesmm">trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm</a></li>
<li><a href="#trunkSourceWebKitLegacymacWebViewWebPreferencesPrivateh">trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreeTestOptionscpp">trunk/Tools/DumpRenderTree/TestOptions.cpp</a></li>
<li><a href="#trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj">trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleBindingsTestRunneridl">trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleTestRunnercpp">trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleTestRunnerh">trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllercpp">trunk/Tools/WebKitTestRunner/TestController.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllerh">trunk/Tools/WebKitTestRunner/TestController.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestInvocationcpp">trunk/Tools/WebKitTestRunner/TestInvocation.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestInvocationh">trunk/Tools/WebKitTestRunner/TestInvocation.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/http/tests/adClickAttribution/</li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionanchortagattributesreflectexpectedtxt">trunk/LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-reflect-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionanchortagattributesreflecthtml">trunk/LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-reflect.html</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionanchortagattributesvalidationexpectedtxt">trunk/LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-validation-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionanchortagattributesvalidationhtml">trunk/LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-validation.html</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionattributionconversionthroughcrosssiteimageredirectexpectedtxt">trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-cross-site-image-redirect-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionattributionconversionthroughcrosssiteimageredirecthtml">trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-cross-site-image-redirect.html</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionattributionconversionthroughimageredirectinnewwindowexpectedtxt">trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-in-new-window-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionattributionconversionthroughimageredirectinnewwindowhtml">trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-in-new-window.html</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionattributionconversionthroughimageredirectwithpriorityexpectedtxt">trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionattributionconversionthroughimageredirectwithpriorityhtml">trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority.html</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionattributionconversionthroughimageredirectwithoutpriorityexpectedtxt">trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-without-priority-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionattributionconversionthroughimageredirectwithoutpriorityhtml">trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-without-priority.html</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionclearthroughwebsitedataremovalexpectedtxt">trunk/LayoutTests/http/tests/adClickAttribution/clear-through-website-data-removal-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionclearthroughwebsitedataremovalhtml">trunk/LayoutTests/http/tests/adClickAttribution/clear-through-website-data-removal.html</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionconversiondisabledinephemeralsessionexpectedtxt">trunk/LayoutTests/http/tests/adClickAttribution/conversion-disabled-in-ephemeral-session-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionconversiondisabledinephemeralsessionhtml">trunk/LayoutTests/http/tests/adClickAttribution/conversion-disabled-in-ephemeral-session.html</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionexpiredattributionsremovedexpectedtxt">trunk/LayoutTests/http/tests/adClickAttribution/expired-attributions-removed-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionexpiredattributionsremovedhtml">trunk/LayoutTests/http/tests/adClickAttribution/expired-attributions-removed.html</a></li>
<li>trunk/LayoutTests/http/tests/adClickAttribution/resources/</li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionresourcesconversionFilePathphp">trunk/LayoutTests/http/tests/adClickAttribution/resources/conversionFilePath.php</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionresourcesconversionReportphp">trunk/LayoutTests/http/tests/adClickAttribution/resources/conversionReport.php</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionresourcesconvertAndPostMessageBackhtml">trunk/LayoutTests/http/tests/adClickAttribution/resources/convertAndPostMessageBack.html</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionresourcesgetConversionDataphp">trunk/LayoutTests/http/tests/adClickAttribution/resources/getConversionData.php</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionresourcesredirectToConversionphp">trunk/LayoutTests/http/tests/adClickAttribution/resources/redirectToConversion.php</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionresourcesredirectToConversionOnIPAddressphp">trunk/LayoutTests/http/tests/adClickAttribution/resources/redirectToConversionOnIPAddress.php</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionresourcesutiljs">trunk/LayoutTests/http/tests/adClickAttribution/resources/util.js</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionsecondattributionconvertedwithhigherpriorityexpectedtxt">trunk/LayoutTests/http/tests/adClickAttribution/second-attribution-converted-with-higher-priority-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionsecondattributionconvertedwithhigherpriorityhtml">trunk/LayoutTests/http/tests/adClickAttribution/second-attribution-converted-with-higher-priority.html</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionsecondattributionconvertedwithlowerpriorityexpectedtxt">trunk/LayoutTests/http/tests/adClickAttribution/second-attribution-converted-with-lower-priority-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionsecondattributionconvertedwithlowerpriorityhtml">trunk/LayoutTests/http/tests/adClickAttribution/second-attribution-converted-with-lower-priority.html</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionsecondconversionwithhigherpriorityexpectedtxt">trunk/LayoutTests/http/tests/adClickAttribution/second-conversion-with-higher-priority-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionsecondconversionwithhigherpriorityhtml">trunk/LayoutTests/http/tests/adClickAttribution/second-conversion-with-higher-priority.html</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionsecondconversionwithlowerpriorityexpectedtxt">trunk/LayoutTests/http/tests/adClickAttribution/second-conversion-with-lower-priority-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionsecondconversionwithlowerpriorityhtml">trunk/LayoutTests/http/tests/adClickAttribution/second-conversion-with-lower-priority.html</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionsendattributionconversionrequestexpectedtxt">trunk/LayoutTests/http/tests/adClickAttribution/send-attribution-conversion-request-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionsendattributionconversionrequesthtml">trunk/LayoutTests/http/tests/adClickAttribution/send-attribution-conversion-request.html</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionstoreadclickattributionexpectedtxt">trunk/LayoutTests/http/tests/adClickAttribution/store-ad-click-attribution-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionstoreadclickattributionhtml">trunk/LayoutTests/http/tests/adClickAttribution/store-ad-click-attribution.html</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionstoredisabledinephemeralsessionexpectedtxt">trunk/LayoutTests/http/tests/adClickAttribution/store-disabled-in-ephemeral-session-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsadClickAttributionstoredisabledinephemeralsessionhtml">trunk/LayoutTests/http/tests/adClickAttribution/store-disabled-in-ephemeral-session.html</a></li>
<li><a href="#trunkLayoutTestshttptestscontentextensionsblockadclickattributionexpectedtxt">trunk/LayoutTests/http/tests/contentextensions/block-ad-click-attribution-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestscontentextensionsblockadclickattributionhtml">trunk/LayoutTests/http/tests/contentextensions/block-ad-click-attribution.html</a></li>
<li><a href="#trunkLayoutTestshttptestscontentextensionsblockadclickattributionhtmljson">trunk/LayoutTests/http/tests/contentextensions/block-ad-click-attribution.html.json</a></li>
<li><a href="#trunkLayoutTestsinspectorpageoverrideSettingAdClickAttributionDebugModeEnabledexpectedtxt">trunk/LayoutTests/inspector/page/overrideSetting-AdClickAttributionDebugModeEnabled-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorpageoverrideSettingAdClickAttributionDebugModeEnabledhtml">trunk/LayoutTests/inspector/page/overrideSetting-AdClickAttributionDebugModeEnabled.html</a></li>
<li><a href="#trunkSourceWebCoreloaderAdClickAttributioncpp">trunk/Source/WebCore/loader/AdClickAttribution.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderAdClickAttributionh">trunk/Source/WebCore/loader/AdClickAttribution.h</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessAdClickAttributionManagercpp">trunk/Source/WebKit/NetworkProcess/AdClickAttributionManager.cpp</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessAdClickAttributionManagerh">trunk/Source/WebKit/NetworkProcess/AdClickAttributionManager.h</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebCoreAdClickAttributioncpp">trunk/Tools/TestWebKitAPI/Tests/WebCore/AdClickAttribution.cpp</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestshttptestscontentextensionsblockprivateclickmeasurementexpectedtxt">trunk/LayoutTests/http/tests/contentextensions/block-private-click-measurement-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestscontentextensionsblockprivateclickmeasurementhtml">trunk/LayoutTests/http/tests/contentextensions/block-private-click-measurement.html</a></li>
<li><a href="#trunkLayoutTestshttptestscontentextensionsblockprivateclickmeasurementhtmljson">trunk/LayoutTests/http/tests/contentextensions/block-private-click-measurement.html.json</a></li>
<li>trunk/LayoutTests/http/tests/privateClickMeasurement/</li>
<li><a href="#trunkLayoutTestsinspectorpageoverrideSettingPrivateClickMeasurementDebugModeEnabledexpectedtxt">trunk/LayoutTests/inspector/page/overrideSetting-PrivateClickMeasurementDebugModeEnabled-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorpageoverrideSettingPrivateClickMeasurementDebugModeEnabledhtml">trunk/LayoutTests/inspector/page/overrideSetting-PrivateClickMeasurementDebugModeEnabled.html</a></li>
<li><a href="#trunkSourceWebCoreloaderPrivateClickMeasurementcpp">trunk/Source/WebCore/loader/PrivateClickMeasurement.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderPrivateClickMeasurementh">trunk/Source/WebCore/loader/PrivateClickMeasurement.h</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessPrivateClickMeasurementManagercpp">trunk/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.cpp</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessPrivateClickMeasurementManagerh">trunk/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.h</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebCorePrivateClickMeasurementcpp">trunk/Tools/TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/LayoutTests/ChangeLog 2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2020-11-10  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, reverting r269660.
+        https://bugs.webkit.org/show_bug.cgi?id=218786
+
+        Crashing in EWS iOS simulator bots
+
+        Reverted changeset:
+
+        "PCM: Change from ad-click-attribution to private-click-
+        measurement (in all forms, including .well-known URL)"
+        https://bugs.webkit.org/show_bug.cgi?id=218730
+        https://trac.webkit.org/changeset/269660
+
</ins><span class="cx"> 2020-11-10  Chris Dumez  <cdumez@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Webkit incorrectly setting visibilityState to "prerender" when opening link in new tab
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations       2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/LayoutTests/TestExpectations  2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1101,8 +1101,8 @@
</span><span class="cx"> # Target domain is only present in WK2.
</span><span class="cx"> http/tests/inspector/target [ Skip ]
</span><span class="cx"> 
</span><del>-# ITP and PrivateClickMeasurement are WK2 only.
-inspector/page/overrideSetting-PrivateClickMeasurementDebugModeEnabled.html [ Skip ]
</del><ins>+# ITP and AdClickAttribution are WK2 only.
+inspector/page/overrideSetting-AdClickAttributionDebugModeEnabled.html [ Skip ]
</ins><span class="cx"> inspector/page/overrideSetting-ITPDebugModeEnabled.html [ Skip ]
</span><span class="cx"> 
</span><span class="cx"> # These conformance tests are no longer in sync with the latest specification
</span><span class="lines">@@ -2772,7 +2772,7 @@
</span><span class="cx"> webkit.org/b/157068 [ Debug ] imported/w3c/web-platform-tests/fetch/nosniff/importscripts.html [ Pass Crash ]
</span><span class="cx"> webkit.org/b/157068 [ Release ] imported/w3c/web-platform-tests/fetch/nosniff/importscripts.html [ Pass Failure ]
</span><span class="cx"> 
</span><del>-http/tests/privateClickMeasurement [ Skip ]
</del><ins>+http/tests/adClickAttribution [ Skip ]
</ins><span class="cx"> 
</span><span class="cx"> # Application Manifest tests
</span><span class="cx"> webkit.org/b/153152 http/tests/security/contentSecurityPolicy/manifest-src-allowed.html [ Skip ]
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionanchortagattributesreflectexpectedtxtfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementanchortagattributesreflectexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-reflect-expected.txt (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/anchor-tag-attributes-reflect-expected.txt) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-reflect-expected.txt                               (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-reflect-expected.txt  2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+Test for the new ad click attribution attributes on anchor tags.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS anchorTag.adcampaignid is "40"
+PASS anchorTag.addestination is "destination.example"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionanchortagattributesreflecthtmlfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementanchortagattributesreflecthtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-reflect.html (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/anchor-tag-attributes-reflect.html) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-reflect.html                               (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-reflect.html  2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+<!DOCTYPE html> <!-- webkit-test-runner [ AdClickAttributionEnabled=true ] -->
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <script src="/js-test-resources/js-test.js"></script>
+</head>
+<body>
+<a id="testTag" href="http://localhost:8000" adcampaignid="40" addestination="destination.example"></a>
+<script>
+    description("Test for the new ad click attribution attributes on anchor tags.");
+
+    const anchorTag = document.getElementById("testTag");
+    shouldBeEqualToString("anchorTag.adcampaignid", "40");
+    shouldBeEqualToString("anchorTag.addestination", "destination.example");
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionanchortagattributesvalidationexpectedtxtfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementanchortagattributesvalidationexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-validation-expected.txt (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/anchor-tag-attributes-validation-expected.txt) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-validation-expected.txt                            (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-validation-expected.txt       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+CONSOLE MESSAGE: adcampaignid must have a non-negative value less than or equal to 63 for Ad Click Attribution.
+CONSOLE MESSAGE: adcampaignid must have a non-negative value less than or equal to 63 for Ad Click Attribution.
+CONSOLE MESSAGE: adcampaignid can not be converted to a non-negative integer which is required for Ad Click Attribution.
+CONSOLE MESSAGE: adcampaignid can not be converted to a non-negative integer which is required for Ad Click Attribution.
+CONSOLE MESSAGE: adcampaignid can not be converted to a non-negative integer which is required for Ad Click Attribution.
+CONSOLE MESSAGE: addestination could not be converted to a valid HTTP-family URL.
+CONSOLE MESSAGE: addestination could not be converted to a valid HTTP-family URL.
+CONSOLE MESSAGE: addestination could not be converted to a valid HTTP-family URL.
+CONSOLE MESSAGE: Both adcampaignid and addestination need to be set for Ad Click Attribution to work.
+CONSOLE MESSAGE: Both adcampaignid and addestination need to be set for Ad Click Attribution to work.
+CONSOLE MESSAGE: addestination can not be the same site as the current website.
+Test for validity of ad click attribution attributes on anchor tags.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionanchortagattributesvalidationhtmlfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementanchortagattributesvalidationhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-validation.html (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/anchor-tag-attributes-validation.html) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-validation.html                            (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-validation.html       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,85 @@
</span><ins>+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <script src="/js-test-resources/js-test.js"></script>
+    <script src="/js-test-resources/ui-helper.js"></script>
+    <style>
+        .wide-link {
+            width: 150px;
+            display: inline-block;
+        }
+    </style>
+</head>
+<body onload="runAllTests()">
+<div id="description"></div>
+<div id="output"></div><br>
+<div id="console"></div>
+<script>
+    description("Test for validity of ad click attribution attributes on anchor tags.");
+    jsTestIsAsync = true;
+
+    function createAdClickAttributionAnchorElement(elementID, adCampaignID, adDestination) {
+        let anchorElement = document.createElement("a");
+        anchorElement.id = elementID;
+        anchorElement.classList.add("wide-link");
+        anchorElement.adcampaignid = adCampaignID;
+        anchorElement.addestination = adDestination;
+        anchorElement.href = "#";
+        anchorElement.innerText = "Link" + currentTest;
+        return anchorElement;
+    }
+
+    function activateElement(elementID, callback) {
+        UIHelper.activateElement(document.getElementById(elementID)).then(
+            function () {
+                callback();
+            },
+            function () {
+                testFailed("Promise rejected.");
+                finishJSTest();
+            }
+        );
+    }
+
+    let currentTest = 0;
+    function runOneTest(adCampaignID, adDestination, callback) {
+        const currentElementID = "test" + currentTest++;
+        const anchorElement = createAdClickAttributionAnchorElement(currentElementID, adCampaignID, adDestination);
+        output.appendChild(anchorElement);
+        activateElement(currentElementID, callback);
+    }
+
+    const validAdCampaignID = "03";
+    const validAdDestination = "http://webkit.org";
+    const sameSite = document.location.origin;
+    const testCases = [
+        [ validAdCampaignID, validAdDestination ],
+        [ "100", validAdDestination ],           // Too many characters.
+        [ "1", validAdDestination ],             // Too few characters.
+        [ "98", validAdDestination ],            // Too high value.
+        [ "-1", validAdDestination ],            // Negative value.
+        [ "ab", validAdDestination ],            // Non-digits.
+        [ "1", validAdDestination ],            // Non-ASCII.
+        [ " 1", validAdDestination ],            // Leading space.
+        [ "1 ", validAdDestination ],            // Trailing space.
+        [ validAdCampaignID, "webkit.org" ],     // Missing protocol.
+        [ validAdCampaignID, "://webkit.org" ],  // Partially missing protocol.
+        [ validAdCampaignID, "" ],           // Non-ASCII characters as destination.
+        [ "", validAdDestination ],              // Empty campaign ID.
+        [ validAdCampaignID, "" ],               // Empty destination.
+        [ validAdCampaignID, sameSite ]          // Same-site destination.
+    ];
+
+    function runAllTests() {
+        if (currentTest < testCases.length)
+            runOneTest(testCases[currentTest][0], testCases[currentTest][1], runAllTests);
+        else {
+            document.body.removeChild(output);
+            finishJSTest();
+        }
+    }
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionattributionconversionthroughcrosssiteimageredirectexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-cross-site-image-redirect-expected.txt (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-cross-site-image-redirect-expected.txt                            (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-cross-site-image-redirect-expected.txt       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+Tests that triggering of ad click attribution conversions through cross-site redirects do not work.
+
+
+Unconverted Ad Click Attributions:
+WebCore::AdClickAttribution 1
+Source: 127.0.0.1
+Destination: localhost
+Campaign ID: 3
+No conversion data.
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionattributionconversionthroughcrosssiteimageredirecthtmlfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementattributionconversionthroughcrosssiteimageredirecthtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-cross-site-image-redirect.html (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/attribution-conversion-through-cross-site-image-redirect.html) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-cross-site-image-redirect.html                            (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-cross-site-image-redirect.html       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true AdClickAttributionEnabled=true ] -->
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <script src="/js-test-resources/ui-helper.js"></script>
+    <script src="resources/util.js"></script>
+</head>
+<body onload="setTimeout(runTest, 0)">
+<div id="description">Tests that triggering of ad click attribution conversions through cross-site redirects do not work.</div>
+<a id="targetLink" href="http://localhost:8000/adClickAttribution/attribution-conversion-through-cross-site-image-redirect.html?stepTwo" adcampaignid="3" addestination="http://localhost:8000">Link</a><br>
+<div id="output"></div>
+<script>
+    prepareTest();
+
+    function activateElement(elementID) {
+        var element = document.getElementById(elementID);
+        var centerX = element.offsetLeft + element.offsetWidth / 2;
+        var centerY = element.offsetTop + element.offsetHeight / 2;
+        UIHelper.activateAt(centerX, centerY).then(
+            function () {
+            },
+            function () {
+                document.getElementById("output").innerText = "FAIL Promise rejected.";
+                tearDownAndFinish();
+            }
+        );
+    }
+
+    function runTest() {
+        if (window.testRunner) {
+            if (window.location.search === "?stepTwo") {
+                let imageElement = document.createElement("img");
+                imageElement.src = "https://localhost:8443/adClickAttribution/resources/redirectToConversionOnIPAddress.php?conversionData=12";
+                imageElement.id = "pixel";
+                imageElement.onerror = function(e) {
+                    testRunner.dumpAdClickAttribution();
+                    document.body.removeChild(document.getElementById("targetLink"));
+                    document.body.removeChild(document.getElementById("pixel"));
+                    tearDownAndFinish();
+                };
+                document.body.appendChild(imageElement);
+            } else {
+                activateElement("targetLink");
+            }
+        } else {
+            document.getElementById("output").innerText = "FAIL No testRunner.";
+        }
+    }
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionattributionconversionthroughimageredirectinnewwindowexpectedtxtfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementattributionconversionthroughimageredirectinnewwindowexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-in-new-window-expected.txt (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-in-new-window-expected.txt) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-in-new-window-expected.txt                         (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-in-new-window-expected.txt    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+Tests triggering of ad click attribution conversions in a new window.
+
+
+Converted Ad Click Attributions:
+WebCore::AdClickAttribution 1
+Source: 127.0.0.1
+Destination: localhost
+Campaign ID: 3
+Conversion data: 12
+Conversion priority: 3
+Conversion earliest time to send: Within 24-48 hours
+Conversion request sent: false
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionattributionconversionthroughimageredirectinnewwindowhtmlfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementattributionconversionthroughimageredirectinnewwindowhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-in-new-window.html (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-in-new-window.html) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-in-new-window.html                         (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-in-new-window.html    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true AdClickAttributionEnabled=true ] -->
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <script src="/js-test-resources/ui-helper.js"></script>
+    <script src="resources/util.js"></script>
+</head>
+<body onload="setTimeout(runTest, 0)">
+<div id="description">Tests triggering of ad click attribution conversions in a new window.</div>
+<a target="_blank" rel="opener" id="targetLink" href="http://localhost:8000/adClickAttribution/resources/convertAndPostMessageBack.html" adcampaignid="3" addestination="http://localhost:8000">Link</a><br>
+<div id="output"></div>
+<script>
+    prepareTest();
+
+    function activateElement(elementID) {
+        var element = document.getElementById(elementID);
+        var centerX = element.offsetLeft + element.offsetWidth / 2;
+        var centerY = element.offsetTop + element.offsetHeight / 2;
+        UIHelper.activateAt(centerX, centerY).then(
+            function () {
+            },
+            function () {
+                document.getElementById("output").innerText = "FAIL Promise rejected.";
+                tearDownAndFinish();
+            }
+        );
+    }
+
+    function receiveMessage(event) {
+        if (event.origin === "http://localhost:8000") {
+            if (event.data === "Done") {
+                testRunner.dumpAdClickAttribution();
+                document.body.removeChild(document.getElementById("targetLink"));
+                tearDownAndFinish();
+            } else {
+                testFailed("Received unknown message: " + event.data);
+                tearDownAndFinish();
+            }
+        } else {
+            testFailed("Received a message from an unexpected origin: " + event.origin);
+            tearDownAndFinish();
+        }
+    }
+
+    window.addEventListener("message", receiveMessage, false);
+
+    function runTest() {
+        if (window.testRunner) {
+            testRunner.setCanOpenWindows();
+            activateElement("targetLink");
+        } else {
+            document.getElementById("output").innerText = "FAIL No testRunner.";
+            tearDownAndFinish();
+        }
+    }
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionattributionconversionthroughimageredirectwithpriorityexpectedtxtfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementattributionconversionthroughimageredirectwithpriorityexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority-expected.txt (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-with-priority-expected.txt) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority-expected.txt                         (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority-expected.txt    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+Tests triggering of ad click attribution conversions with priority.
+
+
+Converted Ad Click Attributions:
+WebCore::AdClickAttribution 1
+Source: 127.0.0.1
+Destination: localhost
+Campaign ID: 3
+Conversion data: 12
+Conversion priority: 3
+Conversion earliest time to send: Within 24-48 hours
+Conversion request sent: false
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionattributionconversionthroughimageredirectwithpriorityhtmlfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementattributionconversionthroughimageredirectwithpriorityhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority.html (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-with-priority.html) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority.html                         (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority.html    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true AdClickAttributionEnabled=true ] -->
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <script src="/js-test-resources/ui-helper.js"></script>
+    <script src="resources/util.js"></script>
+</head>
+<body onload="setTimeout(runTest, 0)">
+<div id="description">Tests triggering of ad click attribution conversions with priority.</div>
+<a id="targetLink" href="http://localhost:8000/adClickAttribution/attribution-conversion-through-image-redirect-with-priority.html?stepTwo" adcampaignid="3" addestination="http://localhost:8000">Link</a><br>
+<div id="output"></div>
+<script>
+    prepareTest();
+
+    function activateElement(elementID) {
+        var element = document.getElementById(elementID);
+        var centerX = element.offsetLeft + element.offsetWidth / 2;
+        var centerY = element.offsetTop + element.offsetHeight / 2;
+        UIHelper.activateAt(centerX, centerY).then(
+            function () {
+            },
+            function () {
+                document.getElementById("output").innerText = "FAIL Promise rejected.";
+                tearDownAndFinish();
+            }
+        );
+    }
+
+    function runTest() {
+        if (window.testRunner) {
+            if (window.location.search === "?stepTwo") {
+                let imageElement = document.createElement("img");
+                imageElement.src = "https://127.0.0.1:8443/adClickAttribution/resources/redirectToConversion.php?conversionData=12&priority=03";
+                imageElement.id = "pixel";
+                imageElement.onerror = function(e) {
+                    testRunner.dumpAdClickAttribution();
+                    document.body.removeChild(document.getElementById("targetLink"));
+                    document.body.removeChild(document.getElementById("pixel"));
+                    tearDownAndFinish();
+                };
+                document.body.appendChild(imageElement);
+            } else {
+                activateElement("targetLink");
+            }
+        } else {
+            document.getElementById("output").innerText = "FAIL No testRunner.";
+        }
+    }
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionattributionconversionthroughimageredirectwithoutpriorityexpectedtxtfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementattributionconversionthroughimageredirectwithoutpriorityexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-without-priority-expected.txt (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-without-priority-expected.txt) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-without-priority-expected.txt                              (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-without-priority-expected.txt 2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+Tests triggering of ad click attribution conversions without priority.
+
+
+Converted Ad Click Attributions:
+WebCore::AdClickAttribution 1
+Source: 127.0.0.1
+Destination: localhost
+Campaign ID: 3
+Conversion data: 12
+Conversion priority: 0
+Conversion earliest time to send: Within 24-48 hours
+Conversion request sent: false
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionattributionconversionthroughimageredirectwithoutpriorityhtmlfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementattributionconversionthroughimageredirectwithoutpriorityhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-without-priority.html (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-without-priority.html) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-without-priority.html                              (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-without-priority.html 2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <script src="/js-test-resources/ui-helper.js"></script>
+    <script src="resources/util.js"></script>
+</head>
+<body onload="setTimeout(runTest, 0)">
+<div id="description">Tests triggering of ad click attribution conversions without priority.</div>
+<a id="targetLink" href="http://localhost:8000/adClickAttribution/attribution-conversion-through-image-redirect-without-priority.html?stepTwo" adcampaignid="3" addestination="http://localhost:8000">Link</a><br>
+<div id="output"></div>
+<script>
+    prepareTest();
+
+    function activateElement(elementID) {
+        var element = document.getElementById(elementID);
+        var centerX = element.offsetLeft + element.offsetWidth / 2;
+        var centerY = element.offsetTop + element.offsetHeight / 2;
+        UIHelper.activateAt(centerX, centerY).then(
+            function () {
+            },
+            function () {
+                document.getElementById("output").innerText = "FAIL Promise rejected.";
+                tearDownAndFinish();
+            }
+        );
+    }
+
+    function runTest() {
+        if (window.testRunner) {
+            if (window.location.search === "?stepTwo") {
+                let imageElement = document.createElement("img");
+                imageElement.src = "https://127.0.0.1:8443/adClickAttribution/resources/redirectToConversion.php?conversionData=12";
+                imageElement.id = "pixel";
+                imageElement.onerror = function() {
+                    testRunner.dumpAdClickAttribution();
+                    document.body.removeChild(document.getElementById("targetLink"));
+                    document.body.removeChild(document.getElementById("pixel"));
+                    tearDownAndFinish();
+                };
+                document.body.appendChild(imageElement);
+            } else {
+                activateElement("targetLink");
+            }
+        } else {
+            document.getElementById("output").innerText = "FAIL No testRunner.";
+        }
+    }
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionclearthroughwebsitedataremovalexpectedtxtfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementclearthroughwebsitedataremovalexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/clear-through-website-data-removal-expected.txt (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/clear-through-website-data-removal-expected.txt) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/clear-through-website-data-removal-expected.txt                          (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/clear-through-website-data-removal-expected.txt     2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+Tests that both unconverted and converted attributions are cleared on website data removal.
+
+
+
+No stored Ad Click Attribution data.
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionclearthroughwebsitedataremovalhtmlfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementclearthroughwebsitedataremovalhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/clear-through-website-data-removal.html (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/clear-through-website-data-removal.html) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/clear-through-website-data-removal.html                          (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/clear-through-website-data-removal.html     2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,83 @@
</span><ins>+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true AdClickAttributionEnabled=true ] -->
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <script src="/js-test-resources/ui-helper.js"></script>
+    <script src="resources/util.js"></script>
+</head>
+<body onload="setTimeout(runTest, 0)">
+<div id="description">Tests that both unconverted and converted attributions are cleared on website data removal.</div>
+<a id="targetLink">Link</a><br>
+<div id="output"></div>
+<script>
+    const path = "/adClickAttribution/clear-through-website-data-removal.html";
+    const configuration = [
+        {
+            href: "http://localhost:8000" + path + "?stepTwo",
+            adcampaignid: "3",
+            addestination: "http://localhost:8000"
+        },
+        {
+            href: "http://127.0.0.1:8000" + path + "?stepThree",
+            adcampaignid: "4",
+            addestination: "http://127.0.0.1:8000"
+        }
+    ];
+
+    prepareTest();
+
+    function configureLink(index) {
+        let linkElement = document.getElementById("targetLink");
+        linkElement.setAttribute("href", configuration[index].href);
+        linkElement.setAttribute("adcampaignid", configuration[index].adcampaignid);
+        linkElement.setAttribute("addestination", configuration[index].addestination);
+    }
+
+    function activateElement(elementID) {
+        var element = document.getElementById(elementID);
+        var centerX = element.offsetLeft + element.offsetWidth / 2;
+        var centerY = element.offsetTop + element.offsetHeight / 2;
+        UIHelper.activateAt(centerX, centerY).then(
+            function () {
+            },
+            function () {
+                document.getElementById("output").innerText = "FAIL Promise rejected.";
+                tearDownAndFinish();
+            }
+        );
+    }
+
+    function runTest() {
+        if (window.testRunner) {
+            if (window.location.search === "") {
+                // First ad click 127.0.0.1 –> localhost.
+                configureLink(0);
+                activateElement("targetLink");
+            } else if (window.location.search === "?stepTwo") {
+                // Convert the first ad click with priority 4, then do a reverse ad click.
+                let imageElement = document.createElement("img");
+                imageElement.src = "https://127.0.0.1:8443/adClickAttribution/resources/redirectToConversion.php?conversionData=12&priority=04";
+                imageElement.id = "pixel";
+                imageElement.onerror = function(e) {
+                    // Second ad click localhost –> 127.0.0.1.
+                    configureLink(1);
+                    activateElement("targetLink");
+                };
+                document.body.appendChild(imageElement);
+            } else if (window.location.search === "?stepThree") {
+                testRunner.clearAdClickAttributionsThroughWebsiteDataRemoval();
+                testRunner.dumpAdClickAttribution();
+                document.body.removeChild(document.getElementById("targetLink"));
+                tearDownAndFinish();
+            } else {
+                document.getElementById("output").innerText = "FAIL Unknown window.location.search == " + window.location.search + ".";
+                tearDownAndFinish();
+            }
+        } else {
+            document.getElementById("output").innerText = "FAIL No testRunner.";
+        }
+    }
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionconversiondisabledinephemeralsessionexpectedtxtfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementconversiondisabledinephemeralsessionexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/conversion-disabled-in-ephemeral-session-expected.txt (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/conversion-disabled-in-ephemeral-session-expected.txt) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/conversion-disabled-in-ephemeral-session-expected.txt                            (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/conversion-disabled-in-ephemeral-session-expected.txt       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+Tests that stored attributions cannot be converted in an ephemeral session.
+
+
+
+--------
+Frame: '<!--frame1-->'
+--------
+Conversion not received - timed out.
+
+Unconverted Ad Click Attributions:
+WebCore::AdClickAttribution 1
+Source: 127.0.0.1
+Destination: localhost
+Campaign ID: 3
+No conversion data.
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionconversiondisabledinephemeralsessionhtmlfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementconversiondisabledinephemeralsessionhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/conversion-disabled-in-ephemeral-session.html (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/conversion-disabled-in-ephemeral-session.html) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/conversion-disabled-in-ephemeral-session.html                            (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/conversion-disabled-in-ephemeral-session.html       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,80 @@
</span><ins>+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <script src="/js-test-resources/ui-helper.js"></script>
+    <script src="resources/util.js"></script>
+</head>
+<body onload="setTimeout(runTest, 0)">
+<div id="description">Tests that stored attributions cannot be converted in an ephemeral session.</div>
+<a id="targetLink" href="http://localhost:8000/adClickAttribution/conversion-disabled-in-ephemeral-session.html?stepTwo" adcampaignid="3" addestination="http://localhost:8000">Link</a><br>
+<div id="output"></div>
+<script>
+    const currentTimeMillis = (new Date()).getTime();
+    const highEntropyBits = currentTimeMillis - (Math.floor(currentTimeMillis / 1000000) * 1000000);
+    const nonce = highEntropyBits + "" + Math.floor(Math.random() * 100);
+
+    prepareTest();
+
+    if (window.testRunner)
+        testRunner.setAdClickAttributionConversionURLForTesting("http://127.0.0.1:8000/adClickAttribution/resources/conversionReport.php?nonce=" + nonce);
+
+    function activateElement(elementID) {
+        var element = document.getElementById(elementID);
+        var centerX = element.offsetLeft + element.offsetWidth / 2;
+        var centerY = element.offsetTop + element.offsetHeight / 2;
+        UIHelper.activateAt(centerX, centerY).then(
+            function () {
+            },
+            function () {
+                document.getElementById("output").innerText = "FAIL Promise rejected.";
+                tearDownAndFinish();
+            }
+        );
+    }
+
+    function appendIframe(url, onloadCallback) {
+        let iframeElement = document.createElement("iframe");
+        iframeElement.src = url;
+        if (onloadCallback)
+            iframeElement.onload = onloadCallback;
+        document.body.appendChild(iframeElement);
+    }
+
+    function appendConversionDataIframeAndFinish() {
+        testRunner.dumpAdClickAttribution();
+        document.body.removeChild(document.getElementById("targetLink"));
+
+        appendIframe("http://127.0.0.1:8000/adClickAttribution/resources/getConversionData.php?timeout_ms=1000&nonce=" + nonce, function() {
+            tearDownAndFinish();
+        });
+    }
+
+    function runTest() {
+        if (window.testRunner) {
+            if (window.location.search === "?stepTwo") {
+                testRunner.setShouldSwapToEphemeralSessionOnNextNavigation(true);
+                window.location = "http://localhost:8000/adClickAttribution/conversion-disabled-in-ephemeral-session.html?stepThree";
+            } else if (window.location.search === "?stepThree") {
+                let imageElement = document.createElement("img");
+                imageElement.src = "https://127.0.0.1:8443/adClickAttribution/resources/redirectToConversion.php?conversionData=12&nonce=" + nonce;
+                imageElement.id = "pixel";
+                imageElement.onerror = function() {
+                    testRunner.setShouldSwapToDefaultSessionOnNextNavigation(true);
+                    window.location = "http://localhost:8000/adClickAttribution/conversion-disabled-in-ephemeral-session.html?stepFour";
+                };
+                document.body.appendChild(imageElement);
+            } else if (window.location.search === "?stepFour") {
+                appendConversionDataIframeAndFinish();
+            } else {
+                document.cookie = "cookieSetAsFirstParty=1; path=/";
+                activateElement("targetLink");
+            }
+        } else {
+            document.getElementById("output").innerText = "FAIL No testRunner.";
+        }
+    }
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionexpiredattributionsremovedexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/adClickAttribution/expired-attributions-removed-expected.txt (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/expired-attributions-removed-expected.txt                                (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/expired-attributions-removed-expected.txt   2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+Tests expiration of ad click attribution.
+
+
+
+No stored Ad Click Attribution data.
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionexpiredattributionsremovedhtmlfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementexpiredattributionsremovedhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/expired-attributions-removed.html (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/expired-attributions-removed.html) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/expired-attributions-removed.html                                (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/expired-attributions-removed.html   2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <script src="/js-test-resources/ui-helper.js"></script>
+    <script src="resources/util.js"></script>
+</head>
+<body onload="setTimeout(runTest, 0)">
+<div id="description">Tests expiration of ad click attribution.</div>
+<a id="targetLink" href="http://localhost:8000/adClickAttribution/expired-attributions-removed.html?stepTwo" adcampaignid="3" addestination="http://localhost:8000">Link</a><br>
+<div id="output"></div>
+<script>
+    prepareTest();
+
+    function activateElement(elementID) {
+        var element = document.getElementById(elementID);
+        var centerX = element.offsetLeft + element.offsetWidth / 2;
+        var centerY = element.offsetTop + element.offsetHeight / 2;
+        UIHelper.activateAt(centerX, centerY).then(
+            function () {
+            },
+            function () {
+                document.getElementById("output").innerText = "FAIL Promise rejected.";
+                tearDownAndFinish();
+            }
+        );
+    }
+
+    function runTest() {
+        if (window.testRunner) {
+            if (window.location.search === "?stepTwo") {
+                testRunner.markAdClickAttributionsAsExpiredForTesting();
+                let imageElement = document.createElement("img");
+                imageElement.src = "https://127.0.0.1:8443/adClickAttribution/resources/redirectToConversion.php?conversionData=12";
+                imageElement.id = "pixel";
+                imageElement.onerror = function() {
+                    testRunner.dumpAdClickAttribution();
+                    document.body.removeChild(document.getElementById("targetLink"));
+                    document.body.removeChild(document.getElementById("pixel"));
+                    tearDownAndFinish();
+                };
+                document.body.appendChild(imageElement);
+            } else {
+                activateElement("targetLink");
+            }
+        } else {
+            document.getElementById("output").innerText = "FAIL No testRunner.";
+        }
+    }
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionresourcesconversionFilePathphpfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementresourcesconversionFilePathphp"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/resources/conversionFilePath.php (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/resources/conversionFilePath.php) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/resources/conversionFilePath.php                         (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/resources/conversionFilePath.php    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+<?php
+require_once '../../resources/portabilityLayer.php';
+
+if (isset($_GET["nonce"]))
+    $conversionFileName = "/adClickConversion" . $_GET["nonce"] . ".txt";
+else
+    $conversionFileName = "/adClickConversion.txt";
+$conversionFilePath = sys_get_temp_dir() . $conversionFileName;
+?>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionresourcesconversionReportphpfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementresourcesconversionReportphp"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/resources/conversionReport.php (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/resources/conversionReport.php) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/resources/conversionReport.php                           (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/resources/conversionReport.php      2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+<?php
+require_once 'conversionFilePath.php';
+
+$conversionFile = fopen($conversionFilePath . ".tmp", 'w');
+$httpHeaders = $_SERVER;
+$cookiesFound = false;
+foreach ($httpHeaders as $name => $value) {
+    if ($name === "HTTP_HOST") {
+        fwrite($conversionFile, "$name: $value\n");
+    } else if ($name === "REQUEST_URI") {
+        $positionOfNonce = strpos($value, "?nonce=");
+        if ($positionOfNonce === false)
+            $outputURL = $value;
+        else
+            $outputURL = substr($value, 0, $positionOfNonce);
+        fwrite($conversionFile, "$name: $outputURL\n");
+    } else if ($name === "HTTP_COOKIE") {
+        fwrite($conversionFile, "Cookies in conversion request: $value\n");
+        $cookiesFound = true;
+    } else if ($name === "CONTENT_TYPE") {
+        fwrite($conversionFile, "Content type: $value\n");
+    }
+}
+if (!$cookiesFound) {
+    fwrite($conversionFile, "No cookies in conversion request.\n");
+}
+
+$requestBody = file_get_contents('php://input');
+fwrite($conversionFile, "Request body:\n$requestBody\n");
+
+fclose($conversionFile);
+rename($conversionFilePath . ".tmp", $conversionFilePath);
+
+header("HTTP/1.1 200 OK");
+setcookie("cookieSetInConversionReport", "1", 0, "/");
+
+?>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionresourcesconvertAndPostMessageBackhtmlfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementresourcesconvertAndPostMessageBackhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/resources/convertAndPostMessageBack.html (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/resources/convertAndPostMessageBack.html) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/resources/convertAndPostMessageBack.html                         (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/resources/convertAndPostMessageBack.html    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <script>
+        function fireConversionPixel() {
+            let imageElement = document.createElement("img");
+            imageElement.src = "https://127.0.0.1:8443/adClickAttribution/resources/redirectToConversion.php?conversionData=12&priority=03";
+            imageElement.id = "pixel";
+            imageElement.onerror = function() {
+                document.body.removeChild(document.getElementById("pixel"));
+                postMessageBack();
+            };
+            document.body.appendChild(imageElement);
+        }
+
+        function postMessageBack() {
+            if (window.opener) {
+                window.opener.postMessage("Done", "http://127.0.0.1:8000");
+                window.close();
+            }
+        }
+    </script>
+</head>
+<body onload="setTimeout(fireConversionPixel, 0)">
+</body>
+</html>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionresourcesgetConversionDataphpfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementresourcesgetConversionDataphp"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/resources/getConversionData.php (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/resources/getConversionData.php) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/resources/getConversionData.php                          (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/resources/getConversionData.php     2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+<?php
+require_once 'conversionFilePath.php';
+
+$noTimeout = True;
+$timeoutMsecs = 0;
+if (isset($_GET['timeout_ms'])) {
+    $noTimeout = False;
+    $timeoutMsecs = (int) $_GET['timeout_ms'];
+}
+
+$conversionFileFound = False;
+while ($noTimeout || $timeoutMsecs > 0) {
+    if (file_exists($conversionFilePath)) {
+        $conversionFileFound = True;
+        break;
+    }
+    $sleepMsecs = 10;
+    usleep($sleepMsecs * 1000);
+    if (!$noTimeout) {
+        $timeoutMsecs -= $sleepMsecs;
+    }
+    // file_exists() caches results, we want to invalidate the cache.
+    clearstatcache();
+}
+
+
+echo "<html><body>\n";
+
+if ($conversionFileFound) {
+    echo "Conversion received.";
+    $conversionFile = fopen($conversionFilePath, 'r');
+    while ($line = fgets($conversionFile)) {
+        echo "<br>";
+        echo trim($line);
+    }
+    echo "<br>";
+    fclose($conversionFile);
+    unlink($conversionFilePath);
+} else {
+    echo "Conversion not received - timed out.<br>";
+}
+
+if (isset($_GET['endTest'])) {
+    echo "<script>";
+    echo "if (window.testRunner) {";
+    echo "    testRunner.notifyDone();";
+    echo "    testRunner.setAdClickAttributionOverrideTimerForTesting(false);";
+    echo "    testRunner.setAdClickAttributionConversionURLForTesting('');";
+    echo "}";
+    echo "</script>";
+}
+
+echo "</body></html>";
+?>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionresourcesredirectToConversionphpfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementresourcesredirectToConversionphp"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/resources/redirectToConversion.php (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/resources/redirectToConversion.php) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/resources/redirectToConversion.php                               (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/resources/redirectToConversion.php  2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+<?php
+header("HTTP/1.1 302 Found");
+header("Cache-Control: no-cache, no-store, must-revalidate");
+if (isset($_GET["conversionData"]) && isset($_GET["priority"])) {
+  header("Location: /.well-known/ad-click-attribution/" . $_GET["conversionData"] . "/" . $_GET["priority"]);
+} else if (isset($_GET["conversionData"])) {
+  header("Location: /.well-known/ad-click-attribution/" . $_GET["conversionData"]);
+}
+?>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionresourcesredirectToConversionOnIPAddressphp"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/adClickAttribution/resources/redirectToConversionOnIPAddress.php (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/resources/redirectToConversionOnIPAddress.php                            (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/resources/redirectToConversionOnIPAddress.php       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+<?php
+header("HTTP/1.0 302 Found");
+if (isset($_GET["conversionData"]) && isset($_GET["priority"])) {
+  header("Location: https://127.0.0.1:8000/.well-known/ad-click-attribution/" . $_GET["conversionData"] . "/" . $_GET["priority"]);
+} else if (isset($_GET["conversionData"])) {
+  header("Location: https://127.0.0.1:8000/.well-known/ad-click-attribution/" . $_GET["conversionData"]);
+}
+?>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionresourcesutiljsfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementresourcesutiljs"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/resources/util.js (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/resources/util.js) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/resources/util.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/resources/util.js   2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+function prepareTest() {
+    if (window.testRunner) {
+        testRunner.waitUntilDone();
+        testRunner.dumpChildFramesAsText();
+        testRunner.dumpAsText();
+        testRunner.setAllowsAnySSLCertificate(true);
+    }
+}
+
+function tearDownAndFinish() {
+    if (window.testRunner) {
+        testRunner.setAllowsAnySSLCertificate(false);
+        testRunner.setAdClickAttributionOverrideTimerForTesting(false);
+        testRunner.setAdClickAttributionConversionURLForTesting("");
+        testRunner.notifyDone();
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionsecondattributionconvertedwithhigherpriorityexpectedtxtfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementsecondattributionconvertedwithhigherpriorityexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/second-attribution-converted-with-higher-priority-expected.txt (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/second-attribution-converted-with-higher-priority-expected.txt) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/second-attribution-converted-with-higher-priority-expected.txt                           (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/second-attribution-converted-with-higher-priority-expected.txt      2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+Tests that a second attribution conversion with higher priority replaces an older with lower priority.
+
+
+Converted Ad Click Attributions:
+WebCore::AdClickAttribution 1
+Source: 127.0.0.1
+Destination: localhost
+Campaign ID: 4
+Conversion data: 12
+Conversion priority: 4
+Conversion earliest time to send: Within 24-48 hours
+Conversion request sent: false
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionsecondattributionconvertedwithhigherpriorityhtmlfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementsecondattributionconvertedwithhigherpriorityhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/second-attribution-converted-with-higher-priority.html (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/second-attribution-converted-with-higher-priority.html) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/second-attribution-converted-with-higher-priority.html                           (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/second-attribution-converted-with-higher-priority.html      2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,92 @@
</span><ins>+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <script src="/js-test-resources/ui-helper.js"></script>
+    <script src="resources/util.js"></script>
+</head>
+<body onload="setTimeout(runTest, 0)">
+<div id="description">Tests that a second attribution conversion with higher priority replaces an older with lower priority.</div>
+<a id="targetLink">Link</a><br>
+<div id="output"></div>
+<script>
+    const path = "/adClickAttribution/second-attribution-converted-with-higher-priority.html";
+    const configuration = [
+        {
+            href: "http://localhost:8000" + path + "?stepTwo",
+            adcampaignid: "3",
+            addestination: "http://localhost:8000"
+        },
+        {
+            href: "http://localhost:8000" + path + "?stepFour",
+            adcampaignid: "4",
+            addestination: "http://localhost:8000"
+        }
+    ];
+
+    prepareTest();
+
+    function configureLink(index) {
+        let linkElement = document.getElementById("targetLink");
+        linkElement.setAttribute("href", configuration[index].href);
+        linkElement.setAttribute("adcampaignid", configuration[index].adcampaignid);
+        linkElement.setAttribute("addestination", configuration[index].addestination);
+    }
+
+    function activateElement(elementID) {
+        var element = document.getElementById(elementID);
+        var centerX = element.offsetLeft + element.offsetWidth / 2;
+        var centerY = element.offsetTop + element.offsetHeight / 2;
+        UIHelper.activateAt(centerX, centerY).then(
+            function () {
+            },
+            function () {
+                document.getElementById("output").innerText = "FAIL Promise rejected.";
+                tearDownAndFinish();
+            }
+        );
+    }
+
+    function runTest() {
+        if (window.testRunner) {
+            if (window.location.search === "") {
+                // First ad click 127.0.0.1 –> localhost.
+                configureLink(0);
+                activateElement("targetLink");
+            } else if (window.location.search === "?stepTwo") {
+                // Convert the first ad click with priority 3 and navigate back to 127.0.0.1.
+                let imageElement = document.createElement("img");
+                imageElement.src = "https://127.0.0.1:8443/adClickAttribution/resources/redirectToConversion.php?conversionData=12&priority=03";
+                imageElement.id = "pixel";
+                imageElement.onerror = function(e) {
+                    document.location.href = "http://127.0.0.1:8000" + path + "?stepThree";
+                };
+                document.body.appendChild(imageElement);
+            } else if (window.location.search === "?stepThree") {
+                // Second ad click 127.0.0.1 –> localhost.
+                configureLink(1);
+                activateElement("targetLink");
+            } else if (window.location.search === "?stepFour") {
+                // Convert the second ad click with priority 4 and finish.
+                let imageElement = document.createElement("img");
+                imageElement.src = "https://127.0.0.1:8443/adClickAttribution/resources/redirectToConversion.php?conversionData=12&priority=04";
+                imageElement.id = "pixel";
+                imageElement.onerror = function(e) {
+                    testRunner.dumpAdClickAttribution();
+                    document.body.removeChild(document.getElementById("targetLink"));
+                    document.body.removeChild(document.getElementById("pixel"));
+                    tearDownAndFinish();
+                };
+                document.body.appendChild(imageElement);
+            } else {
+                document.getElementById("output").innerText = "FAIL Unknown window.location.search == " + window.location.search + ".";
+                tearDownAndFinish();
+            }
+        } else {
+            document.getElementById("output").innerText = "FAIL No testRunner.";
+        }
+    }
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionsecondattributionconvertedwithlowerpriorityexpectedtxtfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementsecondattributionconvertedwithlowerpriorityexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/second-attribution-converted-with-lower-priority-expected.txt (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/second-attribution-converted-with-lower-priority-expected.txt) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/second-attribution-converted-with-lower-priority-expected.txt                            (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/second-attribution-converted-with-lower-priority-expected.txt       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+Tests that a second attribution conversion with lower priority does not replace an older with higher priority.
+
+
+Converted Ad Click Attributions:
+WebCore::AdClickAttribution 1
+Source: 127.0.0.1
+Destination: localhost
+Campaign ID: 3
+Conversion data: 12
+Conversion priority: 4
+Conversion earliest time to send: Within 24-48 hours
+Conversion request sent: false
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionsecondattributionconvertedwithlowerpriorityhtmlfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementsecondattributionconvertedwithlowerpriorityhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/second-attribution-converted-with-lower-priority.html (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/second-attribution-converted-with-lower-priority.html) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/second-attribution-converted-with-lower-priority.html                            (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/second-attribution-converted-with-lower-priority.html       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,92 @@
</span><ins>+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <script src="/js-test-resources/ui-helper.js"></script>
+    <script src="resources/util.js"></script>
+</head>
+<body onload="setTimeout(runTest, 0)">
+<div id="description">Tests that a second attribution conversion with lower priority does not replace an older with higher priority.</div>
+<a id="targetLink">Link</a><br>
+<div id="output"></div>
+<script>
+    const path = "/adClickAttribution/second-attribution-converted-with-lower-priority.html";
+    const configuration = [
+        {
+            href: "http://localhost:8000" + path + "?stepTwo",
+            adcampaignid: "3",
+            addestination: "http://localhost:8000"
+        },
+        {
+            href: "http://localhost:8000" + path + "?stepFour",
+            adcampaignid: "4",
+            addestination: "http://localhost:8000"
+        }
+    ];
+
+    prepareTest();
+
+    function configureLink(index) {
+        let linkElement = document.getElementById("targetLink");
+        linkElement.setAttribute("href", configuration[index].href);
+        linkElement.setAttribute("adcampaignid", configuration[index].adcampaignid);
+        linkElement.setAttribute("addestination", configuration[index].addestination);
+    }
+
+    function activateElement(elementID) {
+        var element = document.getElementById(elementID);
+        var centerX = element.offsetLeft + element.offsetWidth / 2;
+        var centerY = element.offsetTop + element.offsetHeight / 2;
+        UIHelper.activateAt(centerX, centerY).then(
+            function () {
+            },
+            function () {
+                document.getElementById("output").innerText = "FAIL Promise rejected.";
+                tearDownAndFinish();
+            }
+        );
+    }
+
+    function runTest() {
+        if (window.testRunner) {
+            if (window.location.search === "") {
+                // First ad click 127.0.0.1 –> localhost.
+                configureLink(0);
+                activateElement("targetLink");
+            } else if (window.location.search === "?stepTwo") {
+                // Convert the first ad click with priority 4 and navigate back to 127.0.0.1.
+                let imageElement = document.createElement("img");
+                imageElement.src = "https://127.0.0.1:8443/adClickAttribution/resources/redirectToConversion.php?conversionData=12&priority=04";
+                imageElement.id = "pixel";
+                imageElement.onerror = function(e) {
+                    document.location.href = "http://127.0.0.1:8000" + path + "?stepThree";
+                };
+                document.body.appendChild(imageElement);
+            } else if (window.location.search === "?stepThree") {
+                // Second ad click 127.0.0.1 –> localhost.
+                configureLink(1);
+                activateElement("targetLink");
+            } else if (window.location.search === "?stepFour") {
+                // Convert the second ad click with priority 3 and finish.
+                let imageElement = document.createElement("img");
+                imageElement.src = "https://127.0.0.1:8443/adClickAttribution/resources/redirectToConversion.php?conversionData=12&priority=03";
+                imageElement.id = "pixel";
+                imageElement.onerror = function(e) {
+                    testRunner.dumpAdClickAttribution();
+                    document.body.removeChild(document.getElementById("targetLink"));
+                    document.body.removeChild(document.getElementById("pixel"));
+                    tearDownAndFinish();
+                };
+                document.body.appendChild(imageElement);
+            } else {
+                document.getElementById("output").innerText = "FAIL Unknown window.location.search == " + window.location.search + ".";
+                tearDownAndFinish();
+            }
+        } else {
+            document.getElementById("output").innerText = "FAIL No testRunner.";
+        }
+    }
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionsecondconversionwithhigherpriorityexpectedtxtfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementsecondconversionwithhigherpriorityexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/second-conversion-with-higher-priority-expected.txt (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/second-conversion-with-higher-priority-expected.txt) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/second-conversion-with-higher-priority-expected.txt                              (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/second-conversion-with-higher-priority-expected.txt 2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+Tests that the attribution is updated if it gets a second conversion with higher priority.
+
+
+Converted Ad Click Attributions:
+WebCore::AdClickAttribution 1
+Source: 127.0.0.1
+Destination: localhost
+Campaign ID: 3
+Conversion data: 12
+Conversion priority: 4
+Conversion earliest time to send: Within 24-48 hours
+Conversion request sent: false
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionsecondconversionwithhigherpriorityhtmlfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementsecondconversionwithhigherpriorityhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/second-conversion-with-higher-priority.html (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/second-conversion-with-higher-priority.html) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/second-conversion-with-higher-priority.html                              (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/second-conversion-with-higher-priority.html 2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,85 @@
</span><ins>+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <script src="/js-test-resources/ui-helper.js"></script>
+    <script src="resources/util.js"></script>
+</head>
+<body onload="setTimeout(runTest, 0)">
+<div id="description">Tests that the attribution is updated if it gets a second conversion with higher priority.</div>
+<a id="targetLink">Link</a><br>
+<div id="output"></div>
+<script>
+    const path = "/adClickAttribution/second-conversion-with-higher-priority.html";
+    const configuration = [
+        {
+            href: "http://localhost:8000" + path + "?stepTwo",
+            adcampaignid: "3",
+            addestination: "http://localhost:8000"
+        }
+    ];
+
+    prepareTest();
+
+    function configureLink(index) {
+        let linkElement = document.getElementById("targetLink");
+        linkElement.setAttribute("href", configuration[index].href);
+        linkElement.setAttribute("adcampaignid", configuration[index].adcampaignid);
+        linkElement.setAttribute("addestination", configuration[index].addestination);
+    }
+
+    function activateElement(elementID) {
+        var element = document.getElementById(elementID);
+        var centerX = element.offsetLeft + element.offsetWidth / 2;
+        var centerY = element.offsetTop + element.offsetHeight / 2;
+        UIHelper.activateAt(centerX, centerY).then(
+            function () {
+            },
+            function () {
+                document.getElementById("output").innerText = "FAIL Promise rejected.";
+                tearDownAndFinish();
+            }
+        );
+    }
+
+    function convert(priority, callback) {
+        let pixelElement = document.getElementById("pixel");
+        if (pixelElement)
+            document.body.removeChild(pixelElement);
+
+        let imageElement = document.createElement("img");
+        imageElement.src = "https://127.0.0.1:8443/adClickAttribution/resources/redirectToConversion.php?conversionData=12&priority=" + priority;
+        imageElement.id = "pixel";
+        imageElement.onerror = callback;
+        document.body.appendChild(imageElement);
+    }
+
+    function runTest() {
+        if (window.testRunner) {
+            if (window.location.search === "") {
+                // Ad click 127.0.0.1 –> localhost.
+                configureLink(0);
+                activateElement("targetLink");
+            } else if (window.location.search === "?stepTwo") {
+                // Convert the ad click with priority 3.
+                convert("03", function() {
+                    // Convert the ad click with priority 4.
+                    convert("04", function() {
+                        testRunner.dumpAdClickAttribution();
+                        document.body.removeChild(document.getElementById("targetLink"));
+                        document.body.removeChild(document.getElementById("pixel"));
+                        tearDownAndFinish();
+                    });
+                });
+            } else {
+                document.getElementById("output").innerText = "FAIL Unknown window.location.search == " + window.location.search + ".";
+                tearDownAndFinish();
+            }
+        } else {
+            document.getElementById("output").innerText = "FAIL No testRunner.";
+        }
+    }
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionsecondconversionwithlowerpriorityexpectedtxtfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementsecondconversionwithlowerpriorityexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/second-conversion-with-lower-priority-expected.txt (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/second-conversion-with-lower-priority-expected.txt) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/second-conversion-with-lower-priority-expected.txt                               (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/second-conversion-with-lower-priority-expected.txt  2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+Tests that the attribution is not updated if it gets a second conversion with lower priority.
+
+
+Converted Ad Click Attributions:
+WebCore::AdClickAttribution 1
+Source: 127.0.0.1
+Destination: localhost
+Campaign ID: 3
+Conversion data: 12
+Conversion priority: 4
+Conversion earliest time to send: Within 24-48 hours
+Conversion request sent: false
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionsecondconversionwithlowerpriorityhtmlfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementsecondconversionwithlowerpriorityhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/second-conversion-with-lower-priority.html (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/second-conversion-with-lower-priority.html) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/second-conversion-with-lower-priority.html                               (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/second-conversion-with-lower-priority.html  2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,85 @@
</span><ins>+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <script src="/js-test-resources/ui-helper.js"></script>
+    <script src="resources/util.js"></script>
+</head>
+<body onload="setTimeout(runTest, 0)">
+<div id="description">Tests that the attribution is not updated if it gets a second conversion with lower priority.</div>
+<a id="targetLink">Link</a><br>
+<div id="output"></div>
+<script>
+    const path = "/adClickAttribution/second-conversion-with-lower-priority.html";
+    const configuration = [
+        {
+            href: "http://localhost:8000" + path + "?stepTwo",
+            adcampaignid: "3",
+            addestination: "http://localhost:8000"
+        }
+    ];
+
+    prepareTest();
+
+    function configureLink(index) {
+        let linkElement = document.getElementById("targetLink");
+        linkElement.setAttribute("href", configuration[index].href);
+        linkElement.setAttribute("adcampaignid", configuration[index].adcampaignid);
+        linkElement.setAttribute("addestination", configuration[index].addestination);
+    }
+
+    function activateElement(elementID) {
+        var element = document.getElementById(elementID);
+        var centerX = element.offsetLeft + element.offsetWidth / 2;
+        var centerY = element.offsetTop + element.offsetHeight / 2;
+        UIHelper.activateAt(centerX, centerY).then(
+            function () {
+            },
+            function () {
+                document.getElementById("output").innerText = "FAIL Promise rejected.";
+                tearDownAndFinish();
+            }
+        );
+    }
+
+    function convert(priority, callback) {
+        let pixelElement = document.getElementById("pixel");
+        if (pixelElement)
+            document.body.removeChild(pixelElement);
+
+        let imageElement = document.createElement("img");
+        imageElement.src = "https://127.0.0.1:8443/adClickAttribution/resources/redirectToConversion.php?conversionData=12&priority=" + priority;
+        imageElement.id = "pixel";
+        imageElement.onerror = callback;
+        document.body.appendChild(imageElement);
+    }
+
+    function runTest() {
+        if (window.testRunner) {
+            if (window.location.search === "") {
+                // Ad click 127.0.0.1 –> localhost.
+                configureLink(0);
+                activateElement("targetLink");
+            } else if (window.location.search === "?stepTwo") {
+                // Convert the ad click with priority 4.
+                convert("04", function() {
+                    // Convert the ad click with priority 3.
+                    convert("03", function() {
+                        testRunner.dumpAdClickAttribution();
+                        document.body.removeChild(document.getElementById("targetLink"));
+                        document.body.removeChild(document.getElementById("pixel"));
+                        tearDownAndFinish();
+                    });
+                });
+            } else {
+                document.getElementById("output").innerText = "FAIL Unknown window.location.search == " + window.location.search + ".";
+                testRunner.notifyDone();
+            }
+        } else {
+            document.getElementById("output").innerText = "FAIL No testRunner.";
+        }
+    }
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionsendattributionconversionrequestexpectedtxtfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementsendattributionconversionrequestexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/send-attribution-conversion-request-expected.txt (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/send-attribution-conversion-request-expected.txt) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/send-attribution-conversion-request-expected.txt                         (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/send-attribution-conversion-request-expected.txt    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+Tests sending of ad click attribution requests after a conversion. Also tests that cookies are not sent in those requests and cookies are not accepted in the responses.
+
+
+
+--------
+Frame: '<!--frame1-->'
+--------
+Cookies are: cookieSetAsFirstParty = 1
+
+--------
+Frame: '<!--frame2-->'
+--------
+Conversion received.
+HTTP_HOST: 127.0.0.1:8000
+Content type: application/json
+REQUEST_URI: /adClickAttribution/resources/conversionReport.php
+No cookies in conversion request.
+Request body:
+{"content-type":"click","content-site":"127.0.0.1","content-id":3,"conversion-site":"localhost","conversion-data":12,"report-version":1}
+
+
+--------
+Frame: '<!--frame3-->'
+--------
+Cookies are: cookieSetAsFirstParty = 1
+
+No stored Ad Click Attribution data.
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionsendattributionconversionrequesthtmlfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementsendattributionconversionrequesthtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/send-attribution-conversion-request.html (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/send-attribution-conversion-request.html) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/send-attribution-conversion-request.html                         (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/send-attribution-conversion-request.html    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,80 @@
</span><ins>+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <script src="/js-test-resources/ui-helper.js"></script>
+    <script src="resources/util.js"></script>
+</head>
+<body onload="setTimeout(runTest, 0)">
+<div id="description">Tests sending of ad click attribution requests after a conversion. Also tests that cookies are not sent in those requests and cookies are not accepted in the responses.</div>
+<a id="targetLink" href="http://localhost:8000/adClickAttribution/send-attribution-conversion-request.html?stepTwo" adcampaignid="3" addestination="http://localhost:8000">Link</a><br>
+<div id="output"></div>
+<script>
+    const currentTimeMillis = (new Date()).getTime();
+    const highEntropyBits = currentTimeMillis - (Math.floor(currentTimeMillis / 1000000) * 1000000);
+    const nonce = highEntropyBits + "" + Math.floor(Math.random() * 100);
+
+    prepareTest();
+
+    if (window.testRunner) {
+        testRunner.setAdClickAttributionOverrideTimerForTesting(true);
+        testRunner.setAdClickAttributionConversionURLForTesting("http://127.0.0.1:8000/adClickAttribution/resources/conversionReport.php?nonce=" + nonce);
+    }
+
+    function activateElement(elementID) {
+        var element = document.getElementById(elementID);
+        var centerX = element.offsetLeft + element.offsetWidth / 2;
+        var centerY = element.offsetTop + element.offsetHeight / 2;
+        UIHelper.activateAt(centerX, centerY).then(
+            function () {
+            },
+            function () {
+                document.getElementById("output").innerText = "FAIL Promise rejected.";
+                tearDownAndFinish();
+            }
+        );
+    }
+
+    function appendIframe(url, onloadCallback) {
+        let iframeElement = document.createElement("iframe");
+        iframeElement.src = url;
+        if (onloadCallback)
+            iframeElement.onload = onloadCallback;
+        document.body.appendChild(iframeElement);
+    }
+
+    function appendConversionDataIframeAndFinish() {
+        testRunner.dumpAdClickAttribution();
+        document.body.removeChild(document.getElementById("targetLink"));
+        document.body.removeChild(document.getElementById("pixel"));
+
+        appendIframe("http://127.0.0.1:8000/cookies/resources/echo-cookies.php");
+        appendIframe("http://127.0.0.1:8000/adClickAttribution/resources/getConversionData.php?timeout_ms=2000&nonce=" + nonce, function() {
+            appendIframe("http://127.0.0.1:8000/cookies/resources/echo-cookies.php", function() {
+                tearDownAndFinish();
+            });
+        });
+    }
+
+    function runTest() {
+        if (window.testRunner) {
+            if (window.location.search === "?stepTwo") {
+                let imageElement = document.createElement("img");
+                imageElement.src = "https://127.0.0.1:8443/adClickAttribution/resources/redirectToConversion.php?conversionData=12&nonce=" + nonce;
+                imageElement.id = "pixel";
+                imageElement.onerror = function() {
+                    appendConversionDataIframeAndFinish();
+                };
+                document.body.appendChild(imageElement);
+            } else {
+                document.cookie = "cookieSetAsFirstParty=1; path=/";
+                activateElement("targetLink");
+            }
+        } else {
+            document.getElementById("output").innerText = "FAIL No testRunner.";
+        }
+    }
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionstoreadclickattributionexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/adClickAttribution/store-ad-click-attribution-expected.txt (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/store-ad-click-attribution-expected.txt                          (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/store-ad-click-attribution-expected.txt     2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+Tests storage of ad click attribution.
+
+
+Unconverted Ad Click Attributions:
+WebCore::AdClickAttribution 1
+Source: 127.0.0.1
+Destination: localhost
+Campaign ID: 3
+No conversion data.
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionstoreadclickattributionhtmlfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementstoreprivateclickmeasurementhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/store-ad-click-attribution.html (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/store-private-click-measurement.html) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/store-ad-click-attribution.html                          (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/store-ad-click-attribution.html     2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <script src="/js-test-resources/ui-helper.js"></script>
+    <script src="resources/util.js"></script>
+</head>
+<body onload="setTimeout(runTest, 0)">
+<div id="description">Tests storage of ad click attribution.</div>
+<a id="targetLink" href="http://localhost:8000/adClickAttribution/store-ad-click-attribution.html?stepTwo" adcampaignid="3" addestination="http://localhost:8000">Link</a><br>
+<div id="output"></div>
+<script>
+    prepareTest();
+
+    function activateElement(elementID) {
+        var element = document.getElementById(elementID);
+        var centerX = element.offsetLeft + element.offsetWidth / 2;
+        var centerY = element.offsetTop + element.offsetHeight / 2;
+        UIHelper.activateAt(centerX, centerY).then(
+            function () {
+            },
+            function () {
+                document.getElementById("output").innerText = "FAIL Promise rejected.";
+                tearDownAndFinish();
+            }
+        );
+    }
+
+    function runTest() {
+        if (window.testRunner) {
+            if (window.location.search === "?stepTwo") {
+                testRunner.dumpAdClickAttribution();
+                document.body.removeChild(document.getElementById("targetLink"));
+                tearDownAndFinish();
+            } else {
+                activateElement("targetLink");
+            }
+        } else {
+            document.getElementById("output").innerText = "FAIL No testRunner.";
+        }
+    }
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionstoredisabledinephemeralsessionexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/adClickAttribution/store-disabled-in-ephemeral-session-expected.txt (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/store-disabled-in-ephemeral-session-expected.txt                         (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/store-disabled-in-ephemeral-session-expected.txt    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+Tests that storage of ad click attribution is disabled in ephemeral sessions.
+
+
+
+No stored Ad Click Attribution data.
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsadClickAttributionstoredisabledinephemeralsessionhtmlfromrev269670trunkLayoutTestshttptestsprivateClickMeasurementstoredisabledinephemeralsessionhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/adClickAttribution/store-disabled-in-ephemeral-session.html (from rev 269670, trunk/LayoutTests/http/tests/privateClickMeasurement/store-disabled-in-ephemeral-session.html) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/adClickAttribution/store-disabled-in-ephemeral-session.html                         (rev 0)
+++ trunk/LayoutTests/http/tests/adClickAttribution/store-disabled-in-ephemeral-session.html    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+<!-- webkit-test-runner [ useFlexibleViewport=true useEphemeralSession=true ] -->
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <script src="/js-test-resources/ui-helper.js"></script>
+    <script src="resources/util.js"></script>
+</head>
+<body onload="setTimeout(runTest, 0)">
+<div id="description">Tests that storage of ad click attribution is disabled in ephemeral sessions.</div>
+<a id="targetLink" href="http://localhost:8000/adClickAttribution/store-disabled-in-ephemeral-session.html?stepTwo" adcampaignid="3" addestination="http://localhost:8000">Link</a><br>
+<div id="output"></div>
+<script>
+    prepareTest();
+
+    function activateElement(elementID) {
+        var element = document.getElementById(elementID);
+        var centerX = element.offsetLeft + element.offsetWidth / 2;
+        var centerY = element.offsetTop + element.offsetHeight / 2;
+        UIHelper.activateAt(centerX, centerY).then(
+            function () {
+            },
+            function () {
+                document.getElementById("output").innerText = "FAIL Promise rejected.";
+                tearDownAndFinish();
+            }
+        );
+    }
+
+    function runTest() {
+        if (window.testRunner) {
+            if (window.location.search === "?stepTwo") {
+                testRunner.dumpAdClickAttribution();
+                document.body.removeChild(document.getElementById("targetLink"));
+                tearDownAndFinish();
+            } else {
+                activateElement("targetLink");
+            }
+        } else {
+            document.getElementById("output").innerText = "FAIL No testRunner.";
+        }
+    }
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestscontentextensionsblockadclickattributionexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/contentextensions/block-ad-click-attribution-expected.txt (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/contentextensions/block-ad-click-attribution-expected.txt                           (rev 0)
+++ trunk/LayoutTests/http/tests/contentextensions/block-ad-click-attribution-expected.txt      2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+CONSOLE MESSAGE: Blocked by content extension
+CONSOLE MESSAGE: Cannot load image https://127.0.0.1:8443/adClickAttribution/resources/redirectToConversion.php?conversionData=12 due to access control checks.
+Tests that ad click attribution redirects to well-known location don't trigger a conversion if they are blocked by content blockers.
+
+
+
+--------
+Frame: '<!--frame1-->'
+--------
+Conversion not received - timed out.
+
+Unconverted Ad Click Attributions:
+WebCore::AdClickAttribution 1
+Source: 127.0.0.1
+Destination: localhost
+Campaign ID: 3
+No conversion data.
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestscontentextensionsblockadclickattributionhtmlfromrev269670trunkLayoutTestshttptestscontentextensionsblockprivateclickmeasurementhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/contentextensions/block-ad-click-attribution.html (from rev 269670, trunk/LayoutTests/http/tests/contentextensions/block-private-click-measurement.html) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/contentextensions/block-ad-click-attribution.html                           (rev 0)
+++ trunk/LayoutTests/http/tests/contentextensions/block-ad-click-attribution.html      2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,72 @@
</span><ins>+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <script src="/js-test-resources/ui-helper.js"></script>
+    <script src="../adClickAttribution/resources/util.js"></script>
+</head>
+<body onload="setTimeout(runTest, 0)">
+<div id="description">Tests that ad click attribution redirects to well-known location don't trigger a conversion if they are blocked by content blockers.</div>
+<a id="targetLink" href="http://localhost:8000/contentextensions/block-ad-click-attribution.html?stepTwo" adcampaignid="3" addestination="http://localhost:8000">Link</a><br>
+<div id="output"></div>
+<script>
+    prepareTest();
+
+    if (window.testRunner) {
+        testRunner.setAdClickAttributionOverrideTimerForTesting(true);
+        testRunner.setAdClickAttributionConversionURLForTesting("http://127.0.0.1:8000/adClickAttribution/resources/conversionReport.php");
+    }
+
+    function activateElement(elementID) {
+        var element = document.getElementById(elementID);
+        var centerX = element.offsetLeft + element.offsetWidth / 2;
+        var centerY = element.offsetTop + element.offsetHeight / 2;
+        UIHelper.activateAt(centerX, centerY).then(
+            function () {
+            },
+            function () {
+                document.getElementById("output").innerText = "FAIL Promise rejected.";
+                tearDownAndFinish();
+            }
+        );
+    }
+
+    function appendIframe(url, onloadCallback) {
+        let iframeElement = document.createElement("iframe");
+        iframeElement.src = url;
+        if (onloadCallback)
+            iframeElement.onload = onloadCallback;
+        document.body.appendChild(iframeElement);
+    }
+
+    function appendConversionDataIframeAndFinish() {
+        testRunner.dumpAdClickAttribution();
+        document.body.removeChild(document.getElementById("targetLink"));
+        document.body.removeChild(document.getElementById("pixel"));
+
+        appendIframe("http://127.0.0.1:8000/adClickAttribution/resources/getConversionData.php?timeout_ms=1000", function() {
+            tearDownAndFinish();
+        });
+    }
+
+    function runTest() {
+        if (window.testRunner) {
+            if (window.location.search === "?stepTwo") {
+                let imageElement = document.createElement("img");
+                imageElement.src = "https://127.0.0.1:8443/adClickAttribution/resources/redirectToConversion.php?conversionData=12";
+                imageElement.id = "pixel";
+                imageElement.onerror = function() {
+                    appendConversionDataIframeAndFinish();
+                };
+                document.body.appendChild(imageElement);
+            } else {
+                activateElement("targetLink");
+            }
+        } else {
+            document.getElementById("output").innerText = "FAIL No testRunner.";
+        }
+    }
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestscontentextensionsblockadclickattributionhtmljsonfromrev269670trunkLayoutTestshttptestscontentextensionsblockprivateclickmeasurementhtmljson"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/contentextensions/block-ad-click-attribution.html.json (from rev 269670, trunk/LayoutTests/http/tests/contentextensions/block-private-click-measurement.html.json) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/contentextensions/block-ad-click-attribution.html.json                              (rev 0)
+++ trunk/LayoutTests/http/tests/contentextensions/block-ad-click-attribution.html.json 2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+[
+  {
+    "trigger": {
+      "url-filter": "/.well-known/ad-click-attribution/"
+    },
+    "action": {
+      "type": "block"
+    }
+  }
+]
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestscontentextensionsblockprivateclickmeasurementexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/contentextensions/block-private-click-measurement-expected.txt (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/contentextensions/block-private-click-measurement-expected.txt      2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/LayoutTests/http/tests/contentextensions/block-private-click-measurement-expected.txt 2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1,17 +0,0 @@
</span><del>-CONSOLE MESSAGE: Blocked by content extension
-CONSOLE MESSAGE: Cannot load image https://127.0.0.1:8443/privateClickMeasurement/resources/redirectToConversion.php?conversionData=12 due to access control checks.
-Tests that private click measurement redirects to well-known location don't trigger a conversion if they are blocked by content blockers.
-
-
-
---------
-Frame: '<!--frame1-->'
---------
-Conversion not received - timed out.
-
-Unconverted Private Click Measurements:
-WebCore::PrivateClickMeasurement 1
-Source: 127.0.0.1
-Destination: localhost
-Campaign ID: 3
-No conversion data.
</del></span></pre></div>
<a id="trunkLayoutTestshttptestscontentextensionsblockprivateclickmeasurementhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/contentextensions/block-private-click-measurement.html (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/contentextensions/block-private-click-measurement.html      2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/LayoutTests/http/tests/contentextensions/block-private-click-measurement.html 2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1,72 +0,0 @@
</span><del>-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
-    <script src="/js-test-resources/ui-helper.js"></script>
-    <script src="../privateClickMeasurement/resources/util.js"></script>
-</head>
-<body onload="setTimeout(runTest, 0)">
-<div id="description">Tests that private click measurement redirects to well-known location don't trigger a conversion if they are blocked by content blockers.</div>
-<a id="targetLink" href="http://localhost:8000/contentextensions/block-private-click-measurement.html?stepTwo" adcampaignid="3" addestination="http://localhost:8000">Link</a><br>
-<div id="output"></div>
-<script>
-    prepareTest();
-
-    if (window.testRunner) {
-        testRunner.setPrivateClickMeasurementOverrideTimerForTesting(true);
-        testRunner.setPrivateClickMeasurementConversionURLForTesting("http://127.0.0.1:8000/privateClickMeasurement/resources/conversionReport.php");
-    }
-
-    function activateElement(elementID) {
-        var element = document.getElementById(elementID);
-        var centerX = element.offsetLeft + element.offsetWidth / 2;
-        var centerY = element.offsetTop + element.offsetHeight / 2;
-        UIHelper.activateAt(centerX, centerY).then(
-            function () {
-            },
-            function () {
-                document.getElementById("output").innerText = "FAIL Promise rejected.";
-                tearDownAndFinish();
-            }
-        );
-    }
-
-    function appendIframe(url, onloadCallback) {
-        let iframeElement = document.createElement("iframe");
-        iframeElement.src = url;
-        if (onloadCallback)
-            iframeElement.onload = onloadCallback;
-        document.body.appendChild(iframeElement);
-    }
-
-    function appendConversionDataIframeAndFinish() {
-        testRunner.dumpPrivateClickMeasurement();
-        document.body.removeChild(document.getElementById("targetLink"));
-        document.body.removeChild(document.getElementById("pixel"));
-
-        appendIframe("http://127.0.0.1:8000/privateClickMeasurement/resources/getConversionData.php?timeout_ms=1000", function() {
-            tearDownAndFinish();
-        });
-    }
-
-    function runTest() {
-        if (window.testRunner) {
-            if (window.location.search === "?stepTwo") {
-                let imageElement = document.createElement("img");
-                imageElement.src = "https://127.0.0.1:8443/privateClickMeasurement/resources/redirectToConversion.php?conversionData=12";
-                imageElement.id = "pixel";
-                imageElement.onerror = function() {
-                    appendConversionDataIframeAndFinish();
-                };
-                document.body.appendChild(imageElement);
-            } else {
-                activateElement("targetLink");
-            }
-        } else {
-            document.getElementById("output").innerText = "FAIL No testRunner.";
-        }
-    }
-</script>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestshttptestscontentextensionsblockprivateclickmeasurementhtmljson"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/contentextensions/block-private-click-measurement.html.json (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/contentextensions/block-private-click-measurement.html.json 2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/LayoutTests/http/tests/contentextensions/block-private-click-measurement.html.json    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1,10 +0,0 @@
</span><del>-[
-  {
-    "trigger": {
-      "url-filter": "/.well-known/private-click-measurement/"
-    },
-    "action": {
-      "type": "block"
-    }
-  }
-]
</del></span></pre></div>
<a id="trunkLayoutTestsinspectorpageoverrideSettingAdClickAttributionDebugModeEnabledexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/page/overrideSetting-AdClickAttributionDebugModeEnabled-expected.txt (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/page/overrideSetting-AdClickAttributionDebugModeEnabled-expected.txt                         (rev 0)
+++ trunk/LayoutTests/inspector/page/overrideSetting-AdClickAttributionDebugModeEnabled-expected.txt    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+CONSOLE MESSAGE: [Ad Click Attribution] Turned Debug Mode on.
+Tests for the Page.overrideSetting command.
+
+
+== Running test suite: Page.overrideSetting
+-- Running test case: Page.overrideSetting.AdClickAttributionDebugModeEnabled
+Enabling ad click attribution debug mode...
+PASS: Should broadcast at least one console message.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorpageoverrideSettingAdClickAttributionDebugModeEnabledhtmlfromrev269670trunkLayoutTestsinspectorpageoverrideSettingPrivateClickMeasurementDebugModeEnabledhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/page/overrideSetting-AdClickAttributionDebugModeEnabled.html (from rev 269670, trunk/LayoutTests/inspector/page/overrideSetting-PrivateClickMeasurementDebugModeEnabled.html) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/page/overrideSetting-AdClickAttributionDebugModeEnabled.html                         (rev 0)
+++ trunk/LayoutTests/inspector/page/overrideSetting-AdClickAttributionDebugModeEnabled.html    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
+<script>
+function test()
+{
+    let suite = InspectorTest.createAsyncSuite("Page.overrideSetting");
+
+    suite.addTestCase({
+        name: "Page.overrideSetting.AdClickAttributionDebugModeEnabled",
+        description: "Test that changing whether ad click attribution debug mode is enabled has an effect.",
+        test(resolve, reject) {
+            let listener = WI.consoleManager.addEventListener(WI.ConsoleManager.Event.MessageAdded, (event) => {
+                let {message} = event.data;
+                if (message.source !== WI.ConsoleMessage.MessageSource.AdClickAttribution)
+                    return;
+
+                InspectorTest.pass("Should broadcast at least one console message.");
+
+                WI.consoleManager.removeEventListener(WI.ConsoleManager.Event.MessageAdded, listener);
+                resolve();
+            });
+
+            InspectorTest.log("Enabling ad click attribution debug mode...");
+            PageAgent.overrideSetting(InspectorBackend.Enum.Page.Setting.AdClickAttributionDebugModeEnabled, true).catch(reject);
+        },
+    });
+
+    suite.runTestCasesAndFinish();
+}
+
+</script>
+</head>
+<body onload="runTest()">
+    <p>Tests for the Page.overrideSetting command.</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorpageoverrideSettingPrivateClickMeasurementDebugModeEnabledexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/inspector/page/overrideSetting-PrivateClickMeasurementDebugModeEnabled-expected.txt (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/page/overrideSetting-PrivateClickMeasurementDebugModeEnabled-expected.txt    2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/LayoutTests/inspector/page/overrideSetting-PrivateClickMeasurementDebugModeEnabled-expected.txt       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1,9 +0,0 @@
</span><del>-CONSOLE MESSAGE: [Private Click Measurement] Turned Debug Mode on.
-Tests for the Page.overrideSetting command.
-
-
-== Running test suite: Page.overrideSetting
--- Running test case: Page.overrideSetting.PrivateClickMeasurementDebugModeEnabled
-Enabling private click measurement debug mode...
-PASS: Should broadcast at least one console message.
-
</del></span></pre></div>
<a id="trunkLayoutTestsinspectorpageoverrideSettingPrivateClickMeasurementDebugModeEnabledhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/inspector/page/overrideSetting-PrivateClickMeasurementDebugModeEnabled.html (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/page/overrideSetting-PrivateClickMeasurementDebugModeEnabled.html    2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/LayoutTests/inspector/page/overrideSetting-PrivateClickMeasurementDebugModeEnabled.html       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1,38 +0,0 @@
</span><del>-<!DOCTYPE html>
-<html>
-<head>
-<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
-<script>
-function test()
-{
-    let suite = InspectorTest.createAsyncSuite("Page.overrideSetting");
-
-    suite.addTestCase({
-        name: "Page.overrideSetting.PrivateClickMeasurementDebugModeEnabled",
-        description: "Test that changing whether private click measurement debug mode is enabled has an effect.",
-        test(resolve, reject) {
-            let listener = WI.consoleManager.addEventListener(WI.ConsoleManager.Event.MessageAdded, (event) => {
-                let {message} = event.data;
-                if (message.source !== WI.ConsoleMessage.MessageSource.PrivateClickMeasurement)
-                    return;
-
-                InspectorTest.pass("Should broadcast at least one console message.");
-
-                WI.consoleManager.removeEventListener(WI.ConsoleManager.Event.MessageAdded, listener);
-                resolve();
-            });
-
-            InspectorTest.log("Enabling private click measurement debug mode...");
-            PageAgent.overrideSetting(InspectorBackend.Enum.Page.Setting.PrivateClickMeasurementDebugModeEnabled, true).catch(reject);
-        },
-    });
-
-    suite.runTestCasesAndFinish();
-}
-
-</script>
-</head>
-<body onload="runTest()">
-    <p>Tests for the Page.overrideSetting command.</p>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/TestExpectations      2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations 2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1080,6 +1080,9 @@
</span><span class="cx"> # <rdar://problem/37330377> ASan tests exiting early due to timeouts
</span><span class="cx"> [ Release ] imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys [ Skip ]
</span><span class="cx"> 
</span><ins>+# <rdar://problem/60063002> REGRESSION: (r257758) http/tests/adClickAttribution/conversion-disabled-in-ephemeral-session.html is crashing
+http/tests/adClickAttribution/conversion-disabled-in-ephemeral-session.html [ Pass Crash ]
+
</ins><span class="cx"> # <rdar://problem/60105927> [ Mac wk2 Release ] webgpu/whlsl/make-array-reference.html is flaky failing
</span><span class="cx"> [ Release ] webgpu/whlsl/make-array-reference.html [ Pass Failure ]
</span><span class="cx"> 
</span><span class="lines">@@ -1128,8 +1131,8 @@
</span><span class="cx"> # <rdar://problem/63275213> REGRESSION: http/tests/IndexedDB/storage-limit-1.https.html is a flaky failure
</span><span class="cx"> [ BigSur+ Release ] http/tests/IndexedDB/storage-limit-1.https.html [ Pass Failure ]
</span><span class="cx"> 
</span><del>-# <rdar://problem/63357481> http/tests/privateClickMeasurement/send-attribution-conversion-request.html is a super flaky failure
-[ BigSur+ Debug ] http/tests/privateClickMeasurement/send-attribution-conversion-request.html [ Pass Failure ]
</del><ins>+# <rdar://problem/63357481> http/tests/adClickAttribution/send-attribution-conversion-request.html is a super flaky failure
+[ BigSur+ Debug ] http/tests/adClickAttribution/send-attribution-conversion-request.html [ Pass Failure ]
</ins><span class="cx"> 
</span><span class="cx"> # <rdar://problem/63554249> [20A279] DQ bots are seeing http/tests/cache/disk-cache/disk-cache-validation-back-navigation-policy.html and http/tests/cache/disk-cache/disk-cache-validation-no-body.html are timing out
</span><span class="cx"> webkit.org/b/179796 http/tests/cache/disk-cache/disk-cache-validation-back-navigation-policy.html [ Pass Failure Timeout ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformwk2TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/wk2/TestExpectations (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/TestExpectations  2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/LayoutTests/platform/wk2/TestExpectations     2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -746,7 +746,7 @@
</span><span class="cx"> 
</span><span class="cx"> fast/forms/call-text-did-change-in-text-field-when-typing.html [ Pass ]
</span><span class="cx"> 
</span><del>-http/tests/privateClickMeasurement [ Pass ]
</del><ins>+http/tests/adClickAttribution [ Pass ]
</ins><span class="cx"> 
</span><span class="cx"> # User interaction is a WebKit2 concept.
</span><span class="cx"> inspector/debugger/evaluateOnCallFrame-emulateUserGesture-userIsInteracting.html [ Pass ]
</span><span class="lines">@@ -756,8 +756,8 @@
</span><span class="cx"> # Target domain is only present in WebKit2.
</span><span class="cx"> http/tests/inspector/target [ Pass ]
</span><span class="cx"> 
</span><del>-# ITP and PrivateClickMeasurement are WK2 only.
-inspector/page/overrideSetting-PrivateClickMeasurementDebugModeEnabled.html [ Pass ]
</del><ins>+# ITP and AdClickAttribution are WK2 only.
+inspector/page/overrideSetting-AdClickAttributionDebugModeEnabled.html [ Pass ]
</ins><span class="cx"> inspector/page/overrideSetting-ITPDebugModeEnabled.html [ Pass ]
</span><span class="cx"> 
</span><span class="cx"> # Highlighting marked text ranges from layout tests is only supported in WebKit2.
</span></span></pre></div>
<a id="trunkLayoutTestsplatformwpeTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/wpe/TestExpectations (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wpe/TestExpectations  2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/LayoutTests/platform/wpe/TestExpectations     2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -248,7 +248,7 @@
</span><span class="cx"> webkit.org/b/218689 imported/blink/fast/forms/textarea-placeholder-visibility-3.html [ ImageOnlyFailure ]
</span><span class="cx"> 
</span><span class="cx"> # Link target
</span><del>-webkit.org/b/218553 http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-in-new-window.html [ Timeout ]
</del><ins>+webkit.org/b/218553 http/tests/adClickAttribution/attribution-conversion-through-image-redirect-in-new-window.html [ Timeout ]
</ins><span class="cx"> webkit.org/b/212083 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-with-flag-from-subframe.html
</span><span class="cx"> webkit.org/b/212083 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-with-flag.html
</span><span class="cx"> webkit.org/b/212083 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-without-flag-from-subframe.html
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog    2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/JavaScriptCore/ChangeLog       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2020-11-10  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, reverting r269660.
+        https://bugs.webkit.org/show_bug.cgi?id=218786
+
+        Crashing in EWS iOS simulator bots
+
+        Reverted changeset:
+
+        "PCM: Change from ad-click-attribution to private-click-
+        measurement (in all forms, including .well-known URL)"
+        https://bugs.webkit.org/show_bug.cgi?id=218730
+        https://trac.webkit.org/changeset/269660
+
</ins><span class="cx"> 2020-11-10  Ross Kirsling  <ross.kirsling@sony.com>
</span><span class="cx"> 
</span><span class="cx">         Align %TypedArray% behavior with recent spec adjustments
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorConsoleMessagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/ConsoleMessage.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/ConsoleMessage.cpp 2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/JavaScriptCore/inspector/ConsoleMessage.cpp    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -191,7 +191,7 @@
</span><span class="cx">     case MessageSource::MediaSource: return Protocol::Console::ChannelSource::MediaSource;
</span><span class="cx">     case MessageSource::WebRTC: return Protocol::Console::ChannelSource::WebRTC;
</span><span class="cx">     case MessageSource::ITPDebug: return Protocol::Console::ChannelSource::ITPDebug;
</span><del>-    case MessageSource::PrivateClickMeasurement: return Protocol::Console::ChannelSource::PrivateClickMeasurement;
</del><ins>+    case MessageSource::AdClickAttribution: return Protocol::Console::ChannelSource::AdClickAttribution;
</ins><span class="cx">     case MessageSource::Other: return Protocol::Console::ChannelSource::Other;
</span><span class="cx">     }
</span><span class="cx">     return Protocol::Console::ChannelSource::Other;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorprotocolConsolejson"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/protocol/Console.json (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/protocol/Console.json      2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/JavaScriptCore/inspector/protocol/Console.json 2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx">                 "mediasource",
</span><span class="cx">                 "webrtc",
</span><span class="cx">                 "itp-debug",
</span><del>-                "private-click-measurement",
</del><ins>+                "ad-click-attribution",
</ins><span class="cx">                 "other"
</span><span class="cx">             ],
</span><span class="cx">             "description": "Channels for different types of log messages."
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorprotocolPagejson"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/protocol/Page.json (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/protocol/Page.json 2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/JavaScriptCore/inspector/protocol/Page.json    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -9,7 +9,7 @@
</span><span class="cx">             "type": "string",
</span><span class="cx">             "description": "List of settings able to be overridden by WebInspector.",
</span><span class="cx">             "enum": [
</span><del>-                "PrivateClickMeasurementDebugModeEnabled",
</del><ins>+                "AdClickAttributionDebugModeEnabled",
</ins><span class="cx">                 "AuthorAndUserStylesEnabled",
</span><span class="cx">                 "ICECandidateFilteringEnabled",
</span><span class="cx">                 "ITPDebugModeEnabled",
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeConsoleClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ConsoleClient.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ConsoleClient.cpp    2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/JavaScriptCore/runtime/ConsoleClient.cpp       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -105,8 +105,8 @@
</span><span class="cx">     case MessageSource::ITPDebug:
</span><span class="cx">         sourceString = "ITPDEBUG"_s;
</span><span class="cx">         break;
</span><del>-    case MessageSource::PrivateClickMeasurement:
-        sourceString = "PRIVATECLICKMEASUREMENT"_s;
</del><ins>+    case MessageSource::AdClickAttribution:
+        sourceString = "ADCLICKATTRIBUTION"_s;
</ins><span class="cx">         break;
</span><span class="cx">     case MessageSource::Other:
</span><span class="cx">         sourceString = "OTHER"_s;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeConsoleTypesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ConsoleTypes.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ConsoleTypes.h       2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/JavaScriptCore/runtime/ConsoleTypes.h  2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx">     MediaSource,
</span><span class="cx">     WebRTC,
</span><span class="cx">     ITPDebug,
</span><del>-    PrivateClickMeasurement,
</del><ins>+    AdClickAttribution,
</ins><span class="cx">     Other,
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -94,7 +94,7 @@
</span><span class="cx">         JSC::MessageSource::MediaSource,
</span><span class="cx">         JSC::MessageSource::WebRTC,
</span><span class="cx">         JSC::MessageSource::ITPDebug,
</span><del>-        JSC::MessageSource::PrivateClickMeasurement,
</del><ins>+        JSC::MessageSource::AdClickAttribution,
</ins><span class="cx">         JSC::MessageSource::Other
</span><span class="cx">     >;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog       2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WTF/ChangeLog  2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2020-11-10  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, reverting r269660.
+        https://bugs.webkit.org/show_bug.cgi?id=218786
+
+        Crashing in EWS iOS simulator bots
+
+        Reverted changeset:
+
+        "PCM: Change from ad-click-attribution to private-click-
+        measurement (in all forms, including .well-known URL)"
+        https://bugs.webkit.org/show_bug.cgi?id=218730
+        https://trac.webkit.org/changeset/269660
+
</ins><span class="cx"> 2020-11-10  John Wilander  <wilander@apple.com>
</span><span class="cx"> 
</span><span class="cx">         PCM: Change from ad-click-attribution to private-click-measurement (in all forms, including .well-known URL)
</span></span></pre></div>
<a id="trunkSourceWTFScriptsPreferencesWebPreferencesExperimentalyaml"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml     2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml        2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -37,6 +37,29 @@
</span><span class="cx">     WebKit:
</span><span class="cx">       default: false
</span><span class="cx"> 
</span><ins>+AdClickAttributionDebugModeEnabled:
+  type: bool
+  humanReadableName: "Ad Click Attribution Debug Mode"
+  humanReadableDescription: "Enable Ad Click Attribution Debug Mode"
+  webcoreBinding: RuntimeEnabledFeatures
+  defaultValue:
+    WebKitLegacy:
+      default: false
+    WebKit:
+      default: false
+
+AdClickAttributionEnabled:
+  type: bool
+  humanReadableName: "Ad Click Attribution"
+  humanReadableDescription: "Enable Ad Click Attribution for Cross-Site Link Navigations"
+  defaultValue:
+    WebKitLegacy:
+      default: false
+    WebKit:
+      default: false
+    WebCore:
+      default: false
+
</ins><span class="cx"> AspectRatioEnabled:
</span><span class="cx">   type: bool
</span><span class="cx">   humanReadableName: "CSS Aspect Ratio"
</span><span class="lines">@@ -615,29 +638,6 @@
</span><span class="cx">     WebCore:
</span><span class="cx">       default: false
</span><span class="cx"> 
</span><del>-PrivateClickMeasurementDebugModeEnabled:
-  type: bool
-  humanReadableName: "Private Click Measurement Debug Mode"
-  humanReadableDescription: "Enable Private Click Measurement Debug Mode"
-  webcoreBinding: RuntimeEnabledFeatures
-  defaultValue:
-    WebKitLegacy:
-      default: false
-    WebKit:
-      default: false
-
-PrivateClickMeasurementEnabled:
-  type: bool
-  humanReadableName: "Private Click Measurement"
-  humanReadableDescription: "Enable Private Click Measurement for Cross-Site Link Navigations"
-  defaultValue:
-    WebKitLegacy:
-      default: false
-    WebKit:
-      default: false
-    WebCore:
-      default: false
-
</del><span class="cx"> ProcessSwapOnCrossSiteNavigationEnabled:
</span><span class="cx">   type: bool
</span><span class="cx">   humanReadableName: "Swap Processes on Cross-Site Navigation"
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebCore/ChangeLog      2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2020-11-10  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, reverting r269660.
+        https://bugs.webkit.org/show_bug.cgi?id=218786
+
+        Crashing in EWS iOS simulator bots
+
+        Reverted changeset:
+
+        "PCM: Change from ad-click-attribution to private-click-
+        measurement (in all forms, including .well-known URL)"
+        https://bugs.webkit.org/show_bug.cgi?id=218730
+        https://trac.webkit.org/changeset/269660
+
</ins><span class="cx"> 2020-11-10  Chris Dumez  <cdumez@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Webkit incorrectly setting visibilityState to "prerender" when opening link in new tab
</span></span></pre></div>
<a id="trunkSourceWebCoreHeaderscmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Headers.cmake (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Headers.cmake       2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebCore/Headers.cmake  2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -733,6 +733,7 @@
</span><span class="cx">     layout/integration/LayoutIntegrationRunIteratorModernPath.h
</span><span class="cx">     layout/layouttree/LayoutBox.h
</span><span class="cx"> 
</span><ins>+    loader/AdClickAttribution.h
</ins><span class="cx">     loader/CanvasActivityRecord.h
</span><span class="cx">     loader/ContentFilterClient.h
</span><span class="cx">     loader/CookieJar.h
</span><span class="lines">@@ -765,7 +766,6 @@
</span><span class="cx">     loader/NetscapePlugInStreamLoader.h
</span><span class="cx">     loader/PingLoader.h
</span><span class="cx">     loader/PolicyChecker.h
</span><del>-    loader/PrivateClickMeasurement.h
</del><span class="cx">     loader/ProgressTracker.h
</span><span class="cx">     loader/ProgressTrackerClient.h
</span><span class="cx">     loader/ResourceCryptographicDigest.h
</span></span></pre></div>
<a id="trunkSourceWebCoreSourcestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Sources.txt (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Sources.txt 2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebCore/Sources.txt    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1518,7 +1518,7 @@
</span><span class="cx"> layout/tableformatting/TableFormattingState.cpp
</span><span class="cx"> layout/tableformatting/TableGrid.cpp
</span><span class="cx"> layout/tableformatting/TableLayout.cpp
</span><del>-loader/PrivateClickMeasurement.cpp
</del><ins>+loader/AdClickAttribution.cpp
</ins><span class="cx"> loader/ApplicationManifestLoader.cpp
</span><span class="cx"> loader/CanvasActivityRecord.cpp
</span><span class="cx"> loader/ContentFilter.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj   2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj      2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -2006,7 +2006,7 @@
</span><span class="cx">          69A6CBAD1C6BE42C00B836E9 /* AccessibilitySVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 697101081C6BE1550018C7F1 /* AccessibilitySVGElement.h */; };
</span><span class="cx">          6A22E8701F10418600F546C3 /* InspectorCanvas.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A22E86F1F10418600F546C3 /* InspectorCanvas.h */; };
</span><span class="cx">          6A72798B1F16C29C003F39B8 /* InspectorShaderProgram.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A7279881F16C29B003F39B8 /* InspectorShaderProgram.h */; };
</span><del>-               6B0A07F221FA4B5C00D57391 /* PrivateClickMeasurement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B0A07F021FA4B5C00D57391 /* PrivateClickMeasurement.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><ins>+                6B0A07F221FA4B5C00D57391 /* AdClickAttribution.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B0A07F021FA4B5C00D57391 /* AdClickAttribution.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">           6B1F48112298A37E00DE8B82 /* CrossSiteNavigationDataTransfer.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1F480F22989EC400DE8B82 /* CrossSiteNavigationDataTransfer.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          6B4D412D23983F88002494C2 /* LoggedInStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B4D412B23983F88002494C2 /* LoggedInStatus.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          6B4E8613221B713F0022F389 /* RegistrableDomain.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B4E8612221B713F0022F389 /* RegistrableDomain.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -9528,8 +9528,8 @@
</span><span class="cx">          6A22E8721F1042C400F546C3 /* InspectorCanvas.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorCanvas.cpp; sourceTree = "<group>"; };
</span><span class="cx">          6A7279881F16C29B003F39B8 /* InspectorShaderProgram.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorShaderProgram.h; sourceTree = "<group>"; };
</span><span class="cx">          6A7279891F16C29B003F39B8 /* InspectorShaderProgram.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorShaderProgram.cpp; sourceTree = "<group>"; };
</span><del>-               6B0A07F021FA4B5C00D57391 /* PrivateClickMeasurement.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrivateClickMeasurement.h; sourceTree = "<group>"; };
-               6B0A07F121FA4B5C00D57391 /* PrivateClickMeasurement.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PrivateClickMeasurement.cpp; sourceTree = "<group>"; };
</del><ins>+                6B0A07F021FA4B5C00D57391 /* AdClickAttribution.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AdClickAttribution.h; sourceTree = "<group>"; };
+               6B0A07F121FA4B5C00D57391 /* AdClickAttribution.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AdClickAttribution.cpp; sourceTree = "<group>"; };
</ins><span class="cx">           6B1F480F22989EC400DE8B82 /* CrossSiteNavigationDataTransfer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CrossSiteNavigationDataTransfer.h; sourceTree = "<group>"; };
</span><span class="cx">          6B4D412B23983F88002494C2 /* LoggedInStatus.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoggedInStatus.h; sourceTree = "<group>"; };
</span><span class="cx">          6B4D412C23983F88002494C2 /* LoggedInStatus.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LoggedInStatus.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -26997,6 +26997,8 @@
</span><span class="cx">                          5126E6B60A2E3AEF005C29FA /* icon */,
</span><span class="cx">                          A15E31F01E0CB075004B371C /* ios */,
</span><span class="cx">                          93A1EAA20A5634D8006960A0 /* mac */,
</span><ins>+                               6B0A07F121FA4B5C00D57391 /* AdClickAttribution.cpp */,
+                               6B0A07F021FA4B5C00D57391 /* AdClickAttribution.h */,
</ins><span class="cx">                           63152D181F9531EE007A5E4B /* ApplicationManifestLoader.cpp */,
</span><span class="cx">                          63152D171F9531EE007A5E4B /* ApplicationManifestLoader.h */,
</span><span class="cx">                          EFB7287B2124C73D005C2558 /* CanvasActivityRecord.cpp */,
</span><span class="lines">@@ -27075,8 +27077,6 @@
</span><span class="cx">                          D0FF2A5C11F8C45A007E74E0 /* PingLoader.h */,
</span><span class="cx">                          97059975107D975200A50A7C /* PolicyChecker.cpp */,
</span><span class="cx">                          97059976107D975200A50A7C /* PolicyChecker.h */,
</span><del>-                               6B0A07F121FA4B5C00D57391 /* PrivateClickMeasurement.cpp */,
-                               6B0A07F021FA4B5C00D57391 /* PrivateClickMeasurement.h */,
</del><span class="cx">                           1A2A68210B5BEDE70002A480 /* ProgressTracker.cpp */,
</span><span class="cx">                          1A2A68220B5BEDE70002A480 /* ProgressTracker.h */,
</span><span class="cx">                          1ACADD781880D91C00D8B71D /* ProgressTrackerClient.h */,
</span><span class="lines">@@ -30721,6 +30721,7 @@
</span><span class="cx">                          E1C4DE690EA75C1E0023CCD6 /* ActiveDOMObject.h in Headers */,
</span><span class="cx">                          724EE5501DC80D7F00A91FFB /* ActivityState.h in Headers */,
</span><span class="cx">                          724EE5511DC80D8400A91FFB /* ActivityStateChangeObserver.h in Headers */,
</span><ins>+                               6B0A07F221FA4B5C00D57391 /* AdClickAttribution.h in Headers */,
</ins><span class="cx">                           A1677E0E213E02A000A08C34 /* AddressErrors.h in Headers */,
</span><span class="cx">                          BCF7E491137CD7C7001DDAE7 /* AdjustViewSizeOrNot.h in Headers */,
</span><span class="cx">                          84D0C4061115F1EA0018AA34 /* AffineTransform.h in Headers */,
</span><span class="lines">@@ -33729,7 +33730,6 @@
</span><span class="cx">                          A1ADAF7E2360FD3E009CB776 /* PreviewConverterProvider.h in Headers */,
</span><span class="cx">                          E4605FEC2166480900E53046 /* PrewarmInformation.h in Headers */,
</span><span class="cx">                          B71FE6DF11091CB300DAEF77 /* PrintContext.h in Headers */,
</span><del>-                               6B0A07F221FA4B5C00D57391 /* PrivateClickMeasurement.h in Headers */,
</del><span class="cx">                           51F645D51FECDBCE00B54DED /* ProcessIdentifier.h in Headers */,
</span><span class="cx">                          A8EA7EBC0A1945D000A8EF5F /* ProcessingInstruction.h in Headers */,
</span><span class="cx">                          E42050172141901B0066EF3B /* ProcessWarming.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAnchorElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAnchorElement.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAnchorElement.cpp  2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebCore/html/HTMLAnchorElement.cpp     2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -24,6 +24,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "HTMLAnchorElement.h"
</span><span class="cx"> 
</span><ins>+#include "AdClickAttribution.h"
</ins><span class="cx"> #include "Chrome.h"
</span><span class="cx"> #include "ChromeClient.h"
</span><span class="cx"> #include "DOMTokenList.h"
</span><span class="lines">@@ -43,7 +44,6 @@
</span><span class="cx"> #include "MouseEvent.h"
</span><span class="cx"> #include "PingLoader.h"
</span><span class="cx"> #include "PlatformMouseEvent.h"
</span><del>-#include "PrivateClickMeasurement.h"
</del><span class="cx"> #include "RegistrableDomain.h"
</span><span class="cx"> #include "RenderImage.h"
</span><span class="cx"> #include "ResourceRequest.h"
</span><span class="lines">@@ -404,15 +404,15 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-Optional<PrivateClickMeasurement> HTMLAnchorElement::parsePrivateClickMeasurement() const
</del><ins>+Optional<AdClickAttribution> HTMLAnchorElement::parseAdClickAttribution() const
</ins><span class="cx"> {
</span><del>-    using Campaign = PrivateClickMeasurement::Campaign;
-    using Source = PrivateClickMeasurement::Source;
-    using Destination = PrivateClickMeasurement::Destination;
</del><ins>+    using Campaign = AdClickAttribution::Campaign;
+    using Source = AdClickAttribution::Source;
+    using Destination = AdClickAttribution::Destination;
</ins><span class="cx"> 
</span><span class="cx">     auto* page = document().page();
</span><span class="cx">     if (!page || page->sessionID().isEphemeral()
</span><del>-        || !document().settings().privateClickMeasurementEnabled()
</del><ins>+        || !document().settings().adClickAttributionEnabled()
</ins><span class="cx">         || !UserGestureIndicator::processingUserGesture())
</span><span class="cx">         return WTF::nullopt;
</span><span class="cx"> 
</span><span class="lines">@@ -423,24 +423,24 @@
</span><span class="cx">     auto adDestinationAttr = attributeWithoutSynchronization(addestinationAttr);
</span><span class="cx">     
</span><span class="cx">     if (adCampaignIDAttr.isEmpty() || adDestinationAttr.isEmpty()) {
</span><del>-        document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, "Both adcampaignid and addestination need to be set for Private Click Measurement to work."_s);
</del><ins>+        document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, "Both adcampaignid and addestination need to be set for Ad Click Attribution to work."_s);
</ins><span class="cx">         return WTF::nullopt;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     RefPtr<Frame> frame = document().frame();
</span><span class="cx">     if (!frame || !frame->isMainFrame()) {
</span><del>-        document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, "Private Click Measurement is only supported in the main frame."_s);
</del><ins>+        document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, "Ad Click Attribution is only supported in the main frame."_s);
</ins><span class="cx">         return WTF::nullopt;
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     auto adCampaignID = parseHTMLNonNegativeInteger(adCampaignIDAttr);
</span><span class="cx">     if (!adCampaignID) {
</span><del>-        document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, "adcampaignid can not be converted to a non-negative integer which is required for Private Click Measurement."_s);
</del><ins>+        document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, "adcampaignid can not be converted to a non-negative integer which is required for Ad Click Attribution."_s);
</ins><span class="cx">         return WTF::nullopt;
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    if (adCampaignID.value() > PrivateClickMeasurement::MaxEntropy) {
-        document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, makeString("adcampaignid must have a non-negative value less than or equal to ", PrivateClickMeasurement::MaxEntropy, " for Private Click Measurement."));
</del><ins>+    if (adCampaignID.value() > AdClickAttribution::MaxEntropy) {
+        document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, makeString("adcampaignid must have a non-negative value less than or equal to ", AdClickAttribution::MaxEntropy, " for Ad Click Attribution."));
</ins><span class="cx">         return WTF::nullopt;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -456,7 +456,7 @@
</span><span class="cx">         return WTF::nullopt;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return PrivateClickMeasurement { Campaign(adCampaignID.value()), Source(documentRegistrableDomain), Destination(adDestinationURL) };
</del><ins>+    return AdClickAttribution { Campaign(adCampaignID.value()), Source(documentRegistrableDomain), Destination(adDestinationURL) };
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void HTMLAnchorElement::handleClick(Event& event)
</span><span class="lines">@@ -518,12 +518,12 @@
</span><span class="cx">     else if (hasRel(Relation::NoOpener) || (document().settings().blankAnchorTargetImpliesNoOpenerEnabled() && equalIgnoringASCIICase(effectiveTarget, "_blank")))
</span><span class="cx">         newFrameOpenerPolicy = NewFrameOpenerPolicy::Suppress;
</span><span class="cx"> 
</span><del>-    auto privateClickMeasurement = parsePrivateClickMeasurement();
-    // A matching conversion event needs to happen before the complete private click measurement
-    // URL can be created. Thus, it should be empty for now.
-    ASSERT(!privateClickMeasurement || privateClickMeasurement->reportURL().isNull());
</del><ins>+    auto adClickAttribution = parseAdClickAttribution();
+    // A matching conversion event needs to happen before the complete ad click attributionURL can be
+    // created. Thus, it should be empty for now.
+    ASSERT(!adClickAttribution || adClickAttribution->reportURL().isNull());
</ins><span class="cx">     
</span><del>-    frame->loader().changeLocation(completedURL, effectiveTarget, &event, LockHistory::No, LockBackForwardList::No, referrerPolicy, document().shouldOpenExternalURLsPolicyToPropagate(), newFrameOpenerPolicy, downloadAttribute, systemPreviewInfo, WTFMove(privateClickMeasurement));
</del><ins>+    frame->loader().changeLocation(completedURL, effectiveTarget, &event, LockHistory::No, LockBackForwardList::No, referrerPolicy, document().shouldOpenExternalURLsPolicyToPropagate(), newFrameOpenerPolicy, downloadAttribute, systemPreviewInfo, WTFMove(adClickAttribution));
</ins><span class="cx"> 
</span><span class="cx">     sendPings(completedURL);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAnchorElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAnchorElement.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAnchorElement.h    2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebCore/html/HTMLAnchorElement.h       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class PrivateClickMeasurement;
</del><ins>+class AdClickAttribution;
</ins><span class="cx"> class DOMTokenList;
</span><span class="cx"> 
</span><span class="cx"> // Link relation bitmask values.
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx"> 
</span><span class="cx">     void sendPings(const URL& destinationURL);
</span><span class="cx"> 
</span><del>-    Optional<PrivateClickMeasurement> parsePrivateClickMeasurement() const;
</del><ins>+    Optional<AdClickAttribution> parseAdClickAttribution() const;
</ins><span class="cx"> 
</span><span class="cx">     void handleClick(Event&);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAnchorElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAnchorElement.idl (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAnchorElement.idl  2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebCore/html/HTMLAnchorElement.idl     2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -21,8 +21,8 @@
</span><span class="cx"> [
</span><span class="cx">     Exposed=Window
</span><span class="cx"> ] interface HTMLAnchorElement : HTMLElement {
</span><del>-    [CEReactions=NotNeeded, EnabledBySetting=PrivateClickMeasurement, Reflect] attribute DOMString adcampaignid;
-    [CEReactions=NotNeeded, EnabledBySetting=PrivateClickMeasurement, Reflect] attribute DOMString addestination;
</del><ins>+    [CEReactions=NotNeeded, EnabledBySetting=AdClickAttribution, Reflect] attribute DOMString adcampaignid;
+    [CEReactions=NotNeeded, EnabledBySetting=AdClickAttribution, Reflect] attribute DOMString addestination;
</ins><span class="cx">     [CEReactions=NotNeeded, Reflect] attribute DOMString charset;
</span><span class="cx">     [CEReactions=NotNeeded, Reflect] attribute DOMString coords;
</span><span class="cx">     [CEReactions=NotNeeded, Conditional=DOWNLOAD_ATTRIBUTE, EnabledBySetting=DownloadAttribute, Reflect] attribute DOMString download;
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorClient.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorClient.h 2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebCore/inspector/InspectorClient.h    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx">     virtual void timelineRecordingChanged(bool) { }
</span><span class="cx"> 
</span><span class="cx">     enum class DeveloperPreference {
</span><del>-        PrivateClickMeasurementDebugModeEnabled,
</del><ins>+        AdClickAttributionDebugModeEnabled,
</ins><span class="cx">         ITPDebugModeEnabled,
</span><span class="cx">         MockCaptureDevicesEnabled,
</span><span class="cx">     };
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx"> template<> struct EnumTraits<WebCore::InspectorClient::DeveloperPreference> {
</span><span class="cx">     using values = EnumValues<
</span><span class="cx">         WebCore::InspectorClient::DeveloperPreference,
</span><del>-        WebCore::InspectorClient::DeveloperPreference::PrivateClickMeasurementDebugModeEnabled,
</del><ins>+        WebCore::InspectorClient::DeveloperPreference::AdClickAttributionDebugModeEnabled,
</ins><span class="cx">         WebCore::InspectorClient::DeveloperPreference::ITPDebugModeEnabled,
</span><span class="cx">         WebCore::InspectorClient::DeveloperPreference::MockCaptureDevicesEnabled
</span><span class="cx">     >;
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectoragentsInspectorPageAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/agents/InspectorPageAgent.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/agents/InspectorPageAgent.cpp     2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebCore/inspector/agents/InspectorPageAgent.cpp        2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -382,7 +382,7 @@
</span><span class="cx">     inspectedPageSettings.setWebRTCEncryptionEnabledInspectorOverride(WTF::nullopt);
</span><span class="cx">     inspectedPageSettings.setWebSecurityEnabledInspectorOverride(WTF::nullopt);
</span><span class="cx"> 
</span><del>-    m_client->setDeveloperPreferenceOverride(InspectorClient::DeveloperPreference::PrivateClickMeasurementDebugModeEnabled, WTF::nullopt);
</del><ins>+    m_client->setDeveloperPreferenceOverride(InspectorClient::DeveloperPreference::AdClickAttributionDebugModeEnabled, WTF::nullopt);
</ins><span class="cx">     m_client->setDeveloperPreferenceOverride(InspectorClient::DeveloperPreference::ITPDebugModeEnabled, WTF::nullopt);
</span><span class="cx">     m_client->setDeveloperPreferenceOverride(InspectorClient::DeveloperPreference::MockCaptureDevicesEnabled, WTF::nullopt);
</span><span class="cx"> 
</span><span class="lines">@@ -431,8 +431,8 @@
</span><span class="cx">     auto& inspectedPageSettings = m_inspectedPage.settings();
</span><span class="cx"> 
</span><span class="cx">     switch (setting) {
</span><del>-    case Protocol::Page::Setting::PrivateClickMeasurementDebugModeEnabled:
-        m_client->setDeveloperPreferenceOverride(InspectorClient::DeveloperPreference::PrivateClickMeasurementDebugModeEnabled, value);
</del><ins>+    case Protocol::Page::Setting::AdClickAttributionDebugModeEnabled:
+        m_client->setDeveloperPreferenceOverride(InspectorClient::DeveloperPreference::AdClickAttributionDebugModeEnabled, value);
</ins><span class="cx">         return { };
</span><span class="cx"> 
</span><span class="cx">     case Protocol::Page::Setting::AuthorAndUserStylesEnabled:
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectoragentspagePageConsoleAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/agents/page/PageConsoleAgent.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/agents/page/PageConsoleAgent.cpp  2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebCore/inspector/agents/page/PageConsoleAgent.cpp     2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx">     addLogChannel(Protocol::Console::ChannelSource::MediaSource);
</span><span class="cx">     addLogChannel(Protocol::Console::ChannelSource::WebRTC);
</span><span class="cx">     addLogChannel(Protocol::Console::ChannelSource::ITPDebug);
</span><del>-    addLogChannel(Protocol::Console::ChannelSource::PrivateClickMeasurement);
</del><ins>+    addLogChannel(Protocol::Console::ChannelSource::AdClickAttribution);
</ins><span class="cx">     addLogChannel(Protocol::Console::ChannelSource::Other);
</span><span class="cx"> 
</span><span class="cx">     return channels;
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderAdClickAttributioncppfromrev269670trunkSourceWebCoreloaderPrivateClickMeasurementcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/loader/AdClickAttribution.cpp (from rev 269670, trunk/Source/WebCore/loader/PrivateClickMeasurement.cpp) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/AdClickAttribution.cpp                               (rev 0)
+++ trunk/Source/WebCore/loader/AdClickAttribution.cpp  2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,229 @@
</span><ins>+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "AdClickAttribution.h"
+
+#include "Logging.h"
+#include "RuntimeEnabledFeatures.h"
+#include <wtf/Expected.h>
+#include <wtf/RandomNumber.h>
+#include <wtf/URL.h>
+#include <wtf/text/StringBuilder.h>
+#include <wtf/text/StringView.h>
+
+namespace WebCore {
+
+static const char adClickAttributionPathPrefix[] = "/.well-known/ad-click-attribution/";
+const size_t adClickConversionDataPathSegmentSize = 2;
+const size_t adClickPriorityPathSegmentSize = 2;
+const Seconds maxAge { 24_h * 7 };
+
+bool AdClickAttribution::isValid() const
+{
+    return m_conversion
+        && m_conversion.value().isValid()
+        && m_campaign.isValid()
+        && !m_source.registrableDomain.isEmpty()
+        && !m_destination.registrableDomain.isEmpty()
+        && m_earliestTimeToSend;
+}
+
+Expected<AdClickAttribution::Conversion, String> AdClickAttribution::parseConversionRequest(const URL& redirectURL)
+{
+    if (!redirectURL.protocolIs("https") || redirectURL.hasCredentials() || redirectURL.hasQuery() || redirectURL.hasFragmentIdentifier()) {
+        if (UNLIKELY(debugModeEnabled())) {
+            RELEASE_LOG_INFO(AdClickAttribution, "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.");
+            return makeUnexpected("[Ad Click Attribution] 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);
+        }
+        return makeUnexpected(nullString());
+    }
+
+    auto path = StringView(redirectURL.string()).substring(redirectURL.pathStart(), redirectURL.pathEnd() - redirectURL.pathStart());
+    if (path.isEmpty() || !path.startsWith(adClickAttributionPathPrefix)) {
+        if (UNLIKELY(debugModeEnabled())) {
+            RELEASE_LOG_INFO(AdClickAttribution, "Conversion was not accepted because the URL path did not start with %" PUBLIC_LOG_STRING ".", adClickAttributionPathPrefix);
+            return makeUnexpected(makeString("[Ad Click Attribution] Conversion was not accepted because the URL path did not start with "_s, adClickAttributionPathPrefix, "."_s));
+        }
+        return makeUnexpected(nullString());
+    }
+
+    auto prefixLength = sizeof(adClickAttributionPathPrefix) - 1;
+    if (path.length() == prefixLength + adClickConversionDataPathSegmentSize) {
+        auto conversionDataUInt64 = path.substring(prefixLength, adClickConversionDataPathSegmentSize).toUInt64Strict();
+        if (!conversionDataUInt64 || *conversionDataUInt64 > MaxEntropy) {
+            if (UNLIKELY(debugModeEnabled())) {
+                RELEASE_LOG_INFO(AdClickAttribution, "Conversion was not accepted because the conversion data could not be parsed or was higher than the allowed maximum of %{public}u.", MaxEntropy);
+                return makeUnexpected(makeString("[Ad Click Attribution] Conversion was not accepted because the conversion data could not be parsed or was higher than the allowed maximum of "_s, MaxEntropy, "."_s));
+            }
+            return makeUnexpected(nullString());
+        }
+
+        return Conversion { static_cast<uint32_t>(*conversionDataUInt64), Priority { 0 } };
+    }
+    
+    if (path.length() == prefixLength + adClickConversionDataPathSegmentSize + 1 + adClickPriorityPathSegmentSize) {
+        auto conversionDataUInt64 = path.substring(prefixLength, adClickConversionDataPathSegmentSize).toUInt64Strict();
+        if (!conversionDataUInt64 || *conversionDataUInt64 > MaxEntropy) {
+            if (UNLIKELY(debugModeEnabled())) {
+                RELEASE_LOG_INFO(AdClickAttribution, "Conversion was not accepted because the conversion data could not be parsed or was higher than the allowed maximum of %{public}u.", MaxEntropy);
+                return makeUnexpected(makeString("[Ad Click Attribution] Conversion was not accepted because the conversion data could not be parsed or was higher than the allowed maximum of "_s, MaxEntropy, "."_s));
+            }
+            return makeUnexpected(nullString());
+        }
+
+        auto conversionPriorityUInt64 = path.substring(prefixLength + adClickConversionDataPathSegmentSize + 1, adClickPriorityPathSegmentSize).toUInt64Strict();
+        if (!conversionPriorityUInt64 || *conversionPriorityUInt64 > MaxEntropy) {
+            if (UNLIKELY(debugModeEnabled())) {
+                RELEASE_LOG_INFO(AdClickAttribution, "Conversion was not accepted because the priority could not be parsed or was higher than the allowed maximum of %{public}u.", MaxEntropy);
+                return makeUnexpected(makeString("[Ad Click Attribution] Conversion was not accepted because the priority could not be parsed or was higher than the allowed maximum of "_s, MaxEntropy, "."_s));
+            }
+            return makeUnexpected(nullString());
+        }
+
+        return Conversion { static_cast<uint32_t>(*conversionDataUInt64), Priority { static_cast<uint32_t>(*conversionPriorityUInt64) } };
+    }
+
+    if (UNLIKELY(debugModeEnabled())) {
+        RELEASE_LOG_INFO(AdClickAttribution, "Conversion was not accepted because the URL path contained unrecognized parts.");
+        return makeUnexpected("[Ad Click Attribution] Conversion was not accepted because the URL path contained unrecognized parts."_s);
+    }
+    return makeUnexpected(nullString());
+}
+
+Optional<Seconds> AdClickAttribution::convertAndGetEarliestTimeToSend(Conversion&& conversion)
+{
+    if (!conversion.isValid() || (m_conversion && m_conversion->priority >= conversion.priority))
+        return { };
+
+    m_conversion = WTFMove(conversion);
+    // 24-48 hour delay before sending. This helps privacy since the conversion and the attribution
+    // requests are detached and the time of the attribution does not reveal the time of the conversion.
+    auto seconds = 24_h + Seconds(randomNumber() * (24_h).value());
+    m_earliestTimeToSend = WallTime::now() + seconds;
+    return seconds;
+}
+
+void AdClickAttribution::markAsExpired()
+{
+    m_timeOfAdClick = { };
+}
+
+bool AdClickAttribution::hasExpired() const
+{
+    return WallTime::now() > m_timeOfAdClick + maxAge;
+}
+
+bool AdClickAttribution::hasHigherPriorityThan(const AdClickAttribution& other) const
+{
+    if (!other.m_conversion)
+        return true;
+    
+    if (!m_conversion)
+        return false;
+
+    return m_conversion->priority > other.m_conversion->priority;
+}
+
+URL AdClickAttribution::reportURL() const
+{
+    if (!isValid())
+        return URL();
+
+    StringBuilder builder;
+    builder.appendLiteral("https://");
+    builder.append(m_source.registrableDomain.string());
+    builder.appendLiteral(adClickAttributionPathPrefix);
+
+    URL url { URL(), builder.toString() };
+    if (url.isValid())
+        return url;
+
+    return URL();
+}
+
+Ref<JSON::Object> AdClickAttribution::json() const
+{
+    auto reportDetails = JSON::Object::create();
+    if (!m_conversion)
+        return reportDetails;
+
+    reportDetails->setString("content-type"_s, "click"_s);
+    reportDetails->setString("content-site"_s, m_source.registrableDomain.string());
+    reportDetails->setInteger("content-id"_s, m_campaign.id);
+    reportDetails->setString("conversion-site"_s, m_destination.registrableDomain.string());
+    reportDetails->setInteger("conversion-data"_s, m_conversion->data);
+    reportDetails->setInteger("report-version"_s, 1);
+    return reportDetails;
+}
+
+void AdClickAttribution::markConversionAsSent()
+{
+    ASSERT(m_conversion);
+    if (m_conversion)
+        m_conversion->wasSent = Conversion::WasSent::Yes;
+}
+
+bool AdClickAttribution::wasConversionSent() const
+{
+    return m_conversion && m_conversion->wasSent == Conversion::WasSent::Yes;
+}
+
+String AdClickAttribution::toString() const
+{
+    StringBuilder builder;
+    builder.appendLiteral("Source: ");
+    builder.append(m_source.registrableDomain.string());
+    builder.appendLiteral("\nDestination: ");
+    builder.append(m_destination.registrableDomain.string());
+    builder.appendLiteral("\nCampaign ID: ");
+    builder.appendNumber(m_campaign.id);
+    if (m_conversion) {
+        builder.appendLiteral("\nConversion data: ");
+        builder.appendNumber(m_conversion.value().data);
+        builder.appendLiteral("\nConversion priority: ");
+        builder.appendNumber(m_conversion.value().priority);
+        builder.appendLiteral("\nConversion earliest time to send: ");
+        if (!m_earliestTimeToSend)
+            builder.appendLiteral("Not set");
+        else {
+            auto secondsUntilSend = *m_earliestTimeToSend - WallTime::now();
+            builder.append((secondsUntilSend >= 24_h && secondsUntilSend <= 48_h) ? "Within 24-48 hours" : "Outside 24-48 hours");
+        }
+        builder.appendLiteral("\nConversion request sent: ");
+        builder.append((wasConversionSent() ? "true" : "false"));
+    } else
+        builder.appendLiteral("\nNo conversion data.");
+    builder.append('\n');
+
+    return builder.toString();
+}
+
+bool AdClickAttribution::debugModeEnabled()
+{
+    return RuntimeEnabledFeatures::sharedFeatures().adClickAttributionDebugModeEnabled();
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreloaderAdClickAttributionhfromrev269670trunkSourceWebCoreloaderPrivateClickMeasurementh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/loader/AdClickAttribution.h (from rev 269670, trunk/Source/WebCore/loader/PrivateClickMeasurement.h) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/AdClickAttribution.h                         (rev 0)
+++ trunk/Source/WebCore/loader/AdClickAttribution.h    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,368 @@
</span><ins>+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "RegistrableDomain.h"
+#include <wtf/CompletionHandler.h>
+#include <wtf/Forward.h>
+#include <wtf/JSONValues.h>
+#include <wtf/Optional.h>
+#include <wtf/URL.h>
+#include <wtf/WallTime.h>
+#include <wtf/text/StringHash.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class AdClickAttribution {
+public:
+    using CampaignId = uint32_t;
+    using ConversionData = uint32_t;
+    using PriorityValue = uint32_t;
+
+    static constexpr uint32_t MaxEntropy = 63;
+
+    struct Campaign {
+        Campaign() = default;
+        explicit Campaign(CampaignId id)
+            : id { id }
+        {
+        }
+        
+        bool isValid() const
+        {
+            return id <= MaxEntropy;
+        }
+        
+        CampaignId id { 0 };
+    };
+
+    struct Source {
+        Source() = default;
+        explicit Source(const URL& url)
+            : registrableDomain { url }
+        {
+        }
+
+        explicit Source(const RegistrableDomain& domain)
+            : registrableDomain { domain }
+        {
+        }
+
+        explicit Source(WTF::HashTableDeletedValueType)
+            : registrableDomain(WTF::HashTableDeletedValue)
+        {
+        }
+
+        bool operator==(const Source& other) const
+        {
+            return registrableDomain == other.registrableDomain;
+        }
+
+        bool matches(const URL& url) const
+        {
+            return registrableDomain.matches(url);
+        }
+
+        bool isHashTableDeletedValue() const
+        {
+            return registrableDomain.isHashTableDeletedValue();
+        }
+
+        static Source deletedValue()
+        {
+            return Source { WTF::HashTableDeletedValue };
+        }
+
+        static void constructDeletedValue(Source& source)
+        {
+            new (&source) Source;
+            source = Source::deletedValue();
+        }
+
+        void deleteValue()
+        {
+            registrableDomain = RegistrableDomain { WTF::HashTableDeletedValue };
+        }
+
+        bool isDeletedValue() const
+        {
+            return isHashTableDeletedValue();
+        }
+
+        RegistrableDomain registrableDomain;
+    };
+
+    struct SourceHash {
+        static unsigned hash(const Source& source)
+        {
+            return source.registrableDomain.hash();
+        }
+        
+        static bool equal(const Source& a, const Source& b)
+        {
+            return a == b;
+        }
+
+        static const bool safeToCompareToEmptyOrDeleted = false;
+    };
+
+    struct Destination {
+        Destination() = default;
+        explicit Destination(const URL& url)
+            : registrableDomain { RegistrableDomain { url } }
+        {
+        }
+
+        explicit Destination(WTF::HashTableDeletedValueType)
+            : registrableDomain { WTF::HashTableDeletedValue }
+        {
+        }
+
+        explicit Destination(RegistrableDomain&& domain)
+            : registrableDomain { WTFMove(domain) }
+        {
+        }
+        
+        bool operator==(const Destination& other) const
+        {
+            return registrableDomain == other.registrableDomain;
+        }
+
+        bool matches(const URL& url) const
+        {
+            return registrableDomain == RegistrableDomain { url };
+        }
+        
+        bool isHashTableDeletedValue() const
+        {
+            return registrableDomain.isHashTableDeletedValue();
+        }
+
+        static Destination deletedValue()
+        {
+            return Destination { WTF::HashTableDeletedValue };
+        }
+
+        static void constructDeletedValue(Destination& destination)
+        {
+            new (&destination) Destination;
+            destination = Destination::deletedValue();
+        }
+
+        void deleteValue()
+        {
+            registrableDomain = RegistrableDomain { WTF::HashTableDeletedValue };
+        }
+
+        bool isDeletedValue() const
+        {
+            return isHashTableDeletedValue();
+        }
+
+        RegistrableDomain registrableDomain;
+    };
+
+    struct DestinationHash {
+        static unsigned hash(const Destination& destination)
+        {
+            return destination.registrableDomain.hash();
+        }
+        
+        static bool equal(const Destination& a, const Destination& b)
+        {
+            return a == b;
+        }
+
+        static const bool safeToCompareToEmptyOrDeleted = false;
+    };
+
+    struct Priority {
+        explicit Priority(PriorityValue value)
+        : value { value }
+        {
+        }
+        
+        PriorityValue value;
+    };
+    
+    struct Conversion {
+        enum class WasSent : bool { No, Yes };
+        
+        Conversion(ConversionData data, Priority priority, WasSent wasSent = WasSent::No)
+            : data { data }
+            , priority { priority.value }
+            , wasSent { wasSent }
+        {
+        }
+
+        bool isValid() const
+        {
+            return data <= MaxEntropy && priority <= MaxEntropy;
+        }
+        
+        ConversionData data;
+        PriorityValue priority;
+        WasSent wasSent = WasSent::No;
+
+        template<class Encoder> void encode(Encoder&) const;
+        template<class Decoder> static Optional<Conversion> decode(Decoder&);
+    };
+
+    AdClickAttribution() = default;
+    AdClickAttribution(Campaign campaign, const Source& source, const Destination& destination)
+        : m_campaign { campaign }
+        , m_source { source }
+        , m_destination { destination }
+        , m_timeOfAdClick { WallTime::now() }
+    {
+    }
+
+    WEBCORE_EXPORT static Expected<Conversion, String> parseConversionRequest(const URL& redirectURL);
+    WEBCORE_EXPORT Optional<Seconds> convertAndGetEarliestTimeToSend(Conversion&&);
+    WEBCORE_EXPORT bool hasHigherPriorityThan(const AdClickAttribution&) const;
+    WEBCORE_EXPORT URL reportURL() const;
+    WEBCORE_EXPORT Ref<JSON::Object> json() const;
+    const Source& source() const { return m_source; };
+    const Destination& destination() const { return m_destination; };
+    Optional<WallTime> earliestTimeToSend() const { return m_earliestTimeToSend; };
+    WEBCORE_EXPORT void markAsExpired();
+    WEBCORE_EXPORT bool hasExpired() const;
+    WEBCORE_EXPORT void markConversionAsSent();
+    WEBCORE_EXPORT bool wasConversionSent() const;
+
+    bool isEmpty() const { return m_source.registrableDomain.isEmpty(); };
+
+    WEBCORE_EXPORT String toString() const;
+
+    template<class Encoder> void encode(Encoder&) const;
+    template<class Decoder> static Optional<AdClickAttribution> decode(Decoder&);
+
+private:
+    bool isValid() const;
+    static bool debugModeEnabled();
+
+    Campaign m_campaign;
+    Source m_source;
+    Destination m_destination;
+    WallTime m_timeOfAdClick;
+
+    Optional<Conversion> m_conversion;
+    Optional<WallTime> m_earliestTimeToSend;
+};
+
+template<class Encoder>
+void AdClickAttribution::encode(Encoder& encoder) const
+{
+    encoder << m_campaign.id << m_source.registrableDomain << m_destination.registrableDomain << m_timeOfAdClick << m_conversion << m_earliestTimeToSend;
+}
+
+template<class Decoder>
+Optional<AdClickAttribution> AdClickAttribution::decode(Decoder& decoder)
+{
+    Optional<CampaignId> campaignId;
+    decoder >> campaignId;
+    if (!campaignId)
+        return WTF::nullopt;
+    
+    Optional<RegistrableDomain> sourceRegistrableDomain;
+    decoder >> sourceRegistrableDomain;
+    if (!sourceRegistrableDomain)
+        return WTF::nullopt;
+    
+    Optional<RegistrableDomain> destinationRegistrableDomain;
+    decoder >> destinationRegistrableDomain;
+    if (!destinationRegistrableDomain)
+        return WTF::nullopt;
+    
+    Optional<WallTime> timeOfAdClick;
+    decoder >> timeOfAdClick;
+    if (!timeOfAdClick)
+        return WTF::nullopt;
+    
+    Optional<Optional<Conversion>> conversion;
+    decoder >> conversion;
+    if (!conversion)
+        return WTF::nullopt;
+    
+    Optional<Optional<WallTime>> earliestTimeToSend;
+    decoder >> earliestTimeToSend;
+    if (!earliestTimeToSend)
+        return WTF::nullopt;
+    
+    AdClickAttribution attribution { Campaign { WTFMove(*campaignId) }, Source { WTFMove(*sourceRegistrableDomain) }, Destination { WTFMove(*destinationRegistrableDomain) } };
+    attribution.m_conversion = WTFMove(*conversion);
+    attribution.m_earliestTimeToSend = WTFMove(*earliestTimeToSend);
+    
+    return attribution;
+}
+
+template<class Encoder>
+void AdClickAttribution::Conversion::encode(Encoder& encoder) const
+{
+    encoder << data << priority << wasSent;
+}
+
+template<class Decoder>
+Optional<AdClickAttribution::Conversion> AdClickAttribution::Conversion::decode(Decoder& decoder)
+{
+    Optional<ConversionData> data;
+    decoder >> data;
+    if (!data)
+        return WTF::nullopt;
+    
+    Optional<PriorityValue> priority;
+    decoder >> priority;
+    if (!priority)
+        return WTF::nullopt;
+    
+    Optional<WasSent> wasSent;
+    decoder >> wasSent;
+    if (!wasSent)
+        return WTF::nullopt;
+    
+    return Conversion { WTFMove(*data), Priority { *priority }, *wasSent };
+}
+
+} // namespace WebCore
+
+namespace WTF {
+template<typename T> struct DefaultHash;
+
+template<> struct DefaultHash<WebCore::AdClickAttribution::Source> : WebCore::AdClickAttribution::SourceHash { };
+template<> struct HashTraits<WebCore::AdClickAttribution::Source> : GenericHashTraits<WebCore::AdClickAttribution::Source> {
+    static WebCore::AdClickAttribution::Source emptyValue() { return { }; }
+    static void constructDeletedValue(WebCore::AdClickAttribution::Source& slot) { WebCore::AdClickAttribution::Source::constructDeletedValue(slot); }
+    static bool isDeletedValue(const WebCore::AdClickAttribution::Source& slot) { return slot.isDeletedValue(); }
+};
+
+template<> struct DefaultHash<WebCore::AdClickAttribution::Destination> : WebCore::AdClickAttribution::DestinationHash { };
+template<> struct HashTraits<WebCore::AdClickAttribution::Destination> : GenericHashTraits<WebCore::AdClickAttribution::Destination> {
+    static WebCore::AdClickAttribution::Destination emptyValue() { return { }; }
+    static void constructDeletedValue(WebCore::AdClickAttribution::Destination& slot) { WebCore::AdClickAttribution::Destination::constructDeletedValue(slot); }
+    static bool isDeletedValue(const WebCore::AdClickAttribution::Destination& slot) { return slot.isDeletedValue(); }
+};
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreloaderFrameLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/FrameLoader.cpp      2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp 2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -422,7 +422,7 @@
</span><span class="cx">     client().dispatchDecidePolicyForResponse(response, activeDocumentLoader()->request(), identifier, activeDocumentLoader()->downloadAttribute(), WTFMove(function));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void FrameLoader::changeLocation(const URL& url, const String& passedTarget, Event* triggeringEvent, LockHistory lockHistory, LockBackForwardList lockBackForwardList, const ReferrerPolicy& referrerPolicy, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy, Optional<NewFrameOpenerPolicy> openerPolicy, const AtomString& downloadAttribute, const SystemPreviewInfo& systemPreviewInfo, Optional<PrivateClickMeasurement>&& privateClickMeasurement)
</del><ins>+void FrameLoader::changeLocation(const URL& url, const String& passedTarget, Event* triggeringEvent, LockHistory lockHistory, LockBackForwardList lockBackForwardList, const ReferrerPolicy& referrerPolicy, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy, Optional<NewFrameOpenerPolicy> openerPolicy, const AtomString& downloadAttribute, const SystemPreviewInfo& systemPreviewInfo, Optional<AdClickAttribution>&& adClickAttribution)
</ins><span class="cx"> {
</span><span class="cx">     auto* frame = lexicalFrameFromCommonVM();
</span><span class="cx">     auto initiatedByMainFrame = frame && frame->isMainFrame() ? InitiatedByMainFrame::Yes : InitiatedByMainFrame::Unknown;
</span><span class="lines">@@ -435,10 +435,10 @@
</span><span class="cx">     frameLoadRequest.setReferrerPolicy(referrerPolicy);
</span><span class="cx">     frameLoadRequest.setShouldOpenExternalURLsPolicy(shouldOpenExternalURLsPolicy);
</span><span class="cx">     frameLoadRequest.disableShouldReplaceDocumentIfJavaScriptURL();
</span><del>-    changeLocation(WTFMove(frameLoadRequest), triggeringEvent, WTFMove(privateClickMeasurement));
</del><ins>+    changeLocation(WTFMove(frameLoadRequest), triggeringEvent, WTFMove(adClickAttribution));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void FrameLoader::changeLocation(FrameLoadRequest&& frameRequest, Event* triggeringEvent, Optional<PrivateClickMeasurement>&& privateClickMeasurement)
</del><ins>+void FrameLoader::changeLocation(FrameLoadRequest&& frameRequest, Event* triggeringEvent, Optional<AdClickAttribution>&& adClickAttribution)
</ins><span class="cx"> {
</span><span class="cx">     FRAMELOADER_RELEASE_LOG_IF_ALLOWED(ResourceLoading, "changeLocation: frame load started");
</span><span class="cx">     ASSERT(frameRequest.resourceRequest().httpMethod() == "GET");
</span><span class="lines">@@ -456,7 +456,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_frame.document()->contentSecurityPolicy()->upgradeInsecureRequestIfNeeded(frameRequest.resourceRequest(), ContentSecurityPolicy::InsecureRequestType::Navigation);
</span><span class="cx"> 
</span><del>-    loadFrameRequest(WTFMove(frameRequest), triggeringEvent, { }, WTFMove(privateClickMeasurement));
</del><ins>+    loadFrameRequest(WTFMove(frameRequest), triggeringEvent, { }, WTFMove(adClickAttribution));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void FrameLoader::submitForm(Ref<FormSubmission>&& submission)
</span><span class="lines">@@ -1239,7 +1239,7 @@
</span><span class="cx">     detachChildren();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void FrameLoader::loadFrameRequest(FrameLoadRequest&& request, Event* event, RefPtr<FormState>&& formState, Optional<PrivateClickMeasurement>&& privateClickMeasurement)
</del><ins>+void FrameLoader::loadFrameRequest(FrameLoadRequest&& request, Event* event, RefPtr<FormState>&& formState, Optional<AdClickAttribution>&& adClickAttribution)
</ins><span class="cx"> {
</span><span class="cx">     FRAMELOADER_RELEASE_LOG_IF_ALLOWED(ResourceLoading, "loadFrameRequest: frame load started");
</span><span class="cx"> 
</span><span class="lines">@@ -1287,7 +1287,7 @@
</span><span class="cx">     if (request.resourceRequest().httpMethod() == "POST")
</span><span class="cx">         loadPostRequest(WTFMove(request), referrer, loadType, event, WTFMove(formState), WTFMove(completionHandler));
</span><span class="cx">     else
</span><del>-        loadURL(WTFMove(request), referrer, loadType, event, WTFMove(formState), WTFMove(privateClickMeasurement), WTFMove(completionHandler));
</del><ins>+        loadURL(WTFMove(request), referrer, loadType, event, WTFMove(formState), WTFMove(adClickAttribution), WTFMove(completionHandler));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicyToApply(Frame& currentFrame, InitiatedByMainFrame initiatedByMainFrame, ShouldOpenExternalURLsPolicy propagatedPolicy)
</span><span class="lines">@@ -1329,7 +1329,7 @@
</span><span class="cx">     return m_pageDismissalEventBeingDispatched == PageDismissalType::None;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void FrameLoader::loadURL(FrameLoadRequest&& frameLoadRequest, const String& referrer, FrameLoadType newLoadType, Event* event, RefPtr<FormState>&& formState, Optional<PrivateClickMeasurement>&& privateClickMeasurement, CompletionHandler<void()>&& completionHandler)
</del><ins>+void FrameLoader::loadURL(FrameLoadRequest&& frameLoadRequest, const String& referrer, FrameLoadType newLoadType, Event* event, RefPtr<FormState>&& formState, Optional<AdClickAttribution>&& adClickAttribution, CompletionHandler<void()>&& completionHandler)
</ins><span class="cx"> {
</span><span class="cx">     FRAMELOADER_RELEASE_LOG_IF_ALLOWED(ResourceLoading, "loadURL: frame load started");
</span><span class="cx">     ASSERT(frameLoadRequest.resourceRequest().httpMethod() == "GET");
</span><span class="lines">@@ -1348,7 +1348,7 @@
</span><span class="cx">     auto targetFrame = isFormSubmission ? nullptr : makeRefPtr(findFrameForNavigation(effectiveFrameName));
</span><span class="cx">     if (targetFrame && targetFrame != &m_frame) {
</span><span class="cx">         frameLoadRequest.setFrameName("_self");
</span><del>-        targetFrame->loader().loadURL(WTFMove(frameLoadRequest), referrer, newLoadType, event, WTFMove(formState), WTFMove(privateClickMeasurement), completionHandlerCaller.release());
</del><ins>+        targetFrame->loader().loadURL(WTFMove(frameLoadRequest), referrer, newLoadType, event, WTFMove(formState), WTFMove(adClickAttribution), completionHandlerCaller.release());
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1367,8 +1367,8 @@
</span><span class="cx">     NavigationAction action { frameLoadRequest.requester(), request, frameLoadRequest.initiatedByMainFrame(), newLoadType, isFormSubmission, event, frameLoadRequest.shouldOpenExternalURLsPolicy(), frameLoadRequest.downloadAttribute() };
</span><span class="cx">     action.setLockHistory(frameLoadRequest.lockHistory());
</span><span class="cx">     action.setLockBackForwardList(frameLoadRequest.lockBackForwardList());
</span><del>-    if (privateClickMeasurement && m_frame.isMainFrame())
-        action.setPrivateClickMeasurement(WTFMove(*privateClickMeasurement));
</del><ins>+    if (adClickAttribution && m_frame.isMainFrame())
+        action.setAdClickAttribution(WTFMove(*adClickAttribution));
</ins><span class="cx"> 
</span><span class="cx">     NewFrameOpenerPolicy openerPolicy = frameLoadRequest.newFrameOpenerPolicy();
</span><span class="cx">     AllowNavigationToInvalidURL allowNavigationToInvalidURL = frameLoadRequest.allowNavigationToInvalidURL();
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderFrameLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/FrameLoader.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/FrameLoader.h        2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebCore/loader/FrameLoader.h   2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><ins>+#include "AdClickAttribution.h"
</ins><span class="cx"> #include "CachePolicy.h"
</span><span class="cx"> #include "FrameIdentifier.h"
</span><span class="cx"> #include "FrameLoaderStateMachine.h"
</span><span class="lines">@@ -38,7 +39,6 @@
</span><span class="cx"> #include "LayoutMilestone.h"
</span><span class="cx"> #include "MixedContentChecker.h"
</span><span class="cx"> #include "PageIdentifier.h"
</span><del>-#include "PrivateClickMeasurement.h"
</del><span class="cx"> #include "ReferrerPolicy.h"
</span><span class="cx"> #include "ResourceLoadNotifier.h"
</span><span class="cx"> #include "ResourceLoaderOptions.h"
</span><span class="lines">@@ -124,7 +124,7 @@
</span><span class="cx">     void setupForReplace();
</span><span class="cx"> 
</span><span class="cx">     // FIXME: These are all functions which start loads. We have too many.
</span><del>-    WEBCORE_EXPORT void loadFrameRequest(FrameLoadRequest&&, Event*, RefPtr<FormState>&&, Optional<PrivateClickMeasurement>&& = WTF::nullopt); // Called by submitForm, calls loadPostRequest and loadURL.
</del><ins>+    WEBCORE_EXPORT void loadFrameRequest(FrameLoadRequest&&, Event*, RefPtr<FormState>&&, Optional<AdClickAttribution>&& = WTF::nullopt); // Called by submitForm, calls loadPostRequest and loadURL.
</ins><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT void load(FrameLoadRequest&&);
</span><span class="cx"> 
</span><span class="lines">@@ -133,8 +133,8 @@
</span><span class="cx"> #endif
</span><span class="cx">     unsigned long loadResourceSynchronously(const ResourceRequest&, ClientCredentialPolicy, const FetchOptions&, const HTTPHeaderMap&, ResourceError&, ResourceResponse&, RefPtr<SharedBuffer>& data);
</span><span class="cx"> 
</span><del>-    WEBCORE_EXPORT void changeLocation(const URL&, const String& target, Event*, LockHistory, LockBackForwardList, const ReferrerPolicy&, ShouldOpenExternalURLsPolicy, Optional<NewFrameOpenerPolicy> = WTF::nullopt, const AtomString& downloadAttribute = nullAtom(), const SystemPreviewInfo& = { }, Optional<PrivateClickMeasurement>&& = WTF::nullopt);
-    void changeLocation(FrameLoadRequest&&, Event* = nullptr, Optional<PrivateClickMeasurement>&& = WTF::nullopt);
</del><ins>+    WEBCORE_EXPORT void changeLocation(const URL&, const String& target, Event*, LockHistory, LockBackForwardList, const ReferrerPolicy&, ShouldOpenExternalURLsPolicy, Optional<NewFrameOpenerPolicy> = WTF::nullopt, const AtomString& downloadAttribute = nullAtom(), const SystemPreviewInfo& = { }, Optional<AdClickAttribution>&& = WTF::nullopt);
+    void changeLocation(FrameLoadRequest&&, Event* = nullptr, Optional<AdClickAttribution>&& = WTF::nullopt);
</ins><span class="cx">     void submitForm(Ref<FormSubmission>&&);
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT void reload(OptionSet<ReloadOption> = { });
</span><span class="lines">@@ -387,7 +387,7 @@
</span><span class="cx">     void loadWithNavigationAction(const ResourceRequest&, NavigationAction&&, FrameLoadType, RefPtr<FormState>&&, AllowNavigationToInvalidURL, CompletionHandler<void()>&& = [] { }); // Calls loadWithDocumentLoader
</span><span class="cx"> 
</span><span class="cx">     void loadPostRequest(FrameLoadRequest&&, const String& referrer, FrameLoadType, Event*, RefPtr<FormState>&&, CompletionHandler<void()>&&);
</span><del>-    void loadURL(FrameLoadRequest&&, const String& referrer, FrameLoadType, Event*, RefPtr<FormState>&&, Optional<PrivateClickMeasurement>&&, CompletionHandler<void()>&&);
</del><ins>+    void loadURL(FrameLoadRequest&&, const String& referrer, FrameLoadType, Event*, RefPtr<FormState>&&, Optional<AdClickAttribution>&&, CompletionHandler<void()>&&);
</ins><span class="cx"> 
</span><span class="cx">     bool shouldReload(const URL& currentURL, const URL& destinationURL);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderNavigationActionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/NavigationAction.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/NavigationAction.h   2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebCore/loader/NavigationAction.h      2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -28,11 +28,11 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><ins>+#include "AdClickAttribution.h"
</ins><span class="cx"> #include "BackForwardItemIdentifier.h"
</span><span class="cx"> #include "FrameLoaderTypes.h"
</span><span class="cx"> #include "GlobalFrameIdentifier.h"
</span><span class="cx"> #include "LayoutPoint.h"
</span><del>-#include "PrivateClickMeasurement.h"
</del><span class="cx"> #include "ResourceRequest.h"
</span><span class="cx"> #include "SecurityOrigin.h"
</span><span class="cx"> #include "UserGestureIndicator.h"
</span><span class="lines">@@ -137,8 +137,8 @@
</span><span class="cx">     LockBackForwardList lockBackForwardList() const { return m_lockBackForwardList; }
</span><span class="cx">     void setLockBackForwardList(LockBackForwardList lockBackForwardList) { m_lockBackForwardList = lockBackForwardList; }
</span><span class="cx"> 
</span><del>-    const Optional<PrivateClickMeasurement>& privateClickMeasurement() const { return m_privateClickMeasurement; };
-    void setPrivateClickMeasurement(PrivateClickMeasurement&& privateClickMeasurement) { m_privateClickMeasurement = privateClickMeasurement; };
</del><ins>+    const Optional<AdClickAttribution>& adClickAttribution() const { return m_adClickAttribution; };
+    void setAdClickAttribution(AdClickAttribution&& adClickAttribution) { m_adClickAttribution = adClickAttribution; };
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     // Do not add a strong reference to the originating document or a subobject that holds the
</span><span class="lines">@@ -159,7 +159,7 @@
</span><span class="cx">     Optional<BackForwardItemIdentifier> m_sourceBackForwardItemIdentifier;
</span><span class="cx">     LockHistory m_lockHistory { LockHistory::No };
</span><span class="cx">     LockBackForwardList m_lockBackForwardList { LockBackForwardList::No };
</span><del>-    Optional<PrivateClickMeasurement> m_privateClickMeasurement;
</del><ins>+    Optional<AdClickAttribution> m_adClickAttribution;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderPrivateClickMeasurementcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/loader/PrivateClickMeasurement.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/PrivateClickMeasurement.cpp  2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebCore/loader/PrivateClickMeasurement.cpp     2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1,229 +0,0 @@
</span><del>-/*
- * Copyright (C) 2019 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "PrivateClickMeasurement.h"
-
-#include "Logging.h"
-#include "RuntimeEnabledFeatures.h"
-#include <wtf/Expected.h>
-#include <wtf/RandomNumber.h>
-#include <wtf/URL.h>
-#include <wtf/text/StringBuilder.h>
-#include <wtf/text/StringView.h>
-
-namespace WebCore {
-
-static const char privateClickMeasurementPathPrefix[] = "/.well-known/private-click-measurement/";
-const size_t privateClickMeasurementConversionDataPathSegmentSize = 2;
-const size_t privateClickMeasurementPriorityPathSegmentSize = 2;
-const Seconds maxAge { 24_h * 7 };
-
-bool PrivateClickMeasurement::isValid() const
-{
-    return m_conversion
-        && m_conversion.value().isValid()
-        && m_campaign.isValid()
-        && !m_source.registrableDomain.isEmpty()
-        && !m_destination.registrableDomain.isEmpty()
-        && m_earliestTimeToSend;
-}
-
-Expected<PrivateClickMeasurement::Conversion, String> PrivateClickMeasurement::parseConversionRequest(const URL& redirectURL)
-{
-    if (!redirectURL.protocolIs("https") || redirectURL.hasCredentials() || redirectURL.hasQuery() || redirectURL.hasFragmentIdentifier()) {
-        if (UNLIKELY(debugModeEnabled())) {
-            RELEASE_LOG_INFO(PrivateClickMeasurement, "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.");
-            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);
-        }
-        return makeUnexpected(nullString());
-    }
-
-    auto path = StringView(redirectURL.string()).substring(redirectURL.pathStart(), redirectURL.pathEnd() - redirectURL.pathStart());
-    if (path.isEmpty() || !path.startsWith(privateClickMeasurementPathPrefix)) {
-        if (UNLIKELY(debugModeEnabled())) {
-            RELEASE_LOG_INFO(PrivateClickMeasurement, "Conversion was not accepted because the URL path did not start with %" PUBLIC_LOG_STRING ".", privateClickMeasurementPathPrefix);
-            return makeUnexpected(makeString("[Private Click Measurement] Conversion was not accepted because the URL path did not start with "_s, privateClickMeasurementPathPrefix, "."_s));
-        }
-        return makeUnexpected(nullString());
-    }
-
-    auto prefixLength = sizeof(privateClickMeasurementPathPrefix) - 1;
-    if (path.length() == prefixLength + privateClickMeasurementConversionDataPathSegmentSize) {
-        auto conversionDataUInt64 = path.substring(prefixLength, privateClickMeasurementConversionDataPathSegmentSize).toUInt64Strict();
-        if (!conversionDataUInt64 || *conversionDataUInt64 > MaxEntropy) {
-            if (UNLIKELY(debugModeEnabled())) {
-                RELEASE_LOG_INFO(PrivateClickMeasurement, "Conversion was not accepted because the conversion data could not be parsed or was higher than the allowed maximum of %{public}u.", MaxEntropy);
-                return makeUnexpected(makeString("[Private Click Measurement] Conversion was not accepted because the conversion data could not be parsed or was higher than the allowed maximum of "_s, MaxEntropy, "."_s));
-            }
-            return makeUnexpected(nullString());
-        }
-
-        return Conversion { static_cast<uint32_t>(*conversionDataUInt64), Priority { 0 } };
-    }
-    
-    if (path.length() == prefixLength + privateClickMeasurementConversionDataPathSegmentSize + 1 + privateClickMeasurementPriorityPathSegmentSize) {
-        auto conversionDataUInt64 = path.substring(prefixLength, privateClickMeasurementConversionDataPathSegmentSize).toUInt64Strict();
-        if (!conversionDataUInt64 || *conversionDataUInt64 > MaxEntropy) {
-            if (UNLIKELY(debugModeEnabled())) {
-                RELEASE_LOG_INFO(PrivateClickMeasurement, "Conversion was not accepted because the conversion data could not be parsed or was higher than the allowed maximum of %{public}u.", MaxEntropy);
-                return makeUnexpected(makeString("[Private Click Measurement] Conversion was not accepted because the conversion data could not be parsed or was higher than the allowed maximum of "_s, MaxEntropy, "."_s));
-            }
-            return makeUnexpected(nullString());
-        }
-
-        auto conversionPriorityUInt64 = path.substring(prefixLength + privateClickMeasurementConversionDataPathSegmentSize + 1, privateClickMeasurementPriorityPathSegmentSize).toUInt64Strict();
-        if (!conversionPriorityUInt64 || *conversionPriorityUInt64 > MaxEntropy) {
-            if (UNLIKELY(debugModeEnabled())) {
-                RELEASE_LOG_INFO(PrivateClickMeasurement, "Conversion was not accepted because the priority could not be parsed or was higher than the allowed maximum of %{public}u.", MaxEntropy);
-                return makeUnexpected(makeString("[Private Click Measurement] Conversion was not accepted because the priority could not be parsed or was higher than the allowed maximum of "_s, MaxEntropy, "."_s));
-            }
-            return makeUnexpected(nullString());
-        }
-
-        return Conversion { static_cast<uint32_t>(*conversionDataUInt64), Priority { static_cast<uint32_t>(*conversionPriorityUInt64) } };
-    }
-
-    if (UNLIKELY(debugModeEnabled())) {
-        RELEASE_LOG_INFO(PrivateClickMeasurement, "Conversion was not accepted because the URL path contained unrecognized parts.");
-        return makeUnexpected("[Private Click Measurement] Conversion was not accepted because the URL path contained unrecognized parts."_s);
-    }
-    return makeUnexpected(nullString());
-}
-
-Optional<Seconds> PrivateClickMeasurement::convertAndGetEarliestTimeToSend(Conversion&& conversion)
-{
-    if (!conversion.isValid() || (m_conversion && m_conversion->priority >= conversion.priority))
-        return { };
-
-    m_conversion = WTFMove(conversion);
-    // 24-48 hour delay before sending. This helps privacy since the conversion and the attribution
-    // requests are detached and the time of the attribution does not reveal the time of the conversion.
-    auto seconds = 24_h + Seconds(randomNumber() * (24_h).value());
-    m_earliestTimeToSend = WallTime::now() + seconds;
-    return seconds;
-}
-
-void PrivateClickMeasurement::markAsExpired()
-{
-    m_timeOfAdClick = { };
-}
-
-bool PrivateClickMeasurement::hasExpired() const
-{
-    return WallTime::now() > m_timeOfAdClick + maxAge;
-}
-
-bool PrivateClickMeasurement::hasHigherPriorityThan(const PrivateClickMeasurement& other) const
-{
-    if (!other.m_conversion)
-        return true;
-    
-    if (!m_conversion)
-        return false;
-
-    return m_conversion->priority > other.m_conversion->priority;
-}
-
-URL PrivateClickMeasurement::reportURL() const
-{
-    if (!isValid())
-        return URL();
-
-    StringBuilder builder;
-    builder.appendLiteral("https://");
-    builder.append(m_source.registrableDomain.string());
-    builder.appendLiteral(privateClickMeasurementPathPrefix);
-
-    URL url { URL(), builder.toString() };
-    if (url.isValid())
-        return url;
-
-    return URL();
-}
-
-Ref<JSON::Object> PrivateClickMeasurement::json() const
-{
-    auto reportDetails = JSON::Object::create();
-    if (!m_conversion)
-        return reportDetails;
-
-    reportDetails->setString("content-type"_s, "click"_s);
-    reportDetails->setString("content-site"_s, m_source.registrableDomain.string());
-    reportDetails->setInteger("content-id"_s, m_campaign.id);
-    reportDetails->setString("conversion-site"_s, m_destination.registrableDomain.string());
-    reportDetails->setInteger("conversion-data"_s, m_conversion->data);
-    reportDetails->setInteger("report-version"_s, 1);
-    return reportDetails;
-}
-
-void PrivateClickMeasurement::markConversionAsSent()
-{
-    ASSERT(m_conversion);
-    if (m_conversion)
-        m_conversion->wasSent = Conversion::WasSent::Yes;
-}
-
-bool PrivateClickMeasurement::wasConversionSent() const
-{
-    return m_conversion && m_conversion->wasSent == Conversion::WasSent::Yes;
-}
-
-String PrivateClickMeasurement::toString() const
-{
-    StringBuilder builder;
-    builder.appendLiteral("Source: ");
-    builder.append(m_source.registrableDomain.string());
-    builder.appendLiteral("\nDestination: ");
-    builder.append(m_destination.registrableDomain.string());
-    builder.appendLiteral("\nCampaign ID: ");
-    builder.appendNumber(m_campaign.id);
-    if (m_conversion) {
-        builder.appendLiteral("\nConversion data: ");
-        builder.appendNumber(m_conversion.value().data);
-        builder.appendLiteral("\nConversion priority: ");
-        builder.appendNumber(m_conversion.value().priority);
-        builder.appendLiteral("\nConversion earliest time to send: ");
-        if (!m_earliestTimeToSend)
-            builder.appendLiteral("Not set");
-        else {
-            auto secondsUntilSend = *m_earliestTimeToSend - WallTime::now();
-            builder.append((secondsUntilSend >= 24_h && secondsUntilSend <= 48_h) ? "Within 24-48 hours" : "Outside 24-48 hours");
-        }
-        builder.appendLiteral("\nConversion request sent: ");
-        builder.append((wasConversionSent() ? "true" : "false"));
-    } else
-        builder.appendLiteral("\nNo conversion data.");
-    builder.append('\n');
-
-    return builder.toString();
-}
-
-bool PrivateClickMeasurement::debugModeEnabled()
-{
-    return RuntimeEnabledFeatures::sharedFeatures().privateClickMeasurementDebugModeEnabled();
-}
-
-}
</del></span></pre></div>
<a id="trunkSourceWebCoreloaderPrivateClickMeasurementh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/loader/PrivateClickMeasurement.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/PrivateClickMeasurement.h    2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebCore/loader/PrivateClickMeasurement.h       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1,368 +0,0 @@
</span><del>-/*
- * Copyright (C) 2019 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include "RegistrableDomain.h"
-#include <wtf/CompletionHandler.h>
-#include <wtf/Forward.h>
-#include <wtf/JSONValues.h>
-#include <wtf/Optional.h>
-#include <wtf/URL.h>
-#include <wtf/WallTime.h>
-#include <wtf/text/StringHash.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-class PrivateClickMeasurement {
-public:
-    using CampaignId = uint32_t;
-    using ConversionData = uint32_t;
-    using PriorityValue = uint32_t;
-
-    static constexpr uint32_t MaxEntropy = 63;
-
-    struct Campaign {
-        Campaign() = default;
-        explicit Campaign(CampaignId id)
-            : id { id }
-        {
-        }
-        
-        bool isValid() const
-        {
-            return id <= MaxEntropy;
-        }
-        
-        CampaignId id { 0 };
-    };
-
-    struct Source {
-        Source() = default;
-        explicit Source(const URL& url)
-            : registrableDomain { url }
-        {
-        }
-
-        explicit Source(const RegistrableDomain& domain)
-            : registrableDomain { domain }
-        {
-        }
-
-        explicit Source(WTF::HashTableDeletedValueType)
-            : registrableDomain(WTF::HashTableDeletedValue)
-        {
-        }
-
-        bool operator==(const Source& other) const
-        {
-            return registrableDomain == other.registrableDomain;
-        }
-
-        bool matches(const URL& url) const
-        {
-            return registrableDomain.matches(url);
-        }
-
-        bool isHashTableDeletedValue() const
-        {
-            return registrableDomain.isHashTableDeletedValue();
-        }
-
-        static Source deletedValue()
-        {
-            return Source { WTF::HashTableDeletedValue };
-        }
-
-        static void constructDeletedValue(Source& source)
-        {
-            new (&source) Source;
-            source = Source::deletedValue();
-        }
-
-        void deleteValue()
-        {
-            registrableDomain = RegistrableDomain { WTF::HashTableDeletedValue };
-        }
-
-        bool isDeletedValue() const
-        {
-            return isHashTableDeletedValue();
-        }
-
-        RegistrableDomain registrableDomain;
-    };
-
-    struct SourceHash {
-        static unsigned hash(const Source& source)
-        {
-            return source.registrableDomain.hash();
-        }
-        
-        static bool equal(const Source& a, const Source& b)
-        {
-            return a == b;
-        }
-
-        static const bool safeToCompareToEmptyOrDeleted = false;
-    };
-
-    struct Destination {
-        Destination() = default;
-        explicit Destination(const URL& url)
-            : registrableDomain { RegistrableDomain { url } }
-        {
-        }
-
-        explicit Destination(WTF::HashTableDeletedValueType)
-            : registrableDomain { WTF::HashTableDeletedValue }
-        {
-        }
-
-        explicit Destination(RegistrableDomain&& domain)
-            : registrableDomain { WTFMove(domain) }
-        {
-        }
-        
-        bool operator==(const Destination& other) const
-        {
-            return registrableDomain == other.registrableDomain;
-        }
-
-        bool matches(const URL& url) const
-        {
-            return registrableDomain == RegistrableDomain { url };
-        }
-        
-        bool isHashTableDeletedValue() const
-        {
-            return registrableDomain.isHashTableDeletedValue();
-        }
-
-        static Destination deletedValue()
-        {
-            return Destination { WTF::HashTableDeletedValue };
-        }
-
-        static void constructDeletedValue(Destination& destination)
-        {
-            new (&destination) Destination;
-            destination = Destination::deletedValue();
-        }
-
-        void deleteValue()
-        {
-            registrableDomain = RegistrableDomain { WTF::HashTableDeletedValue };
-        }
-
-        bool isDeletedValue() const
-        {
-            return isHashTableDeletedValue();
-        }
-
-        RegistrableDomain registrableDomain;
-    };
-
-    struct DestinationHash {
-        static unsigned hash(const Destination& destination)
-        {
-            return destination.registrableDomain.hash();
-        }
-        
-        static bool equal(const Destination& a, const Destination& b)
-        {
-            return a == b;
-        }
-
-        static const bool safeToCompareToEmptyOrDeleted = false;
-    };
-
-    struct Priority {
-        explicit Priority(PriorityValue value)
-        : value { value }
-        {
-        }
-        
-        PriorityValue value;
-    };
-    
-    struct Conversion {
-        enum class WasSent : bool { No, Yes };
-        
-        Conversion(ConversionData data, Priority priority, WasSent wasSent = WasSent::No)
-            : data { data }
-            , priority { priority.value }
-            , wasSent { wasSent }
-        {
-        }
-
-        bool isValid() const
-        {
-            return data <= MaxEntropy && priority <= MaxEntropy;
-        }
-        
-        ConversionData data;
-        PriorityValue priority;
-        WasSent wasSent = WasSent::No;
-
-        template<class Encoder> void encode(Encoder&) const;
-        template<class Decoder> static Optional<Conversion> decode(Decoder&);
-    };
-
-    PrivateClickMeasurement() = default;
-    PrivateClickMeasurement(Campaign campaign, const Source& source, const Destination& destination)
-        : m_campaign { campaign }
-        , m_source { source }
-        , m_destination { destination }
-        , m_timeOfAdClick { WallTime::now() }
-    {
-    }
-
-    WEBCORE_EXPORT static Expected<Conversion, String> parseConversionRequest(const URL& redirectURL);
-    WEBCORE_EXPORT Optional<Seconds> convertAndGetEarliestTimeToSend(Conversion&&);
-    WEBCORE_EXPORT bool hasHigherPriorityThan(const PrivateClickMeasurement&) const;
-    WEBCORE_EXPORT URL reportURL() const;
-    WEBCORE_EXPORT Ref<JSON::Object> json() const;
-    const Source& source() const { return m_source; };
-    const Destination& destination() const { return m_destination; };
-    Optional<WallTime> earliestTimeToSend() const { return m_earliestTimeToSend; };
-    WEBCORE_EXPORT void markAsExpired();
-    WEBCORE_EXPORT bool hasExpired() const;
-    WEBCORE_EXPORT void markConversionAsSent();
-    WEBCORE_EXPORT bool wasConversionSent() const;
-
-    bool isEmpty() const { return m_source.registrableDomain.isEmpty(); };
-
-    WEBCORE_EXPORT String toString() const;
-
-    template<class Encoder> void encode(Encoder&) const;
-    template<class Decoder> static Optional<PrivateClickMeasurement> decode(Decoder&);
-
-private:
-    bool isValid() const;
-    static bool debugModeEnabled();
-
-    Campaign m_campaign;
-    Source m_source;
-    Destination m_destination;
-    WallTime m_timeOfAdClick;
-
-    Optional<Conversion> m_conversion;
-    Optional<WallTime> m_earliestTimeToSend;
-};
-
-template<class Encoder>
-void PrivateClickMeasurement::encode(Encoder& encoder) const
-{
-    encoder << m_campaign.id << m_source.registrableDomain << m_destination.registrableDomain << m_timeOfAdClick << m_conversion << m_earliestTimeToSend;
-}
-
-template<class Decoder>
-Optional<PrivateClickMeasurement> PrivateClickMeasurement::decode(Decoder& decoder)
-{
-    Optional<CampaignId> campaignId;
-    decoder >> campaignId;
-    if (!campaignId)
-        return WTF::nullopt;
-    
-    Optional<RegistrableDomain> sourceRegistrableDomain;
-    decoder >> sourceRegistrableDomain;
-    if (!sourceRegistrableDomain)
-        return WTF::nullopt;
-    
-    Optional<RegistrableDomain> destinationRegistrableDomain;
-    decoder >> destinationRegistrableDomain;
-    if (!destinationRegistrableDomain)
-        return WTF::nullopt;
-    
-    Optional<WallTime> timeOfAdClick;
-    decoder >> timeOfAdClick;
-    if (!timeOfAdClick)
-        return WTF::nullopt;
-    
-    Optional<Optional<Conversion>> conversion;
-    decoder >> conversion;
-    if (!conversion)
-        return WTF::nullopt;
-    
-    Optional<Optional<WallTime>> earliestTimeToSend;
-    decoder >> earliestTimeToSend;
-    if (!earliestTimeToSend)
-        return WTF::nullopt;
-    
-    PrivateClickMeasurement attribution { Campaign { WTFMove(*campaignId) }, Source { WTFMove(*sourceRegistrableDomain) }, Destination { WTFMove(*destinationRegistrableDomain) } };
-    attribution.m_conversion = WTFMove(*conversion);
-    attribution.m_earliestTimeToSend = WTFMove(*earliestTimeToSend);
-    
-    return attribution;
-}
-
-template<class Encoder>
-void PrivateClickMeasurement::Conversion::encode(Encoder& encoder) const
-{
-    encoder << data << priority << wasSent;
-}
-
-template<class Decoder>
-Optional<PrivateClickMeasurement::Conversion> PrivateClickMeasurement::Conversion::decode(Decoder& decoder)
-{
-    Optional<ConversionData> data;
-    decoder >> data;
-    if (!data)
-        return WTF::nullopt;
-    
-    Optional<PriorityValue> priority;
-    decoder >> priority;
-    if (!priority)
-        return WTF::nullopt;
-    
-    Optional<WasSent> wasSent;
-    decoder >> wasSent;
-    if (!wasSent)
-        return WTF::nullopt;
-    
-    return Conversion { WTFMove(*data), Priority { *priority }, *wasSent };
-}
-
-} // namespace WebCore
-
-namespace WTF {
-template<typename T> struct DefaultHash;
-
-template<> struct DefaultHash<WebCore::PrivateClickMeasurement::Source> : WebCore::PrivateClickMeasurement::SourceHash { };
-template<> struct HashTraits<WebCore::PrivateClickMeasurement::Source> : GenericHashTraits<WebCore::PrivateClickMeasurement::Source> {
-    static WebCore::PrivateClickMeasurement::Source emptyValue() { return { }; }
-    static void constructDeletedValue(WebCore::PrivateClickMeasurement::Source& slot) { WebCore::PrivateClickMeasurement::Source::constructDeletedValue(slot); }
-    static bool isDeletedValue(const WebCore::PrivateClickMeasurement::Source& slot) { return slot.isDeletedValue(); }
-};
-
-template<> struct DefaultHash<WebCore::PrivateClickMeasurement::Destination> : WebCore::PrivateClickMeasurement::DestinationHash { };
-template<> struct HashTraits<WebCore::PrivateClickMeasurement::Destination> : GenericHashTraits<WebCore::PrivateClickMeasurement::Destination> {
-    static WebCore::PrivateClickMeasurement::Destination emptyValue() { return { }; }
-    static void constructDeletedValue(WebCore::PrivateClickMeasurement::Destination& slot) { WebCore::PrivateClickMeasurement::Destination::constructDeletedValue(slot); }
-    static bool isDeletedValue(const WebCore::PrivateClickMeasurement::Destination& slot) { return slot.isDeletedValue(); }
-};
-}
</del></span></pre></div>
<a id="trunkSourceWebCorepageRuntimeEnabledFeaturesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/RuntimeEnabledFeatures.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/RuntimeEnabledFeatures.h       2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebCore/page/RuntimeEnabledFeatures.h  2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -203,8 +203,8 @@
</span><span class="cx">     void setLineHeightUnitsEnabled(bool isEnabled) { m_lineHeightUnitsEnabled = isEnabled; }
</span><span class="cx">     bool lineHeightUnitsEnabled() const { return m_lineHeightUnitsEnabled; }
</span><span class="cx"> 
</span><del>-    bool privateClickMeasurementDebugModeEnabled() const { return m_privateClickMeasurementDebugModeEnabled; }
-    void setPrivateClickMeasurementDebugModeEnabled(bool isEnabled) { m_privateClickMeasurementDebugModeEnabled = isEnabled; }
</del><ins>+    bool adClickAttributionDebugModeEnabled() const { return m_adClickAttributionDebugModeEnabled; }
+    void setAdClickAttributionDebugModeEnabled(bool isEnabled) { m_adClickAttributionDebugModeEnabled = isEnabled; }
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="cx">     bool mouseEventsSimulationEnabled() const { return m_mouseEventsSimulationEnabled; }
</span><span class="lines">@@ -346,7 +346,7 @@
</span><span class="cx">     // https://github.com/w3c/csswg-drafts/issues/3257 have been sorted out.
</span><span class="cx">     bool m_lineHeightUnitsEnabled { false };
</span><span class="cx"> 
</span><del>-    bool m_privateClickMeasurementDebugModeEnabled { false };
</del><ins>+    bool m_adClickAttributionDebugModeEnabled { false };
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="cx">     bool m_mouseEventsSimulationEnabled { false };
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLoggingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/Logging.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/Logging.h  2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebCore/platform/Logging.h     2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -39,6 +39,7 @@
</span><span class="cx"> 
</span><span class="cx"> #define WEBCORE_LOG_CHANNELS(M) \
</span><span class="cx">     M(Accessibility) \
</span><ins>+    M(AdClickAttribution) \
</ins><span class="cx">     M(Animations) \
</span><span class="cx">     M(ApplePay) \
</span><span class="cx">     M(Archives) \
</span><span class="lines">@@ -90,7 +91,6 @@
</span><span class="cx">     M(PlatformLeaks) \
</span><span class="cx">     M(Plugins) \
</span><span class="cx">     M(PopupBlocking) \
</span><del>-    M(PrivateClickMeasurement) \
</del><span class="cx">     M(Progress) \
</span><span class="cx">     M(RemoteInspector) \
</span><span class="cx">     M(RequestAnimationFrame) \
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog    2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebInspectorUI/ChangeLog       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2020-11-10  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, reverting r269660.
+        https://bugs.webkit.org/show_bug.cgi?id=218786
+
+        Crashing in EWS iOS simulator bots
+
+        Reverted changeset:
+
+        "PCM: Change from ad-click-attribution to private-click-
+        measurement (in all forms, including .well-known URL)"
+        https://bugs.webkit.org/show_bug.cgi?id=218730
+        https://trac.webkit.org/changeset/269660
+
</ins><span class="cx"> 2020-11-10  John Wilander  <wilander@apple.com>
</span><span class="cx"> 
</span><span class="cx">         PCM: Change from ad-click-attribution to private-click-measurement (in all forms, including .well-known URL)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js   2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js      2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -993,7 +993,6 @@
</span><span class="cx"> localizedStrings["Primary Key"] = "Primary Key";
</span><span class="cx"> localizedStrings["Primary Key \u2014 %s"] = "Primary Key \u2014 %s";
</span><span class="cx"> localizedStrings["Priority"] = "Priority";
</span><del>-localizedStrings["Private Click Measurement Debug Mode"] = "Private Click Measurement Debug Mode";
</del><span class="cx"> localizedStrings["Probe Expression"] = "Probe Expression";
</span><span class="cx"> localizedStrings["Probe Sample Recorded"] = "Probe Sample Recorded";
</span><span class="cx"> localizedStrings["Probes"] = "Probes";
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceBaseMainjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js   2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js      2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -2344,10 +2344,8 @@
</span><span class="cx">             columns: [
</span><span class="cx">                 [
</span><span class="cx">                     {name: WI.UIString("ITP Debug Mode"), setting: InspectorBackend.Enum.Page.Setting.ITPDebugModeEnabled, value: true},
</span><del>-                    // COMPATIBILITY (iOS 14.0): `Page.Setting.AdClickAttributionDebugModeEnabled` was renamed to `Page.Setting.PrivateClickMeasurementDebugModeEnabled`.
-                    {name: WI.UIString("Private Click Measurement Debug Mode"), setting: InspectorBackend.Enum.Page.Setting.PrivateClickMeasurementDebugModeEnabled, value: true},
</del><span class="cx">                     {name: WI.UIString("Ad Click Attribution Debug Mode"), setting: InspectorBackend.Enum.Page.Setting.AdClickAttributionDebugModeEnabled, value: true},
</span><del>-                 ],
</del><ins>+                ],
</ins><span class="cx">             ],
</span><span class="cx">         },
</span><span class="cx">         {
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsConsoleMessagejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/ConsoleMessage.js (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/ConsoleMessage.js       2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/ConsoleMessage.js  2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -113,11 +113,8 @@
</span><span class="cx">     MediaSource: "mediasource",
</span><span class="cx">     WebRTC: "webrtc",
</span><span class="cx">     ITPDebug: "itp-debug",
</span><del>-    PrivateClickMeasurement: "private-click-measurement",
</del><ins>+    AdClickAttribution: "ad-click-attribution",
</ins><span class="cx">     Other: "other",
</span><del>-
-    // COMPATIBILITY (iOS 14.0): `Console.ChannelSource.AdClickAttribution` was renamed to `Console.ChannelSource.PrivateClickMeasurement`.
-    AdClickAttribution: "ad-click-attribution",
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> WI.ConsoleMessage.MessageType = {
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsIssueMessagejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/IssueMessage.js (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/IssueMessage.js 2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/IssueMessage.js    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -69,8 +69,7 @@
</span><span class="cx">         case WI.ConsoleMessage.MessageSource.Mediasource:
</span><span class="cx">         case WI.ConsoleMessage.MessageSource.WebRTC:
</span><span class="cx">         case WI.ConsoleMessage.MessageSource.ITPDebug:
</span><del>-        case WI.ConsoleMessage.MessageSource.PrivateClickMeasurement:
-        case WI.ConsoleMessage.MessageSource.AdClickAttribution: // COMPATIBILITY (iOS 14.0): `Console.ChannelSource.AdClickAttribution` was renamed to `Console.ChannelSource.PrivateClickMeasurement`.
</del><ins>+        case WI.ConsoleMessage.MessageSource.AdClickAttribution:
</ins><span class="cx">         case WI.ConsoleMessage.MessageSource.Other:
</span><span class="cx">             this._type = WI.IssueMessage.Type.OtherIssue;
</span><span class="cx">             break;
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/ChangeLog       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2020-11-10  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, reverting r269660.
+        https://bugs.webkit.org/show_bug.cgi?id=218786
+
+        Crashing in EWS iOS simulator bots
+
+        Reverted changeset:
+
+        "PCM: Change from ad-click-attribution to private-click-
+        measurement (in all forms, including .well-known URL)"
+        https://bugs.webkit.org/show_bug.cgi?id=218730
+        https://trac.webkit.org/changeset/269660
+
</ins><span class="cx"> 2020-11-10  Per Arne Vollan  <pvollan@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [macOS] Enforce message filtering in the WebContent process
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessAdClickAttributionManagercppfromrev269670trunkSourceWebKitNetworkProcessPrivateClickMeasurementManagercpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit/NetworkProcess/AdClickAttributionManager.cpp (from rev 269670, trunk/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.cpp) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/AdClickAttributionManager.cpp                         (rev 0)
+++ trunk/Source/WebKit/NetworkProcess/AdClickAttributionManager.cpp    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,336 @@
</span><ins>+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "AdClickAttributionManager.h"
+
+#include "Logging.h"
+#include <JavaScriptCore/ConsoleTypes.h>
+#include <WebCore/FetchOptions.h>
+#include <WebCore/FormData.h>
+#include <WebCore/HTTPHeaderValues.h>
+#include <WebCore/ResourceError.h>
+#include <WebCore/ResourceRequest.h>
+#include <WebCore/ResourceResponse.h>
+#include <WebCore/RuntimeApplicationChecks.h>
+#include <WebCore/RuntimeEnabledFeatures.h>
+#include <wtf/text/StringBuilder.h>
+#include <wtf/text/StringHash.h>
+
+namespace WebKit {
+using namespace WebCore;
+
+using Source = AdClickAttribution::Source;
+using Destination = AdClickAttribution::Destination;
+using DestinationMap = HashMap<Destination, AdClickAttribution>;
+using Conversion = AdClickAttribution::Conversion;
+
+constexpr Seconds debugModeSecondsUntilSend { 60_s };
+
+void AdClickAttributionManager::storeUnconverted(AdClickAttribution&& attribution)
+{
+    clearExpired();
+
+    if (UNLIKELY(debugModeEnabled())) {
+        RELEASE_LOG_INFO(AdClickAttribution, "Storing an ad click.");
+        m_networkProcess->broadcastConsoleMessage(m_sessionID, MessageSource::AdClickAttribution, MessageLevel::Error, "[Ad Click Attribution] Storing an ad click."_s);
+    }
+
+    m_unconvertedAdClickAttributionMap.set(std::make_pair(attribution.source(), attribution.destination()), WTFMove(attribution));
+}
+
+void AdClickAttributionManager::handleConversion(Conversion&& conversion, const URL& requestURL, const WebCore::ResourceRequest& redirectRequest)
+{
+    if (m_sessionID.isEphemeral())
+        return;
+
+    RegistrableDomain redirectDomain { redirectRequest.url() };
+    auto& firstPartyURL = redirectRequest.firstPartyForCookies();
+
+    if (!redirectDomain.matches(requestURL)) {
+        if (UNLIKELY(debugModeEnabled())) {
+            RELEASE_LOG_INFO(AdClickAttribution, "Conversion was not accepted because the HTTP redirect was not same-site.");
+            m_networkProcess->broadcastConsoleMessage(m_sessionID, MessageSource::AdClickAttribution, MessageLevel::Error, "[Ad Click Attribution] Conversion was not accepted because the HTTP redirect was not same-site."_s);
+        }
+        return;
+    }
+
+    if (redirectDomain.matches(firstPartyURL)) {
+        if (UNLIKELY(debugModeEnabled())) {
+            RELEASE_LOG_INFO(AdClickAttribution, "Conversion was not accepted because it was requested in an HTTP redirect that is same-site as the first-party.");
+            m_networkProcess->broadcastConsoleMessage(m_sessionID, MessageSource::AdClickAttribution, MessageLevel::Error, "[Ad Click Attribution] Conversion was not accepted because it was requested in an HTTP redirect that is same-site as the first-party."_s);
+        }
+        return;
+    }
+
+    convert(AdClickAttribution::Source { WTFMove(redirectDomain) }, AdClickAttribution::Destination { firstPartyURL }, WTFMove(conversion));
+}
+
+void AdClickAttributionManager::startTimer(Seconds seconds)
+{
+    m_firePendingConversionRequestsTimer.startOneShot(m_isRunningTest ? 0_s : seconds);
+}
+
+void AdClickAttributionManager::convert(const Source& source, const Destination& destination, Conversion&& conversion)
+{
+    clearExpired();
+
+    if (!conversion.isValid()) {
+        if (UNLIKELY(debugModeEnabled())) {
+            RELEASE_LOG_INFO(AdClickAttribution, "Got an invalid conversion.");
+            m_networkProcess->broadcastConsoleMessage(m_sessionID, MessageSource::AdClickAttribution, MessageLevel::Error, "[Ad Click Attribution] Got an invalid conversion."_s);
+        }
+        return;
+    }
+
+    auto conversionData = conversion.data;
+    auto conversionPriority = conversion.priority;
+
+    if (UNLIKELY(debugModeEnabled())) {
+        RELEASE_LOG_INFO(AdClickAttribution, "Got a conversion with conversion data: %{public}u and priority: %{public}u.", conversionData, conversionPriority);
+        m_networkProcess->broadcastConsoleMessage(m_sessionID, MessageSource::AdClickAttribution, MessageLevel::Info, makeString("[Ad Click Attribution] Got a conversion with conversion data: '"_s, conversionData, "' and priority: '"_s, conversionPriority, "'."_s));
+    }
+
+    auto secondsUntilSend = Seconds::infinity();
+
+    auto pair = std::make_pair(source, destination);
+    auto previouslyUnconvertedAttribution = m_unconvertedAdClickAttributionMap.take(pair);
+    auto previouslyConvertedAttributionIter = m_convertedAdClickAttributionMap.find(pair);
+
+    if (!previouslyUnconvertedAttribution.isEmpty()) {
+        // Always convert the pending attribution and remove it from the unconverted map.
+        if (auto optionalSecondsUntilSend = previouslyUnconvertedAttribution.convertAndGetEarliestTimeToSend(WTFMove(conversion))) {
+            secondsUntilSend = *optionalSecondsUntilSend;
+            ASSERT(secondsUntilSend != Seconds::infinity());
+
+            if (UNLIKELY(debugModeEnabled())) {
+                RELEASE_LOG_INFO(AdClickAttribution, "Converted a stored ad click with conversion data: %{public}u and priority: %{public}u.", conversionData, conversionPriority);
+                m_networkProcess->broadcastConsoleMessage(m_sessionID, MessageSource::AdClickAttribution, MessageLevel::Info, makeString("[Ad Click Attribution] Converted a stored ad click with conversion data: '"_s, conversionData, "' and priority: '"_s, conversionPriority, "'."_s));
+            }
+        }
+
+        if (previouslyConvertedAttributionIter == m_convertedAdClickAttributionMap.end())
+            m_convertedAdClickAttributionMap.add(pair, WTFMove(previouslyUnconvertedAttribution));
+        else if (previouslyUnconvertedAttribution.hasHigherPriorityThan(previouslyConvertedAttributionIter->value)) {
+            // If the newly converted attribution has higher priority, replace the old one.
+            m_convertedAdClickAttributionMap.set(pair, WTFMove(previouslyUnconvertedAttribution));
+
+            if (UNLIKELY(debugModeEnabled())) {
+                RELEASE_LOG_INFO(AdClickAttribution, "Replaced a previously converted ad click with a new one with conversion data: %{public}u and priority: %{public}u because it had higher priority.", conversionData, conversionPriority);
+                m_networkProcess->broadcastConsoleMessage(m_sessionID, MessageSource::AdClickAttribution, MessageLevel::Info, makeString("[Ad Click Attribution] Replaced a previously converted ad click with a new one with conversion data: '"_s, conversionData, "' and priority: '"_s, conversionPriority, "' because it had higher priority."_s));
+            }
+        }
+    } else if (previouslyConvertedAttributionIter != m_convertedAdClickAttributionMap.end()) {
+        // If we have no newly converted attribution, re-convert the old one to respect the new priority.
+        if (auto optionalSecondsUntilSend = previouslyConvertedAttributionIter->value.convertAndGetEarliestTimeToSend(WTFMove(conversion))) {
+            secondsUntilSend = *optionalSecondsUntilSend;
+            ASSERT(secondsUntilSend != Seconds::infinity());
+
+            if (UNLIKELY(debugModeEnabled())) {
+                RELEASE_LOG_INFO(AdClickAttribution, "Re-converted an ad click with a new one with conversion data: %{public}u and priority: %{public}u because it had higher priority.", conversionData, conversionPriority);
+                m_networkProcess->broadcastConsoleMessage(m_sessionID, MessageSource::AdClickAttribution, MessageLevel::Info, makeString("[Ad Click Attribution] Re-converted an ad click with a new one with conversion data: '"_s, conversionData, "' and priority: '"_s, conversionPriority, "'' because it had higher priority."_s));
+            }
+        }
+    }
+
+    if (secondsUntilSend == Seconds::infinity())
+        return;
+    
+    if (m_firePendingConversionRequestsTimer.isActive() && m_firePendingConversionRequestsTimer.nextFireInterval() < secondsUntilSend)
+        return;
+
+    if (UNLIKELY(debugModeEnabled())) {
+        RELEASE_LOG_INFO(AdClickAttribution, "Setting timer for firing conversion requests to the debug mode timeout of %{public}f seconds where the regular timeout would have been %{public}f seconds.", debugModeSecondsUntilSend.seconds(), secondsUntilSend.seconds());
+        m_networkProcess->broadcastConsoleMessage(m_sessionID, MessageSource::AdClickAttribution, MessageLevel::Info, makeString("[Ad Click Attribution] Setting timer for firing conversion requests to the debug mode timeout of "_s, debugModeSecondsUntilSend.seconds(), " seconds where the regular timeout would have been "_s, secondsUntilSend.seconds(), " seconds."_s));
+        secondsUntilSend = debugModeSecondsUntilSend;
+    }
+
+    startTimer(secondsUntilSend);
+}
+
+void AdClickAttributionManager::fireConversionRequest(const AdClickAttribution& attribution)
+{
+    auto conversionURL = m_conversionBaseURLForTesting ? *m_conversionBaseURLForTesting : attribution.reportURL();
+    if (conversionURL.isEmpty() || !conversionURL.isValid())
+        return;
+
+    ResourceRequest request { WTFMove(conversionURL) };
+    
+    request.setHTTPMethod("POST"_s);
+    request.setHTTPHeaderField(HTTPHeaderName::CacheControl, WebCore::HTTPHeaderValues::maxAge0());
+
+    request.setHTTPContentType(WebCore::HTTPHeaderValues::applicationJSONContentType());
+    request.setHTTPBody(WebCore::FormData::create(attribution.json()->toJSONString().utf8().data()));
+
+    FetchOptions options;
+    options.credentials = FetchOptions::Credentials::Omit;
+    options.redirect = FetchOptions::Redirect::Error;
+
+    static uint64_t identifier = 0;
+    
+    NetworkResourceLoadParameters loadParameters;
+    loadParameters.identifier = ++identifier;
+    loadParameters.request = request;
+    loadParameters.parentPID = presentingApplicationPID();
+    loadParameters.storedCredentialsPolicy = StoredCredentialsPolicy::EphemeralStateless;
+    loadParameters.options = options;
+    loadParameters.shouldClearReferrerOnHTTPSToHTTPRedirect = true;
+    loadParameters.shouldRestrictHTTPResponseAccess = false;
+
+    if (UNLIKELY(debugModeEnabled())) {
+        RELEASE_LOG_INFO(AdClickAttribution, "About to fire an attribution request for a conversion.");
+        m_networkProcess->broadcastConsoleMessage(m_sessionID, MessageSource::AdClickAttribution, MessageLevel::Error, "[Ad Click Attribution] About to fire an attribution request for a conversion."_s);
+    }
+
+    m_pingLoadFunction(WTFMove(loadParameters), [weakThis = makeWeakPtr(*this)](const WebCore::ResourceError& error, const WebCore::ResourceResponse& response) {
+        if (!weakThis)
+            return;
+
+        if (UNLIKELY(weakThis->debugModeEnabled())) {
+            if (!error.isNull()) {
+#if PLATFORM(COCOA)
+                RELEASE_LOG_ERROR(AdClickAttribution, "Received error: '%{public}s' for ad click attribution request.", error.localizedDescription().utf8().data());
+#else
+                RELEASE_LOG_ERROR(AdClickAttribution, "Received error: '%s' for ad click attribution request.", error.localizedDescription().utf8().data());
+#endif
+                weakThis->m_networkProcess->broadcastConsoleMessage(weakThis->m_sessionID, MessageSource::AdClickAttribution, MessageLevel::Error, makeString("[Ad Click Attribution] Received error: '"_s, error.localizedDescription(), "' for ad click attribution request."_s));
+            }
+        }
+    });
+}
+
+void AdClickAttributionManager::firePendingConversionRequests()
+{
+    auto nextTimeToFire = Seconds::infinity();
+    for (auto& attribution : m_convertedAdClickAttributionMap.values()) {
+        if (attribution.wasConversionSent()) {
+            ASSERT_NOT_REACHED();
+            continue;
+        }
+        auto earliestTimeToSend = attribution.earliestTimeToSend();
+        if (!earliestTimeToSend) {
+            ASSERT_NOT_REACHED();
+            continue;
+        }
+
+        auto now = WallTime::now();
+        if (*earliestTimeToSend <= now || m_isRunningTest || debugModeEnabled()) {
+            fireConversionRequest(attribution);
+            attribution.markConversionAsSent();
+            continue;
+        }
+
+        auto seconds = *earliestTimeToSend - now;
+        nextTimeToFire = std::min(nextTimeToFire, seconds);
+    }
+
+    m_convertedAdClickAttributionMap.removeIf([](auto& keyAndValue) {
+        return keyAndValue.value.wasConversionSent();
+    });
+
+    if (nextTimeToFire < Seconds::infinity())
+        startTimer(nextTimeToFire);
+}
+
+void AdClickAttributionManager::clear()
+{
+    m_firePendingConversionRequestsTimer.stop();
+    m_unconvertedAdClickAttributionMap.clear();
+    m_convertedAdClickAttributionMap.clear();
+}
+
+void AdClickAttributionManager::clearForRegistrableDomain(const RegistrableDomain& domain)
+{
+    m_unconvertedAdClickAttributionMap.removeIf([&domain](auto& keyAndValue) {
+        return keyAndValue.key.first.registrableDomain == domain || keyAndValue.key.second.registrableDomain == domain;
+    });
+
+    m_convertedAdClickAttributionMap.removeIf([&domain](auto& keyAndValue) {
+        return keyAndValue.key.first.registrableDomain == domain || keyAndValue.key.second.registrableDomain == domain;
+    });
+}
+
+void AdClickAttributionManager::clearExpired()
+{
+    m_unconvertedAdClickAttributionMap.removeIf([](auto& keyAndValue) {
+        return keyAndValue.value.hasExpired();
+    });
+}
+
+void AdClickAttributionManager::toString(CompletionHandler<void(String)>&& completionHandler) const
+{
+    if (m_unconvertedAdClickAttributionMap.isEmpty() && m_convertedAdClickAttributionMap.isEmpty())
+        return completionHandler("\nNo stored Ad Click Attribution data.\n"_s);
+
+    unsigned unconvertedAttributionNumber = 0;
+    StringBuilder builder;
+    for (auto& attribution : m_unconvertedAdClickAttributionMap.values()) {
+        if (!unconvertedAttributionNumber)
+            builder.appendLiteral("Unconverted Ad Click Attributions:\n");
+        else
+            builder.append('\n');
+        builder.appendLiteral("WebCore::AdClickAttribution ");
+        builder.appendNumber(++unconvertedAttributionNumber);
+        builder.append('\n');
+        builder.append(attribution.toString());
+}
+
+    unsigned convertedAttributionNumber = 0;
+    for (auto& attribution : m_convertedAdClickAttributionMap.values()) {
+        if (unconvertedAttributionNumber)
+            builder.append('\n');
+        if (!convertedAttributionNumber)
+            builder.appendLiteral("Converted Ad Click Attributions:\n");
+        else
+            builder.append('\n');
+        builder.appendLiteral("WebCore::AdClickAttribution ");
+        builder.appendNumber(++convertedAttributionNumber + unconvertedAttributionNumber);
+        builder.append('\n');
+        builder.append(attribution.toString());
+    }
+
+    completionHandler(builder.toString());
+}
+
+void AdClickAttributionManager::setConversionURLForTesting(URL&& testURL)
+{
+    if (testURL.isEmpty())
+        m_conversionBaseURLForTesting = { };
+    else
+        m_conversionBaseURLForTesting = WTFMove(testURL);
+}
+
+void AdClickAttributionManager::markAllUnconvertedAsExpiredForTesting()
+{
+    for (auto& attribution : m_unconvertedAdClickAttributionMap.values())
+        attribution.markAsExpired();
+}
+
+bool AdClickAttributionManager::debugModeEnabled() const
+{
+    return RuntimeEnabledFeatures::sharedFeatures().adClickAttributionDebugModeEnabled() && !m_sessionID.isEphemeral();
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessAdClickAttributionManagerhfromrev269670trunkSourceWebKitNetworkProcessPrivateClickMeasurementManagerh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit/NetworkProcess/AdClickAttributionManager.h (from rev 269670, trunk/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.h) (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/AdClickAttributionManager.h                           (rev 0)
+++ trunk/Source/WebKit/NetworkProcess/AdClickAttributionManager.h      2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,92 @@
</span><ins>+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "NetworkProcess.h"
+#include "NetworkResourceLoadParameters.h"
+#include <WebCore/AdClickAttribution.h>
+#include <WebCore/RegistrableDomain.h>
+#include <WebCore/ResourceError.h>
+#include <WebCore/ResourceResponse.h>
+#include <WebCore/Timer.h>
+#include <pal/SessionID.h>
+#include <wtf/CompletionHandler.h>
+#include <wtf/HashMap.h>
+#include <wtf/WeakPtr.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebKit {
+
+class AdClickAttributionManager : public CanMakeWeakPtr<AdClickAttributionManager> {
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+
+    using RegistrableDomain = WebCore::RegistrableDomain;
+    using AdClickAttribution = WebCore::AdClickAttribution;
+    using Source = WebCore::AdClickAttribution::Source;
+    using Destination = WebCore::AdClickAttribution::Destination;
+    using Conversion = WebCore::AdClickAttribution::Conversion;
+
+    explicit AdClickAttributionManager(NetworkProcess& networkProcess, PAL::SessionID sessionID)
+        : m_firePendingConversionRequestsTimer(*this, &AdClickAttributionManager::firePendingConversionRequests)
+        , m_pingLoadFunction([](NetworkResourceLoadParameters&& params, CompletionHandler<void(const WebCore::ResourceError&, const WebCore::ResourceResponse&)>&& completionHandler) {
+            UNUSED_PARAM(params);
+            completionHandler(WebCore::ResourceError(), WebCore::ResourceResponse());
+        })
+        , m_networkProcess(networkProcess)
+        , m_sessionID(sessionID)
+    {
+    }
+
+    void storeUnconverted(AdClickAttribution&&);
+    void handleConversion(Conversion&&, const URL& requestURL, const WebCore::ResourceRequest& redirectRequest);
+    void clear();
+    void clearForRegistrableDomain(const RegistrableDomain&);
+    void toString(CompletionHandler<void(String)>&&) const;
+    void setPingLoadFunction(Function<void(NetworkResourceLoadParameters&&, CompletionHandler<void(const WebCore::ResourceError&, const WebCore::ResourceResponse&)>&&)>&& pingLoadFunction) { m_pingLoadFunction = WTFMove(pingLoadFunction); }
+    void setOverrideTimerForTesting(bool value) { m_isRunningTest = value; }
+    void setConversionURLForTesting(URL&&);
+    void markAllUnconvertedAsExpiredForTesting();
+
+private:
+    void startTimer(Seconds);
+    void convert(const Source&, const Destination&, Conversion&&);
+    void fireConversionRequest(const AdClickAttribution&);
+    void firePendingConversionRequests();
+    void clearExpired();
+    bool debugModeEnabled() const;
+
+    HashMap<std::pair<Source, Destination>, AdClickAttribution> m_unconvertedAdClickAttributionMap;
+    HashMap<std::pair<Source, Destination>, AdClickAttribution> m_convertedAdClickAttributionMap;
+    WebCore::Timer m_firePendingConversionRequestsTimer;
+    Function<void(NetworkResourceLoadParameters&&, CompletionHandler<void(const WebCore::ResourceError&, const WebCore::ResourceResponse&)>&&)> m_pingLoadFunction;
+    bool m_isRunningTest { false };
+    Optional<URL> m_conversionBaseURLForTesting;
+    Ref<NetworkProcess> m_networkProcess;
+    PAL::SessionID m_sessionID;
+};
+    
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessNetworkProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp    2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -330,7 +330,7 @@
</span><span class="cx"> 
</span><span class="cx">     setCacheModel(parameters.cacheModel);
</span><span class="cx"> 
</span><del>-    setPrivateClickMeasurementDebugMode(parameters.enablePrivateClickMeasurementDebugMode);
</del><ins>+    setAdClickAttributionDebugMode(parameters.enableAdClickAttributionDebugMode);
</ins><span class="cx"> 
</span><span class="cx">     for (auto& supplement : m_supplements.values())
</span><span class="cx">         supplement->initialize(parameters);
</span><span class="lines">@@ -1313,18 +1313,18 @@
</span><span class="cx"> }
</span><span class="cx"> #endif // ENABLE(RESOURCE_LOAD_STATISTICS)
</span><span class="cx"> 
</span><del>-void NetworkProcess::setPrivateClickMeasurementDebugMode(bool debugMode)
</del><ins>+void NetworkProcess::setAdClickAttributionDebugMode(bool debugMode)
</ins><span class="cx"> {
</span><del>-    if (RuntimeEnabledFeatures::sharedFeatures().privateClickMeasurementDebugModeEnabled() == debugMode)
</del><ins>+    if (RuntimeEnabledFeatures::sharedFeatures().adClickAttributionDebugModeEnabled() == debugMode)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    RuntimeEnabledFeatures::sharedFeatures().setPrivateClickMeasurementDebugModeEnabled(debugMode);
</del><ins>+    RuntimeEnabledFeatures::sharedFeatures().setAdClickAttributionDebugModeEnabled(debugMode);
</ins><span class="cx"> 
</span><del>-    String message = debugMode ? "[Private Click Measurement] Turned Debug Mode on."_s : "[Private Click Measurement] Turned Debug Mode off."_s;
</del><ins>+    String message = debugMode ? "[Ad Click Attribution] Turned Debug Mode on."_s : "[Ad Click Attribution] Turned Debug Mode off."_s;
</ins><span class="cx">     for (auto& networkConnectionToWebProcess : m_webProcessConnections.values()) {
</span><span class="cx">         if (networkConnectionToWebProcess->sessionID().isEphemeral())
</span><span class="cx">             continue;
</span><del>-        networkConnectionToWebProcess->broadcastConsoleMessage(MessageSource::PrivateClickMeasurement, MessageLevel::Info, message);
</del><ins>+        networkConnectionToWebProcess->broadcastConsoleMessage(MessageSource::AdClickAttribution, MessageLevel::Info, message);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1583,9 +1583,9 @@
</span><span class="cx">     if (websiteDataTypes.contains(WebsiteDataType::DiskCache) && !sessionID.isEphemeral())
</span><span class="cx">         clearDiskCache(modifiedSince, [clearTasksHandler = WTFMove(clearTasksHandler)] { });
</span><span class="cx"> 
</span><del>-    if (websiteDataTypes.contains(WebsiteDataType::PrivateClickMeasurements)) {
</del><ins>+    if (websiteDataTypes.contains(WebsiteDataType::AdClickAttributions)) {
</ins><span class="cx">         if (auto* networkSession = this->networkSession(sessionID))
</span><del>-            networkSession->clearPrivateClickMeasurement();
</del><ins>+            networkSession->clearAdClickAttribution();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> #if HAVE(CFNETWORK_ALTERNATIVE_SERVICE)
</span><span class="lines">@@ -1644,10 +1644,10 @@
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    if (websiteDataTypes.contains(WebsiteDataType::PrivateClickMeasurements)) {
</del><ins>+    if (websiteDataTypes.contains(WebsiteDataType::AdClickAttributions)) {
</ins><span class="cx">         if (auto* networkSession = this->networkSession(sessionID)) {
</span><span class="cx">             for (auto& originData : originDatas)
</span><del>-                networkSession->clearPrivateClickMeasurementForRegistrableDomain(RegistrableDomain::uncheckedCreateFromHost(originData.host));
</del><ins>+                networkSession->clearAdClickAttributionForRegistrableDomain(RegistrableDomain::uncheckedCreateFromHost(originData.host));
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="lines">@@ -2532,48 +2532,48 @@
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void NetworkProcess::storePrivateClickMeasurement(PAL::SessionID sessionID, WebCore::PrivateClickMeasurement&& privateClickMeasurement)
</del><ins>+void NetworkProcess::storeAdClickAttribution(PAL::SessionID sessionID, WebCore::AdClickAttribution&& adClickAttribution)
</ins><span class="cx"> {
</span><span class="cx">     if (auto* session = networkSession(sessionID))
</span><del>-        session->storePrivateClickMeasurement(WTFMove(privateClickMeasurement));
</del><ins>+        session->storeAdClickAttribution(WTFMove(adClickAttribution));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkProcess::dumpPrivateClickMeasurement(PAL::SessionID sessionID, CompletionHandler<void(String)>&& completionHandler)
</del><ins>+void NetworkProcess::dumpAdClickAttribution(PAL::SessionID sessionID, CompletionHandler<void(String)>&& completionHandler)
</ins><span class="cx"> {
</span><span class="cx">     if (auto* session = networkSession(sessionID))
</span><del>-        return session->dumpPrivateClickMeasurement(WTFMove(completionHandler));
</del><ins>+        return session->dumpAdClickAttribution(WTFMove(completionHandler));
</ins><span class="cx"> 
</span><span class="cx">     completionHandler({ });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkProcess::clearPrivateClickMeasurement(PAL::SessionID sessionID, CompletionHandler<void()>&& completionHandler)
</del><ins>+void NetworkProcess::clearAdClickAttribution(PAL::SessionID sessionID, CompletionHandler<void()>&& completionHandler)
</ins><span class="cx"> {
</span><span class="cx">     if (auto* session = networkSession(sessionID))
</span><del>-        session->clearPrivateClickMeasurement();
</del><ins>+        session->clearAdClickAttribution();
</ins><span class="cx">     
</span><span class="cx">     completionHandler();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkProcess::setPrivateClickMeasurementOverrideTimerForTesting(PAL::SessionID sessionID, bool value, CompletionHandler<void()>&& completionHandler)
</del><ins>+void NetworkProcess::setAdClickAttributionOverrideTimerForTesting(PAL::SessionID sessionID, bool value, CompletionHandler<void()>&& completionHandler)
</ins><span class="cx"> {
</span><span class="cx">     if (auto* session = networkSession(sessionID))
</span><del>-        session->setPrivateClickMeasurementOverrideTimerForTesting(value);
</del><ins>+        session->setAdClickAttributionOverrideTimerForTesting(value);
</ins><span class="cx">     
</span><span class="cx">     completionHandler();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkProcess::setPrivateClickMeasurementConversionURLForTesting(PAL::SessionID sessionID, URL&& url, CompletionHandler<void()>&& completionHandler)
</del><ins>+void NetworkProcess::setAdClickAttributionConversionURLForTesting(PAL::SessionID sessionID, URL&& url, CompletionHandler<void()>&& completionHandler)
</ins><span class="cx"> {
</span><span class="cx">     if (auto* session = networkSession(sessionID))
</span><del>-        session->setPrivateClickMeasurementConversionURLForTesting(WTFMove(url));
</del><ins>+        session->setAdClickAttributionConversionURLForTesting(WTFMove(url));
</ins><span class="cx">     
</span><span class="cx">     completionHandler();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkProcess::markPrivateClickMeasurementsAsExpiredForTesting(PAL::SessionID sessionID, CompletionHandler<void()>&& completionHandler)
</del><ins>+void NetworkProcess::markAdClickAttributionsAsExpiredForTesting(PAL::SessionID sessionID, CompletionHandler<void()>&& completionHandler)
</ins><span class="cx"> {
</span><span class="cx">     if (auto* session = networkSession(sessionID))
</span><del>-        session->markPrivateClickMeasurementsAsExpiredForTesting();
</del><ins>+        session->markAdClickAttributionsAsExpiredForTesting();
</ins><span class="cx"> 
</span><span class="cx">     completionHandler();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessNetworkProcessh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.h      2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.h 2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -39,6 +39,7 @@
</span><span class="cx"> #include "WebResourceLoadStatisticsStore.h"
</span><span class="cx"> #include "WebsiteData.h"
</span><span class="cx"> #include <JavaScriptCore/ConsoleTypes.h>
</span><ins>+#include <WebCore/AdClickAttribution.h>
</ins><span class="cx"> #include <WebCore/ClientOrigin.h>
</span><span class="cx"> #include <WebCore/CrossSiteNavigationDataTransfer.h>
</span><span class="cx"> #include <WebCore/DiagnosticLoggingClient.h>
</span><span class="lines">@@ -46,7 +47,6 @@
</span><span class="cx"> #include <WebCore/IDBKeyData.h>
</span><span class="cx"> #include <WebCore/MessagePortChannelRegistry.h>
</span><span class="cx"> #include <WebCore/PageIdentifier.h>
</span><del>-#include <WebCore/PrivateClickMeasurement.h>
</del><span class="cx"> #include <WebCore/RegistrableDomain.h>
</span><span class="cx"> #include <WebCore/ServiceWorkerIdentifier.h>
</span><span class="cx"> #include <WebCore/ServiceWorkerTypes.h>
</span><span class="lines">@@ -275,7 +275,7 @@
</span><span class="cx">     void setThirdPartyCNAMEDomainForTesting(PAL::SessionID, WebCore::RegistrableDomain&&, CompletionHandler<void()>&&);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    void setPrivateClickMeasurementDebugMode(bool);
</del><ins>+    void setAdClickAttributionDebugMode(bool);
</ins><span class="cx"> 
</span><span class="cx">     using CacheStorageRootPathCallback = CompletionHandler<void(String&&)>;
</span><span class="cx">     void cacheStorageRootPath(PAL::SessionID, CacheStorageRootPathCallback&&);
</span><span class="lines">@@ -332,12 +332,12 @@
</span><span class="cx">     void removeCacheEngine(const PAL::SessionID&);
</span><span class="cx">     void requestStorageSpace(PAL::SessionID, const WebCore::ClientOrigin&, uint64_t quota, uint64_t currentSize, uint64_t spaceRequired, CompletionHandler<void(Optional<uint64_t>)>&&);
</span><span class="cx"> 
</span><del>-    void storePrivateClickMeasurement(PAL::SessionID, WebCore::PrivateClickMeasurement&&);
-    void dumpPrivateClickMeasurement(PAL::SessionID, CompletionHandler<void(String)>&&);
-    void clearPrivateClickMeasurement(PAL::SessionID, CompletionHandler<void()>&&);
-    void setPrivateClickMeasurementOverrideTimerForTesting(PAL::SessionID, bool value, CompletionHandler<void()>&&);
-    void setPrivateClickMeasurementConversionURLForTesting(PAL::SessionID, URL&&, CompletionHandler<void()>&&);
-    void markPrivateClickMeasurementsAsExpiredForTesting(PAL::SessionID, CompletionHandler<void()>&&);
</del><ins>+    void storeAdClickAttribution(PAL::SessionID, WebCore::AdClickAttribution&&);
+    void dumpAdClickAttribution(PAL::SessionID, CompletionHandler<void(String)>&&);
+    void clearAdClickAttribution(PAL::SessionID, CompletionHandler<void()>&&);
+    void setAdClickAttributionOverrideTimerForTesting(PAL::SessionID, bool value, CompletionHandler<void()>&&);
+    void setAdClickAttributionConversionURLForTesting(PAL::SessionID, URL&&, CompletionHandler<void()>&&);
+    void markAdClickAttributionsAsExpiredForTesting(PAL::SessionID, CompletionHandler<void()>&&);
</ins><span class="cx"> 
</span><span class="cx">     RefPtr<WebCore::StorageQuotaManager> storageQuotaManager(PAL::SessionID, const WebCore::ClientOrigin&);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessNetworkProcessmessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.messages.in (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.messages.in    2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.messages.in       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -148,7 +148,7 @@
</span><span class="cx">     SetThirdPartyCNAMEDomainForTesting(PAL::SessionID sessionID, WebCore::RegistrableDomain domain) -> () Async
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    SetPrivateClickMeasurementDebugMode(bool debugMode)
</del><ins>+    SetAdClickAttributionDebugMode(bool debugMode)
</ins><span class="cx"> 
</span><span class="cx">     SetSessionIsControlledByAutomation(PAL::SessionID sessionID, bool controlled);
</span><span class="cx"> 
</span><span class="lines">@@ -161,12 +161,12 @@
</span><span class="cx"> 
</span><span class="cx">     SyncLocalStorage() -> () Async
</span><span class="cx"> 
</span><del>-    StorePrivateClickMeasurement(PAL::SessionID sessionID, WebCore::PrivateClickMeasurement privateClickMeasurement)
-    DumpPrivateClickMeasurement(PAL::SessionID sessionID) -> (String privateClickMeasurementState) Async
-    ClearPrivateClickMeasurement(PAL::SessionID sessionID) -> () Async
-    SetPrivateClickMeasurementOverrideTimerForTesting(PAL::SessionID sessionID, bool value) -> () Async
-    SetPrivateClickMeasurementConversionURLForTesting(PAL::SessionID sessionID, URL url) -> () Async
-    MarkPrivateClickMeasurementsAsExpiredForTesting(PAL::SessionID sessionID) -> () Async
</del><ins>+    StoreAdClickAttribution(PAL::SessionID sessionID, WebCore::AdClickAttribution adClickAttribution)
+    DumpAdClickAttribution(PAL::SessionID sessionID) -> (String adClickAttributionState) Async
+    ClearAdClickAttribution(PAL::SessionID sessionID) -> () Async
+    SetAdClickAttributionOverrideTimerForTesting(PAL::SessionID sessionID, bool value) -> () Async
+    SetAdClickAttributionConversionURLForTesting(PAL::SessionID sessionID, URL url) -> () Async
+    MarkAdClickAttributionsAsExpiredForTesting(PAL::SessionID sessionID) -> () Async
</ins><span class="cx">     GetLocalStorageOriginDetails(PAL::SessionID sessionID) -> (Vector<WebKit::LocalStorageDatabaseTracker::OriginDetails> details) Async
</span><span class="cx"> 
</span><span class="cx">     SetServiceWorkerFetchTimeoutForTesting(Seconds seconds) -> () Synchronous
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessNetworkProcessCreationParameterscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp  2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp     2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx">     encoder << urlSchemesRegisteredAsLocal;
</span><span class="cx">     encoder << urlSchemesRegisteredAsNoAccess;
</span><span class="cx"> 
</span><del>-    encoder << enablePrivateClickMeasurementDebugMode;
</del><ins>+    encoder << enableAdClickAttributionDebugMode;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool NetworkProcessCreationParameters::decode(IPC::Decoder& decoder, NetworkProcessCreationParameters& result)
</span><span class="lines">@@ -125,7 +125,7 @@
</span><span class="cx">     if (!decoder.decode(result.urlSchemesRegisteredAsNoAccess))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    if (!decoder.decode(result.enablePrivateClickMeasurementDebugMode))
</del><ins>+    if (!decoder.decode(result.enableAdClickAttributionDebugMode))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     return true;
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessNetworkProcessCreationParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h    2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx">     Vector<String> urlSchemesRegisteredAsLocal;
</span><span class="cx">     Vector<String> urlSchemesRegisteredAsNoAccess;
</span><span class="cx"> 
</span><del>-    bool enablePrivateClickMeasurementDebugMode { false };
</del><ins>+    bool enableAdClickAttributionDebugMode { false };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessNetworkResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp     2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp        2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -814,12 +814,12 @@
</span><span class="cx">     ++m_redirectCount;
</span><span class="cx">     m_redirectResponse = redirectResponse;
</span><span class="cx"> 
</span><del>-    Optional<PrivateClickMeasurement::Conversion> privateClickMeasurementConversion;
</del><ins>+    Optional<AdClickAttribution::Conversion> adClickConversion;
</ins><span class="cx">     if (!sessionID().isEphemeral()) {
</span><del>-        if (auto result = PrivateClickMeasurement::parseConversionRequest(redirectRequest.url()))
-            privateClickMeasurementConversion = result.value();
</del><ins>+        if (auto result = AdClickAttribution::parseConversionRequest(redirectRequest.url()))
+            adClickConversion = result.value();
</ins><span class="cx">         else if (!result.error().isEmpty())
</span><del>-            addConsoleMessage(MessageSource::PrivateClickMeasurement, MessageLevel::Error, result.error());
</del><ins>+            addConsoleMessage(MessageSource::AdClickAttribution, MessageLevel::Error, result.error());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     auto maxAgeCap = validateCacheEntryForMaxAgeCapValidation(request, redirectRequest, redirectResponse);
</span><span class="lines">@@ -827,12 +827,12 @@
</span><span class="cx">         m_cache->storeRedirect(request, redirectResponse, redirectRequest, maxAgeCap);
</span><span class="cx"> 
</span><span class="cx">     if (m_networkLoadChecker) {
</span><del>-        if (privateClickMeasurementConversion)
</del><ins>+        if (adClickConversion)
</ins><span class="cx">             m_networkLoadChecker->enableContentExtensionsCheck();
</span><span class="cx">         m_networkLoadChecker->storeRedirectionIfNeeded(request, redirectResponse);
</span><span class="cx"> 
</span><span class="cx">         RELEASE_LOG_IF_ALLOWED("willSendRedirectedRequest: Checking redirect using NetworkLoadChecker");
</span><del>-        m_networkLoadChecker->checkRedirection(WTFMove(request), WTFMove(redirectRequest), WTFMove(redirectResponse), this, [protectedThis = makeRef(*this), this, storedCredentialsPolicy = m_networkLoadChecker->storedCredentialsPolicy(), privateClickMeasurementConversion = WTFMove(privateClickMeasurementConversion)](auto&& result) mutable {
</del><ins>+        m_networkLoadChecker->checkRedirection(WTFMove(request), WTFMove(redirectRequest), WTFMove(redirectResponse), this, [protectedThis = makeRef(*this), this, storedCredentialsPolicy = m_networkLoadChecker->storedCredentialsPolicy(), adClickConversion = WTFMove(adClickConversion)](auto&& result) mutable {
</ins><span class="cx">             if (!result.has_value()) {
</span><span class="cx">                 if (result.error().isCancellation()) {
</span><span class="cx">                     RELEASE_LOG_IF_ALLOWED("willSendRedirectedRequest: NetworkLoadChecker::checkRedirection returned with a cancellation");
</span><span class="lines">@@ -865,16 +865,16 @@
</span><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             m_shouldRestartLoad = storedCredentialsPolicy != m_networkLoadChecker->storedCredentialsPolicy();
</span><del>-            this->continueWillSendRedirectedRequest(WTFMove(result->request), WTFMove(result->redirectRequest), WTFMove(result->redirectResponse), WTFMove(privateClickMeasurementConversion));
</del><ins>+            this->continueWillSendRedirectedRequest(WTFMove(result->request), WTFMove(result->redirectRequest), WTFMove(result->redirectResponse), WTFMove(adClickConversion));
</ins><span class="cx">         });
</span><span class="cx">         return;
</span><span class="cx">     }
</span><del>-    continueWillSendRedirectedRequest(WTFMove(request), WTFMove(redirectRequest), WTFMove(redirectResponse), WTFMove(privateClickMeasurementConversion));
</del><ins>+    continueWillSendRedirectedRequest(WTFMove(request), WTFMove(redirectRequest), WTFMove(redirectResponse), WTFMove(adClickConversion));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkResourceLoader::continueWillSendRedirectedRequest(ResourceRequest&& request, ResourceRequest&& redirectRequest, ResourceResponse&& redirectResponse, Optional<PrivateClickMeasurement::Conversion>&& privateClickMeasurementConversion)
</del><ins>+void NetworkResourceLoader::continueWillSendRedirectedRequest(ResourceRequest&& request, ResourceRequest&& redirectRequest, ResourceResponse&& redirectResponse, Optional<AdClickAttribution::Conversion>&& adClickConversion)
</ins><span class="cx"> {
</span><del>-    RELEASE_LOG_IF_ALLOWED("continueWillSendRedirectedRequest: (m_isKeptAlive=%d, hasAdClickConversion=%d)", m_isKeptAlive, !!privateClickMeasurementConversion);
</del><ins>+    RELEASE_LOG_IF_ALLOWED("continueWillSendRedirectedRequest: (m_isKeptAlive=%d, hasAdClickConversion=%d)", m_isKeptAlive, !!adClickConversion);
</ins><span class="cx">     ASSERT(!isSynchronous());
</span><span class="cx"> 
</span><span class="cx">     if (m_isKeptAlive) {
</span><span class="lines">@@ -883,8 +883,8 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     NetworkSession* networkSession = nullptr;
</span><del>-    if (privateClickMeasurementConversion && (networkSession = m_connection->networkProcess().networkSession(sessionID())))
-        networkSession->handlePrivateClickMeasurementConversion(WTFMove(*privateClickMeasurementConversion), request.url(), redirectRequest);
</del><ins>+    if (adClickConversion && (networkSession = m_connection->networkProcess().networkSession(sessionID())))
+        networkSession->handleAdClickAttributionConversion(WTFMove(*adClickConversion), request.url(), redirectRequest);
</ins><span class="cx"> 
</span><span class="cx">     // We send the request body separately because the ResourceRequest body normally does not get encoded when sent over IPC, as an optimization.
</span><span class="cx">     // However, we really need the body here because a redirect cross-site may cause a process-swap and the request to start again in a new WebContent process.
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessNetworkResourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.h       2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.h  2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -33,9 +33,9 @@
</span><span class="cx"> #include "NetworkLoadClient.h"
</span><span class="cx"> #include "NetworkResourceLoadIdentifier.h"
</span><span class="cx"> #include "NetworkResourceLoadParameters.h"
</span><ins>+#include <WebCore/AdClickAttribution.h>
</ins><span class="cx"> #include <WebCore/ContentSecurityPolicyClient.h>
</span><span class="cx"> #include <WebCore/CrossOriginAccessControl.h>
</span><del>-#include <WebCore/PrivateClickMeasurement.h>
</del><span class="cx"> #include <WebCore/ResourceResponse.h>
</span><span class="cx"> #include <WebCore/SecurityPolicyViolationEvent.h>
</span><span class="cx"> #include <WebCore/Timer.h>
</span><span class="lines">@@ -191,7 +191,7 @@
</span><span class="cx">     void logCookieInformation() const;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    void continueWillSendRedirectedRequest(WebCore::ResourceRequest&&, WebCore::ResourceRequest&& redirectRequest, WebCore::ResourceResponse&&, Optional<WebCore::PrivateClickMeasurement::Conversion>&&);
</del><ins>+    void continueWillSendRedirectedRequest(WebCore::ResourceRequest&&, WebCore::ResourceRequest&& redirectRequest, WebCore::ResourceResponse&&, Optional<WebCore::AdClickAttribution::Conversion>&&);
</ins><span class="cx">     void didFinishWithRedirectResponse(WebCore::ResourceRequest&&, WebCore::ResourceRequest&& redirectRequest, WebCore::ResourceResponse&&);
</span><span class="cx">     WebCore::ResourceResponse sanitizeResponseIfPossible(WebCore::ResourceResponse&&, WebCore::ResourceResponse::SanitizationType);
</span><span class="cx"> 
</span><span class="lines">@@ -202,7 +202,7 @@
</span><span class="cx"> 
</span><span class="cx">     void logSlowCacheRetrieveIfNeeded(const NetworkCache::Cache::RetrieveInfo&);
</span><span class="cx"> 
</span><del>-    void handlePrivateClickMeasurementConversion(WebCore::PrivateClickMeasurement::Conversion&&, const URL&, const WebCore::ResourceRequest&);
</del><ins>+    void handleAdClickAttributionConversion(WebCore::AdClickAttribution::Conversion&&, const URL&, const WebCore::ResourceRequest&);
</ins><span class="cx"> 
</span><span class="cx">     Optional<Seconds> validateCacheEntryForMaxAgeCapValidation(const WebCore::ResourceRequest&, const WebCore::ResourceRequest& redirectRequest, const WebCore::ResourceResponse&);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessNetworkSessioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/NetworkSession.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/NetworkSession.cpp    2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/NetworkProcess/NetworkSession.cpp       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "NetworkSession.h"
</span><span class="cx"> 
</span><ins>+#include "AdClickAttributionManager.h"
</ins><span class="cx"> #include "Logging.h"
</span><span class="cx"> #include "NetworkProcess.h"
</span><span class="cx"> #include "NetworkProcessProxyMessages.h"
</span><span class="lines">@@ -33,11 +34,11 @@
</span><span class="cx"> #include "NetworkResourceLoader.h"
</span><span class="cx"> #include "NetworkSessionCreationParameters.h"
</span><span class="cx"> #include "PingLoad.h"
</span><del>-#include "PrivateClickMeasurementManager.h"
</del><span class="cx"> #include "WebPageProxy.h"
</span><span class="cx"> #include "WebPageProxyMessages.h"
</span><span class="cx"> #include "WebProcessProxy.h"
</span><span class="cx"> #include "WebSocketTask.h"
</span><ins>+#include <WebCore/AdClickAttribution.h>
</ins><span class="cx"> #include <WebCore/CookieJar.h>
</span><span class="cx"> #include <WebCore/ResourceRequest.h>
</span><span class="cx"> 
</span><span class="lines">@@ -90,7 +91,7 @@
</span><span class="cx">     , m_firstPartyWebsiteDataRemovalMode(parameters.resourceLoadStatisticsParameters.firstPartyWebsiteDataRemovalMode)
</span><span class="cx">     , m_standaloneApplicationDomain(parameters.resourceLoadStatisticsParameters.standaloneApplicationDomain)
</span><span class="cx"> #endif
</span><del>-    , m_privateClickMeasurement(makeUniqueRef<PrivateClickMeasurementManager>(networkProcess, parameters.sessionID))
</del><ins>+    , m_adClickAttribution(makeUniqueRef<AdClickAttributionManager>(networkProcess, parameters.sessionID))
</ins><span class="cx">     , m_testSpeedMultiplier(parameters.testSpeedMultiplier)
</span><span class="cx">     , m_allowsServerPreconnect(parameters.allowsServerPreconnect)
</span><span class="cx"> {
</span><span class="lines">@@ -119,7 +120,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_isStaleWhileRevalidateEnabled = parameters.staleWhileRevalidateEnabled;
</span><span class="cx"> 
</span><del>-    m_privateClickMeasurement->setPingLoadFunction([this, weakThis = makeWeakPtr(this)](NetworkResourceLoadParameters&& loadParameters, CompletionHandler<void(const WebCore::ResourceError&, const WebCore::ResourceResponse&)>&& completionHandler) {
</del><ins>+    m_adClickAttribution->setPingLoadFunction([this, weakThis = makeWeakPtr(this)](NetworkResourceLoadParameters&& loadParameters, CompletionHandler<void(const WebCore::ResourceError&, const WebCore::ResourceResponse&)>&& completionHandler) {
</ins><span class="cx">         if (!weakThis)
</span><span class="cx">             return;
</span><span class="cx">         // PingLoad manages its own lifetime, deleting itself when its purpose has been fulfilled.
</span><span class="lines">@@ -303,44 +304,44 @@
</span><span class="cx"> }
</span><span class="cx"> #endif // ENABLE(RESOURCE_LOAD_STATISTICS)
</span><span class="cx"> 
</span><del>-void NetworkSession::storePrivateClickMeasurement(WebCore::PrivateClickMeasurement&& privateClickMeasurement)
</del><ins>+void NetworkSession::storeAdClickAttribution(WebCore::AdClickAttribution&& adClickAttribution)
</ins><span class="cx"> {
</span><del>-    m_privateClickMeasurement->storeUnconverted(WTFMove(privateClickMeasurement));
</del><ins>+    m_adClickAttribution->storeUnconverted(WTFMove(adClickAttribution));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkSession::handlePrivateClickMeasurementConversion(PrivateClickMeasurement::Conversion&& conversion, const URL& requestURL, const WebCore::ResourceRequest& redirectRequest)
</del><ins>+void NetworkSession::handleAdClickAttributionConversion(AdClickAttribution::Conversion&& conversion, const URL& requestURL, const WebCore::ResourceRequest& redirectRequest)
</ins><span class="cx"> {
</span><del>-    m_privateClickMeasurement->handleConversion(WTFMove(conversion), requestURL, redirectRequest);
</del><ins>+    m_adClickAttribution->handleConversion(WTFMove(conversion), requestURL, redirectRequest);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkSession::dumpPrivateClickMeasurement(CompletionHandler<void(String)>&& completionHandler)
</del><ins>+void NetworkSession::dumpAdClickAttribution(CompletionHandler<void(String)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    m_privateClickMeasurement->toString(WTFMove(completionHandler));
</del><ins>+    m_adClickAttribution->toString(WTFMove(completionHandler));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkSession::clearPrivateClickMeasurement()
</del><ins>+void NetworkSession::clearAdClickAttribution()
</ins><span class="cx"> {
</span><del>-    m_privateClickMeasurement->clear();
</del><ins>+    m_adClickAttribution->clear();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkSession::clearPrivateClickMeasurementForRegistrableDomain(WebCore::RegistrableDomain&& domain)
</del><ins>+void NetworkSession::clearAdClickAttributionForRegistrableDomain(WebCore::RegistrableDomain&& domain)
</ins><span class="cx"> {
</span><del>-    m_privateClickMeasurement->clearForRegistrableDomain(WTFMove(domain));
</del><ins>+    m_adClickAttribution->clearForRegistrableDomain(WTFMove(domain));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkSession::setPrivateClickMeasurementOverrideTimerForTesting(bool value)
</del><ins>+void NetworkSession::setAdClickAttributionOverrideTimerForTesting(bool value)
</ins><span class="cx"> {
</span><del>-    m_privateClickMeasurement->setOverrideTimerForTesting(value);
</del><ins>+    m_adClickAttribution->setOverrideTimerForTesting(value);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkSession::setPrivateClickMeasurementConversionURLForTesting(URL&& url)
</del><ins>+void NetworkSession::setAdClickAttributionConversionURLForTesting(URL&& url)
</ins><span class="cx"> {
</span><del>-    m_privateClickMeasurement->setConversionURLForTesting(WTFMove(url));
</del><ins>+    m_adClickAttribution->setConversionURLForTesting(WTFMove(url));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkSession::markPrivateClickMeasurementsAsExpiredForTesting()
</del><ins>+void NetworkSession::markAdClickAttributionsAsExpiredForTesting()
</ins><span class="cx"> {
</span><del>-    m_privateClickMeasurement->markAllUnconvertedAsExpiredForTesting();
</del><ins>+    m_adClickAttribution->markAllUnconvertedAsExpiredForTesting();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void NetworkSession::addKeptAliveLoad(Ref<NetworkResourceLoader>&& loader)
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessNetworkSessionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/NetworkSession.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/NetworkSession.h      2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/NetworkProcess/NetworkSession.h 2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -29,9 +29,9 @@
</span><span class="cx"> #include "SandboxExtension.h"
</span><span class="cx"> #include "ServiceWorkerSoftUpdateLoader.h"
</span><span class="cx"> #include "WebResourceLoadStatisticsStore.h"
</span><ins>+#include <WebCore/AdClickAttribution.h>
</ins><span class="cx"> #include <WebCore/BlobRegistryImpl.h>
</span><span class="cx"> #include <WebCore/NetworkStorageSession.h>
</span><del>-#include <WebCore/PrivateClickMeasurement.h>
</del><span class="cx"> #include <WebCore/RegistrableDomain.h>
</span><span class="cx"> #include <pal/SessionID.h>
</span><span class="cx"> #include <wtf/HashSet.h>
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-class PrivateClickMeasurementManager;
</del><ins>+class AdClickAttributionManager;
</ins><span class="cx"> class NetworkDataTask;
</span><span class="cx"> class NetworkProcess;
</span><span class="cx"> class NetworkResourceLoader;
</span><span class="lines">@@ -116,14 +116,14 @@
</span><span class="cx">     virtual bool hasAppBoundSession() const { return false; }
</span><span class="cx">     virtual void clearAppBoundSession() { }
</span><span class="cx"> #endif
</span><del>-    void storePrivateClickMeasurement(WebCore::PrivateClickMeasurement&&);
-    void handlePrivateClickMeasurementConversion(WebCore::PrivateClickMeasurement::Conversion&&, const URL& requestURL, const WebCore::ResourceRequest& redirectRequest);
-    void dumpPrivateClickMeasurement(CompletionHandler<void(String)>&&);
-    void clearPrivateClickMeasurement();
-    void clearPrivateClickMeasurementForRegistrableDomain(WebCore::RegistrableDomain&&);
-    void setPrivateClickMeasurementOverrideTimerForTesting(bool value);
-    void setPrivateClickMeasurementConversionURLForTesting(URL&&);
-    void markPrivateClickMeasurementsAsExpiredForTesting();
</del><ins>+    void storeAdClickAttribution(WebCore::AdClickAttribution&&);
+    void handleAdClickAttributionConversion(WebCore::AdClickAttribution::Conversion&&, const URL& requestURL, const WebCore::ResourceRequest& redirectRequest);
+    void dumpAdClickAttribution(CompletionHandler<void(String)>&&);
+    void clearAdClickAttribution();
+    void clearAdClickAttributionForRegistrableDomain(WebCore::RegistrableDomain&&);
+    void setAdClickAttributionOverrideTimerForTesting(bool value);
+    void setAdClickAttributionConversionURLForTesting(URL&&);
+    void markAdClickAttributionsAsExpiredForTesting();
</ins><span class="cx"> 
</span><span class="cx">     void addKeptAliveLoad(Ref<NetworkResourceLoader>&&);
</span><span class="cx">     void removeKeptAliveLoad(NetworkResourceLoader&);
</span><span class="lines">@@ -175,7 +175,7 @@
</span><span class="cx">     Optional<WebCore::RegistrableDomain> m_thirdPartyCNAMEDomainForTesting;
</span><span class="cx"> #endif
</span><span class="cx">     bool m_isStaleWhileRevalidateEnabled { false };
</span><del>-    UniqueRef<PrivateClickMeasurementManager> m_privateClickMeasurement;
</del><ins>+    UniqueRef<AdClickAttributionManager> m_adClickAttribution;
</ins><span class="cx"> 
</span><span class="cx">     HashSet<Ref<NetworkResourceLoader>> m_keptAliveLoads;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessPrivateClickMeasurementManagercpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.cpp    2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.cpp       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1,336 +0,0 @@
</span><del>-/*
- * Copyright (C) 2019 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "PrivateClickMeasurementManager.h"
-
-#include "Logging.h"
-#include <JavaScriptCore/ConsoleTypes.h>
-#include <WebCore/FetchOptions.h>
-#include <WebCore/FormData.h>
-#include <WebCore/HTTPHeaderValues.h>
-#include <WebCore/ResourceError.h>
-#include <WebCore/ResourceRequest.h>
-#include <WebCore/ResourceResponse.h>
-#include <WebCore/RuntimeApplicationChecks.h>
-#include <WebCore/RuntimeEnabledFeatures.h>
-#include <wtf/text/StringBuilder.h>
-#include <wtf/text/StringHash.h>
-
-namespace WebKit {
-using namespace WebCore;
-
-using Source = PrivateClickMeasurement::Source;
-using Destination = PrivateClickMeasurement::Destination;
-using DestinationMap = HashMap<Destination, PrivateClickMeasurement>;
-using Conversion = PrivateClickMeasurement::Conversion;
-
-constexpr Seconds debugModeSecondsUntilSend { 60_s };
-
-void PrivateClickMeasurementManager::storeUnconverted(PrivateClickMeasurement&& attribution)
-{
-    clearExpired();
-
-    if (UNLIKELY(debugModeEnabled())) {
-        RELEASE_LOG_INFO(PrivateClickMeasurement, "Storing an ad click.");
-        m_networkProcess->broadcastConsoleMessage(m_sessionID, MessageSource::PrivateClickMeasurement, MessageLevel::Error, "[Private Click Measurement] Storing an ad click."_s);
-    }
-
-    m_unconvertedPrivateClickMeasurementMap.set(std::make_pair(attribution.source(), attribution.destination()), WTFMove(attribution));
-}
-
-void PrivateClickMeasurementManager::handleConversion(Conversion&& conversion, const URL& requestURL, const WebCore::ResourceRequest& redirectRequest)
-{
-    if (m_sessionID.isEphemeral())
-        return;
-
-    RegistrableDomain redirectDomain { redirectRequest.url() };
-    auto& firstPartyURL = redirectRequest.firstPartyForCookies();
-
-    if (!redirectDomain.matches(requestURL)) {
-        if (UNLIKELY(debugModeEnabled())) {
-            RELEASE_LOG_INFO(PrivateClickMeasurement, "Conversion was not accepted because the HTTP redirect was not same-site.");
-            m_networkProcess->broadcastConsoleMessage(m_sessionID, MessageSource::PrivateClickMeasurement, MessageLevel::Error, "[Private Click Measurement] Conversion was not accepted because the HTTP redirect was not same-site."_s);
-        }
-        return;
-    }
-
-    if (redirectDomain.matches(firstPartyURL)) {
-        if (UNLIKELY(debugModeEnabled())) {
-            RELEASE_LOG_INFO(PrivateClickMeasurement, "Conversion was not accepted because it was requested in an HTTP redirect that is same-site as the first-party.");
-            m_networkProcess->broadcastConsoleMessage(m_sessionID, MessageSource::PrivateClickMeasurement, MessageLevel::Error, "[Private Click Measurement] Conversion was not accepted because it was requested in an HTTP redirect that is same-site as the first-party."_s);
-        }
-        return;
-    }
-
-    convert(PrivateClickMeasurement::Source { WTFMove(redirectDomain) }, PrivateClickMeasurement::Destination { firstPartyURL }, WTFMove(conversion));
-}
-
-void PrivateClickMeasurementManager::startTimer(Seconds seconds)
-{
-    m_firePendingConversionRequestsTimer.startOneShot(m_isRunningTest ? 0_s : seconds);
-}
-
-void PrivateClickMeasurementManager::convert(const Source& source, const Destination& destination, Conversion&& conversion)
-{
-    clearExpired();
-
-    if (!conversion.isValid()) {
-        if (UNLIKELY(debugModeEnabled())) {
-            RELEASE_LOG_INFO(PrivateClickMeasurement, "Got an invalid conversion.");
-            m_networkProcess->broadcastConsoleMessage(m_sessionID, MessageSource::PrivateClickMeasurement, MessageLevel::Error, "[Private Click Measurement] Got an invalid conversion."_s);
-        }
-        return;
-    }
-
-    auto conversionData = conversion.data;
-    auto conversionPriority = conversion.priority;
-
-    if (UNLIKELY(debugModeEnabled())) {
-        RELEASE_LOG_INFO(PrivateClickMeasurement, "Got a conversion with conversion data: %{public}u and priority: %{public}u.", conversionData, conversionPriority);
-        m_networkProcess->broadcastConsoleMessage(m_sessionID, MessageSource::PrivateClickMeasurement, MessageLevel::Info, makeString("[Private Click Measurement] Got a conversion with conversion data: '"_s, conversionData, "' and priority: '"_s, conversionPriority, "'."_s));
-    }
-
-    auto secondsUntilSend = Seconds::infinity();
-
-    auto pair = std::make_pair(source, destination);
-    auto previouslyUnconvertedAttribution = m_unconvertedPrivateClickMeasurementMap.take(pair);
-    auto previouslyConvertedAttributionIter = m_convertedPrivateClickMeasurementMap.find(pair);
-
-    if (!previouslyUnconvertedAttribution.isEmpty()) {
-        // Always convert the pending attribution and remove it from the unconverted map.
-        if (auto optionalSecondsUntilSend = previouslyUnconvertedAttribution.convertAndGetEarliestTimeToSend(WTFMove(conversion))) {
-            secondsUntilSend = *optionalSecondsUntilSend;
-            ASSERT(secondsUntilSend != Seconds::infinity());
-
-            if (UNLIKELY(debugModeEnabled())) {
-                RELEASE_LOG_INFO(PrivateClickMeasurement, "Converted a stored ad click with conversion data: %{public}u and priority: %{public}u.", conversionData, conversionPriority);
-                m_networkProcess->broadcastConsoleMessage(m_sessionID, MessageSource::PrivateClickMeasurement, MessageLevel::Info, makeString("[Private Click Measurement] Converted a stored ad click with conversion data: '"_s, conversionData, "' and priority: '"_s, conversionPriority, "'."_s));
-            }
-        }
-
-        if (previouslyConvertedAttributionIter == m_convertedPrivateClickMeasurementMap.end())
-            m_convertedPrivateClickMeasurementMap.add(pair, WTFMove(previouslyUnconvertedAttribution));
-        else if (previouslyUnconvertedAttribution.hasHigherPriorityThan(previouslyConvertedAttributionIter->value)) {
-            // If the newly converted attribution has higher priority, replace the old one.
-            m_convertedPrivateClickMeasurementMap.set(pair, WTFMove(previouslyUnconvertedAttribution));
-
-            if (UNLIKELY(debugModeEnabled())) {
-                RELEASE_LOG_INFO(PrivateClickMeasurement, "Replaced a previously converted ad click with a new one with conversion data: %{public}u and priority: %{public}u because it had higher priority.", conversionData, conversionPriority);
-                m_networkProcess->broadcastConsoleMessage(m_sessionID, MessageSource::PrivateClickMeasurement, MessageLevel::Info, makeString("[Private Click Measurement] Replaced a previously converted ad click with a new one with conversion data: '"_s, conversionData, "' and priority: '"_s, conversionPriority, "' because it had higher priority."_s));
-            }
-        }
-    } else if (previouslyConvertedAttributionIter != m_convertedPrivateClickMeasurementMap.end()) {
-        // If we have no newly converted attribution, re-convert the old one to respect the new priority.
-        if (auto optionalSecondsUntilSend = previouslyConvertedAttributionIter->value.convertAndGetEarliestTimeToSend(WTFMove(conversion))) {
-            secondsUntilSend = *optionalSecondsUntilSend;
-            ASSERT(secondsUntilSend != Seconds::infinity());
-
-            if (UNLIKELY(debugModeEnabled())) {
-                RELEASE_LOG_INFO(PrivateClickMeasurement, "Re-converted an ad click with a new one with conversion data: %{public}u and priority: %{public}u because it had higher priority.", conversionData, conversionPriority);
-                m_networkProcess->broadcastConsoleMessage(m_sessionID, MessageSource::PrivateClickMeasurement, MessageLevel::Info, makeString("[Private Click Measurement] Re-converted an ad click with a new one with conversion data: '"_s, conversionData, "' and priority: '"_s, conversionPriority, "'' because it had higher priority."_s));
-            }
-        }
-    }
-
-    if (secondsUntilSend == Seconds::infinity())
-        return;
-    
-    if (m_firePendingConversionRequestsTimer.isActive() && m_firePendingConversionRequestsTimer.nextFireInterval() < secondsUntilSend)
-        return;
-
-    if (UNLIKELY(debugModeEnabled())) {
-        RELEASE_LOG_INFO(PrivateClickMeasurement, "Setting timer for firing conversion requests to the debug mode timeout of %{public}f seconds where the regular timeout would have been %{public}f seconds.", debugModeSecondsUntilSend.seconds(), secondsUntilSend.seconds());
-        m_networkProcess->broadcastConsoleMessage(m_sessionID, MessageSource::PrivateClickMeasurement, MessageLevel::Info, makeString("[Private Click Measurement] Setting timer for firing conversion requests to the debug mode timeout of "_s, debugModeSecondsUntilSend.seconds(), " seconds where the regular timeout would have been "_s, secondsUntilSend.seconds(), " seconds."_s));
-        secondsUntilSend = debugModeSecondsUntilSend;
-    }
-
-    startTimer(secondsUntilSend);
-}
-
-void PrivateClickMeasurementManager::fireConversionRequest(const PrivateClickMeasurement& attribution)
-{
-    auto conversionURL = m_conversionBaseURLForTesting ? *m_conversionBaseURLForTesting : attribution.reportURL();
-    if (conversionURL.isEmpty() || !conversionURL.isValid())
-        return;
-
-    ResourceRequest request { WTFMove(conversionURL) };
-    
-    request.setHTTPMethod("POST"_s);
-    request.setHTTPHeaderField(HTTPHeaderName::CacheControl, WebCore::HTTPHeaderValues::maxAge0());
-
-    request.setHTTPContentType(WebCore::HTTPHeaderValues::applicationJSONContentType());
-    request.setHTTPBody(WebCore::FormData::create(attribution.json()->toJSONString().utf8().data()));
-
-    FetchOptions options;
-    options.credentials = FetchOptions::Credentials::Omit;
-    options.redirect = FetchOptions::Redirect::Error;
-
-    static uint64_t identifier = 0;
-    
-    NetworkResourceLoadParameters loadParameters;
-    loadParameters.identifier = ++identifier;
-    loadParameters.request = request;
-    loadParameters.parentPID = presentingApplicationPID();
-    loadParameters.storedCredentialsPolicy = StoredCredentialsPolicy::EphemeralStateless;
-    loadParameters.options = options;
-    loadParameters.shouldClearReferrerOnHTTPSToHTTPRedirect = true;
-    loadParameters.shouldRestrictHTTPResponseAccess = false;
-
-    if (UNLIKELY(debugModeEnabled())) {
-        RELEASE_LOG_INFO(PrivateClickMeasurement, "About to fire an attribution request for a conversion.");
-        m_networkProcess->broadcastConsoleMessage(m_sessionID, MessageSource::PrivateClickMeasurement, MessageLevel::Error, "[Private Click Measurement] About to fire an attribution request for a conversion."_s);
-    }
-
-    m_pingLoadFunction(WTFMove(loadParameters), [weakThis = makeWeakPtr(*this)](const WebCore::ResourceError& error, const WebCore::ResourceResponse& response) {
-        if (!weakThis)
-            return;
-
-        if (UNLIKELY(weakThis->debugModeEnabled())) {
-            if (!error.isNull()) {
-#if PLATFORM(COCOA)
-                RELEASE_LOG_ERROR(PrivateClickMeasurement, "Received error: '%{public}s' for ad click attribution request.", error.localizedDescription().utf8().data());
-#else
-                RELEASE_LOG_ERROR(PrivateClickMeasurement, "Received error: '%s' for ad click attribution request.", error.localizedDescription().utf8().data());
-#endif
-                weakThis->m_networkProcess->broadcastConsoleMessage(weakThis->m_sessionID, MessageSource::PrivateClickMeasurement, MessageLevel::Error, makeString("[Private Click Measurement] Received error: '"_s, error.localizedDescription(), "' for ad click attribution request."_s));
-            }
-        }
-    });
-}
-
-void PrivateClickMeasurementManager::firePendingConversionRequests()
-{
-    auto nextTimeToFire = Seconds::infinity();
-    for (auto& attribution : m_convertedPrivateClickMeasurementMap.values()) {
-        if (attribution.wasConversionSent()) {
-            ASSERT_NOT_REACHED();
-            continue;
-        }
-        auto earliestTimeToSend = attribution.earliestTimeToSend();
-        if (!earliestTimeToSend) {
-            ASSERT_NOT_REACHED();
-            continue;
-        }
-
-        auto now = WallTime::now();
-        if (*earliestTimeToSend <= now || m_isRunningTest || debugModeEnabled()) {
-            fireConversionRequest(attribution);
-            attribution.markConversionAsSent();
-            continue;
-        }
-
-        auto seconds = *earliestTimeToSend - now;
-        nextTimeToFire = std::min(nextTimeToFire, seconds);
-    }
-
-    m_convertedPrivateClickMeasurementMap.removeIf([](auto& keyAndValue) {
-        return keyAndValue.value.wasConversionSent();
-    });
-
-    if (nextTimeToFire < Seconds::infinity())
-        startTimer(nextTimeToFire);
-}
-
-void PrivateClickMeasurementManager::clear()
-{
-    m_firePendingConversionRequestsTimer.stop();
-    m_unconvertedPrivateClickMeasurementMap.clear();
-    m_convertedPrivateClickMeasurementMap.clear();
-}
-
-void PrivateClickMeasurementManager::clearForRegistrableDomain(const RegistrableDomain& domain)
-{
-    m_unconvertedPrivateClickMeasurementMap.removeIf([&domain](auto& keyAndValue) {
-        return keyAndValue.key.first.registrableDomain == domain || keyAndValue.key.second.registrableDomain == domain;
-    });
-
-    m_convertedPrivateClickMeasurementMap.removeIf([&domain](auto& keyAndValue) {
-        return keyAndValue.key.first.registrableDomain == domain || keyAndValue.key.second.registrableDomain == domain;
-    });
-}
-
-void PrivateClickMeasurementManager::clearExpired()
-{
-    m_unconvertedPrivateClickMeasurementMap.removeIf([](auto& keyAndValue) {
-        return keyAndValue.value.hasExpired();
-    });
-}
-
-void PrivateClickMeasurementManager::toString(CompletionHandler<void(String)>&& completionHandler) const
-{
-    if (m_unconvertedPrivateClickMeasurementMap.isEmpty() && m_convertedPrivateClickMeasurementMap.isEmpty())
-        return completionHandler("\nNo stored Private Click Measurement data.\n"_s);
-
-    unsigned unconvertedAttributionNumber = 0;
-    StringBuilder builder;
-    for (auto& attribution : m_unconvertedPrivateClickMeasurementMap.values()) {
-        if (!unconvertedAttributionNumber)
-            builder.appendLiteral("Unconverted Private Click Measurements:\n");
-        else
-            builder.append('\n');
-        builder.appendLiteral("WebCore::PrivateClickMeasurement ");
-        builder.appendNumber(++unconvertedAttributionNumber);
-        builder.append('\n');
-        builder.append(attribution.toString());
-}
-
-    unsigned convertedAttributionNumber = 0;
-    for (auto& attribution : m_convertedPrivateClickMeasurementMap.values()) {
-        if (unconvertedAttributionNumber)
-            builder.append('\n');
-        if (!convertedAttributionNumber)
-            builder.appendLiteral("Converted Private Click Measurements:\n");
-        else
-            builder.append('\n');
-        builder.appendLiteral("WebCore::PrivateClickMeasurement ");
-        builder.appendNumber(++convertedAttributionNumber + unconvertedAttributionNumber);
-        builder.append('\n');
-        builder.append(attribution.toString());
-    }
-
-    completionHandler(builder.toString());
-}
-
-void PrivateClickMeasurementManager::setConversionURLForTesting(URL&& testURL)
-{
-    if (testURL.isEmpty())
-        m_conversionBaseURLForTesting = { };
-    else
-        m_conversionBaseURLForTesting = WTFMove(testURL);
-}
-
-void PrivateClickMeasurementManager::markAllUnconvertedAsExpiredForTesting()
-{
-    for (auto& attribution : m_unconvertedPrivateClickMeasurementMap.values())
-        attribution.markAsExpired();
-}
-
-bool PrivateClickMeasurementManager::debugModeEnabled() const
-{
-    return RuntimeEnabledFeatures::sharedFeatures().privateClickMeasurementDebugModeEnabled() && !m_sessionID.isEphemeral();
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessPrivateClickMeasurementManagerh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.h      2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.h 2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1,92 +0,0 @@
</span><del>-/*
- * Copyright (C) 2019 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include "NetworkProcess.h"
-#include "NetworkResourceLoadParameters.h"
-#include <WebCore/PrivateClickMeasurement.h>
-#include <WebCore/RegistrableDomain.h>
-#include <WebCore/ResourceError.h>
-#include <WebCore/ResourceResponse.h>
-#include <WebCore/Timer.h>
-#include <pal/SessionID.h>
-#include <wtf/CompletionHandler.h>
-#include <wtf/HashMap.h>
-#include <wtf/WeakPtr.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebKit {
-
-class PrivateClickMeasurementManager : public CanMakeWeakPtr<PrivateClickMeasurementManager> {
-    WTF_MAKE_FAST_ALLOCATED;
-public:
-
-    using RegistrableDomain = WebCore::RegistrableDomain;
-    using PrivateClickMeasurement = WebCore::PrivateClickMeasurement;
-    using Source = WebCore::PrivateClickMeasurement::Source;
-    using Destination = WebCore::PrivateClickMeasurement::Destination;
-    using Conversion = WebCore::PrivateClickMeasurement::Conversion;
-
-    explicit PrivateClickMeasurementManager(NetworkProcess& networkProcess, PAL::SessionID sessionID)
-        : m_firePendingConversionRequestsTimer(*this, &PrivateClickMeasurementManager::firePendingConversionRequests)
-        , m_pingLoadFunction([](NetworkResourceLoadParameters&& params, CompletionHandler<void(const WebCore::ResourceError&, const WebCore::ResourceResponse&)>&& completionHandler) {
-            UNUSED_PARAM(params);
-            completionHandler(WebCore::ResourceError(), WebCore::ResourceResponse());
-        })
-        , m_networkProcess(networkProcess)
-        , m_sessionID(sessionID)
-    {
-    }
-
-    void storeUnconverted(PrivateClickMeasurement&&);
-    void handleConversion(Conversion&&, const URL& requestURL, const WebCore::ResourceRequest& redirectRequest);
-    void clear();
-    void clearForRegistrableDomain(const RegistrableDomain&);
-    void toString(CompletionHandler<void(String)>&&) const;
-    void setPingLoadFunction(Function<void(NetworkResourceLoadParameters&&, CompletionHandler<void(const WebCore::ResourceError&, const WebCore::ResourceResponse&)>&&)>&& pingLoadFunction) { m_pingLoadFunction = WTFMove(pingLoadFunction); }
-    void setOverrideTimerForTesting(bool value) { m_isRunningTest = value; }
-    void setConversionURLForTesting(URL&&);
-    void markAllUnconvertedAsExpiredForTesting();
-
-private:
-    void startTimer(Seconds);
-    void convert(const Source&, const Destination&, Conversion&&);
-    void fireConversionRequest(const PrivateClickMeasurement&);
-    void firePendingConversionRequests();
-    void clearExpired();
-    bool debugModeEnabled() const;
-
-    HashMap<std::pair<Source, Destination>, PrivateClickMeasurement> m_unconvertedPrivateClickMeasurementMap;
-    HashMap<std::pair<Source, Destination>, PrivateClickMeasurement> m_convertedPrivateClickMeasurementMap;
-    WebCore::Timer m_firePendingConversionRequestsTimer;
-    Function<void(NetworkResourceLoadParameters&&, CompletionHandler<void(const WebCore::ResourceError&, const WebCore::ResourceResponse&)>&&)> m_pingLoadFunction;
-    bool m_isRunningTest { false };
-    Optional<URL> m_conversionBaseURLForTesting;
-    Ref<NetworkProcess> m_networkProcess;
-    PAL::SessionID m_sessionID;
-};
-    
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKitPlatformLoggingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Platform/Logging.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Platform/Logging.h   2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/Platform/Logging.h      2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> 
</span><span class="cx"> #define WEBKIT2_LOG_CHANNELS(M) \
</span><span class="cx">     M(ActivityState) \
</span><del>-    M(PrivateClickMeasurement) \
</del><ins>+    M(AdClickAttribution) \
</ins><span class="cx">     M(AppSSO) \
</span><span class="cx">     M(Automation) \
</span><span class="cx">     M(AutomationInteractions) \
</span></span></pre></div>
<a id="trunkSourceWebKitSharedNavigationActionDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/NavigationActionData.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/NavigationActionData.cpp      2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/Shared/NavigationActionData.cpp 2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx">     encoder << lockHistory;
</span><span class="cx">     encoder << lockBackForwardList;
</span><span class="cx">     encoder << clientRedirectSourceForHistory;
</span><del>-    encoder << privateClickMeasurement;
</del><ins>+    encoder << adClickAttribution;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Optional<NavigationActionData> NavigationActionData::decode(IPC::Decoder& decoder)
</span><span class="lines">@@ -146,15 +146,15 @@
</span><span class="cx">     if (!clientRedirectSourceForHistory)
</span><span class="cx">         return WTF::nullopt;
</span><span class="cx"> 
</span><del>-    Optional<Optional<WebCore::PrivateClickMeasurement>> privateClickMeasurement;
-    decoder >> privateClickMeasurement;
-    if (!privateClickMeasurement)
</del><ins>+    Optional<Optional<WebCore::AdClickAttribution>> adClickAttribution;
+    decoder >> adClickAttribution;
+    if (!adClickAttribution)
</ins><span class="cx">         return WTF::nullopt;
</span><span class="cx"> 
</span><span class="cx">     return {{ WTFMove(navigationType), modifiers, WTFMove(mouseButton), WTFMove(syntheticClickType), WTFMove(*userGestureTokenIdentifier),
</span><span class="cx">         WTFMove(*canHandleRequest), WTFMove(shouldOpenExternalURLsPolicy), WTFMove(*downloadAttribute), WTFMove(clickLocationInRootViewCoordinates),
</span><span class="cx">         WTFMove(*isRedirect), *treatAsSameOriginNavigation, *hasOpenedFrames, *openedByDOMWithOpener, WTFMove(*requesterOrigin),
</span><del>-        WTFMove(*targetBackForwardItemIdentifier), WTFMove(*sourceBackForwardItemIdentifier), lockHistory, lockBackForwardList, WTFMove(*clientRedirectSourceForHistory), WTFMove(*privateClickMeasurement) }};
</del><ins>+        WTFMove(*targetBackForwardItemIdentifier), WTFMove(*sourceBackForwardItemIdentifier), lockHistory, lockBackForwardList, WTFMove(*clientRedirectSourceForHistory), WTFMove(*adClickAttribution) }};
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKitSharedNavigationActionDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/NavigationActionData.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/NavigationActionData.h        2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/Shared/NavigationActionData.h   2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -26,10 +26,10 @@
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><span class="cx"> #include "WebMouseEvent.h"
</span><ins>+#include <WebCore/AdClickAttribution.h>
</ins><span class="cx"> #include <WebCore/BackForwardItemIdentifier.h>
</span><span class="cx"> #include <WebCore/FloatPoint.h>
</span><span class="cx"> #include <WebCore/FrameLoaderTypes.h>
</span><del>-#include <WebCore/PrivateClickMeasurement.h>
</del><span class="cx"> #include <WebCore/SecurityOriginData.h>
</span><span class="cx"> 
</span><span class="cx"> namespace IPC {
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx">     WebCore::LockHistory lockHistory { WebCore::LockHistory::No };
</span><span class="cx">     WebCore::LockBackForwardList lockBackForwardList { WebCore::LockBackForwardList::No };
</span><span class="cx">     WTF::String clientRedirectSourceForHistory;
</span><del>-    Optional<WebCore::PrivateClickMeasurement> privateClickMeasurement;
</del><ins>+    Optional<WebCore::AdClickAttribution> adClickAttribution;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitSharedWebsiteDataWebsiteDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/WebsiteData/WebsiteData.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/WebsiteData/WebsiteData.cpp   2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/Shared/WebsiteData/WebsiteData.cpp      2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -133,7 +133,7 @@
</span><span class="cx">         return WebsiteDataProcessType::Network;
</span><span class="cx">     case WebsiteDataType::DeviceIdHashSalt:
</span><span class="cx">         return WebsiteDataProcessType::UI;
</span><del>-    case WebsiteDataType::PrivateClickMeasurements:
</del><ins>+    case WebsiteDataType::AdClickAttributions:
</ins><span class="cx">         return WebsiteDataProcessType::Network;
</span><span class="cx"> #if HAVE(CFNETWORK_ALTERNATIVE_SERVICE)
</span><span class="cx">     case WebsiteDataType::AlternativeServices:
</span></span></pre></div>
<a id="trunkSourceWebKitSharedWebsiteDataWebsiteDataTypeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/WebsiteData/WebsiteDataType.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/WebsiteData/WebsiteDataType.h 2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/Shared/WebsiteData/WebsiteDataType.h    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     DOMCache = 1 << 15,
</span><span class="cx">     DeviceIdHashSalt = 1 << 16,
</span><del>-    PrivateClickMeasurements = 1 << 17,
</del><ins>+    AdClickAttributions = 1 << 17,
</ins><span class="cx"> #if HAVE(CFNETWORK_ALTERNATIVE_SERVICE)
</span><span class="cx">     AlternativeServices = 1 << 18,
</span><span class="cx"> #endif
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx"> #endif
</span><span class="cx">         WebKit::WebsiteDataType::DOMCache,
</span><span class="cx">         WebKit::WebsiteDataType::DeviceIdHashSalt,
</span><del>-        WebKit::WebsiteDataType::PrivateClickMeasurements
</del><ins>+        WebKit::WebsiteDataType::AdClickAttributions
</ins><span class="cx"> #if HAVE(CFNETWORK_ALTERNATIVE_SERVICE)
</span><span class="cx">         , WebKit::WebsiteDataType::AlternativeServices
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKitSourcestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Sources.txt (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Sources.txt  2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/Sources.txt     2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx"> GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-NetworkProcess/PrivateClickMeasurementManager.cpp
</del><ins>+NetworkProcess/AdClickAttributionManager.cpp
</ins><span class="cx"> NetworkProcess/NetworkActivityTracker.cpp
</span><span class="cx"> NetworkProcess/NetworkCORSPreflightChecker.cpp
</span><span class="cx"> NetworkProcess/NetworkConnectionToWebProcess.cpp
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPIAPINavigationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/APINavigation.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/APINavigation.h        2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/UIProcess/API/APINavigation.h   2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx"> #include "ProcessThrottler.h"
</span><span class="cx"> #include "WebBackForwardListItem.h"
</span><span class="cx"> #include "WebContentMode.h"
</span><del>-#include <WebCore/PrivateClickMeasurement.h>
</del><ins>+#include <WebCore/AdClickAttribution.h>
</ins><span class="cx"> #include <WebCore/ProcessIdentifier.h>
</span><span class="cx"> #include <WebCore/ResourceRequest.h>
</span><span class="cx"> #include <WebCore/SecurityOriginData.h>
</span><span class="lines">@@ -153,7 +153,7 @@
</span><span class="cx"> 
</span><span class="cx">     const std::unique_ptr<SubstituteData>& substituteData() const { return m_substituteData; }
</span><span class="cx"> 
</span><del>-    const Optional<WebCore::PrivateClickMeasurement>& privateClickMeasurement() const { return m_lastNavigationAction.privateClickMeasurement; }
</del><ins>+    const Optional<WebCore::AdClickAttribution>& adClickAttribution() const { return m_lastNavigationAction.adClickAttribution; }
</ins><span class="cx"> 
</span><span class="cx">     void setClientNavigationActivity(WebKit::ProcessThrottler::ActivityVariant&& activity) { m_clientNavigationActivity = WTFMove(activity); }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICWKPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp   2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp      2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -2880,37 +2880,37 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void WKPageDumpPrivateClickMeasurement(WKPageRef page, WKPageDumpPrivateClickMeasurementFunction callback, void* callbackContext)
</del><ins>+void WKPageDumpAdClickAttribution(WKPageRef page, WKPageDumpAdClickAttributionFunction callback, void* callbackContext)
</ins><span class="cx"> {
</span><del>-    toImpl(page)->dumpPrivateClickMeasurement([callbackContext, callback] (const String& privateClickMeasurement) {
-        callback(WebKit::toAPI(privateClickMeasurement.impl()), callbackContext);
</del><ins>+    toImpl(page)->dumpAdClickAttribution([callbackContext, callback] (const String& adClickAttribution) {
+        callback(WebKit::toAPI(adClickAttribution.impl()), callbackContext);
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageClearPrivateClickMeasurement(WKPageRef page, WKPageClearPrivateClickMeasurementFunction callback, void* callbackContext)
</del><ins>+void WKPageClearAdClickAttribution(WKPageRef page, WKPageClearAdClickAttributionFunction callback, void* callbackContext)
</ins><span class="cx"> {
</span><del>-    toImpl(page)->clearPrivateClickMeasurement([callbackContext, callback] () {
</del><ins>+    toImpl(page)->clearAdClickAttribution([callbackContext, callback] () {
</ins><span class="cx">         callback(callbackContext);
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageSetPrivateClickMeasurementOverrideTimerForTesting(WKPageRef page, bool value, WKPageSetPrivateClickMeasurementOverrideTimerForTestingFunction callback, void* callbackContext)
</del><ins>+void WKPageSetAdClickAttributionOverrideTimerForTesting(WKPageRef page, bool value, WKPageSetAdClickAttributionOverrideTimerForTestingFunction callback, void* callbackContext)
</ins><span class="cx"> {
</span><del>-    toImpl(page)->setPrivateClickMeasurementOverrideTimerForTesting(value, [callbackContext, callback] () {
</del><ins>+    toImpl(page)->setAdClickAttributionOverrideTimerForTesting(value, [callbackContext, callback] () {
</ins><span class="cx">         callback(callbackContext);
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageSetPrivateClickMeasurementConversionURLForTesting(WKPageRef page, WKURLRef URLRef, WKPageSetPrivateClickMeasurementConversionURLForTestingFunction callback, void* callbackContext)
</del><ins>+void WKPageSetAdClickAttributionConversionURLForTesting(WKPageRef page, WKURLRef URLRef, WKPageSetAdClickAttributionConversionURLForTestingFunction callback, void* callbackContext)
</ins><span class="cx"> {
</span><del>-    toImpl(page)->setPrivateClickMeasurementConversionURLForTesting(URL(URL(), toWTFString(URLRef)), [callbackContext, callback] () {
</del><ins>+    toImpl(page)->setAdClickAttributionConversionURLForTesting(URL(URL(), toWTFString(URLRef)), [callbackContext, callback] () {
</ins><span class="cx">         callback(callbackContext);
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageMarkPrivateClickMeasurementsAsExpiredForTesting(WKPageRef page, WKPageMarkPrivateClickMeasurementsAsExpiredForTestingFunction callback, void* callbackContext)
</del><ins>+void WKPageMarkAdClickAttributionsAsExpiredForTesting(WKPageRef page, WKPageMarkAdClickAttributionsAsExpiredForTestingFunction callback, void* callbackContext)
</ins><span class="cx"> {
</span><del>-    toImpl(page)->markPrivateClickMeasurementsAsExpiredForTesting([callbackContext, callback] () {
</del><ins>+    toImpl(page)->markAdClickAttributionsAsExpiredForTesting([callbackContext, callback] () {
</ins><span class="cx">         callback(callbackContext);
</span><span class="cx">     });
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICWKPagePrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/C/WKPagePrivate.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/C/WKPagePrivate.h      2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPagePrivate.h 2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -169,16 +169,16 @@
</span><span class="cx"> WK_EXPORT void WKPageGetApplicationManifest_b(WKPageRef page, WKPageGetApplicationManifestBlock block);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-typedef void (*WKPageDumpPrivateClickMeasurementFunction)(WKStringRef privateClickMeasurementRepresentation, void* functionContext);
-WK_EXPORT void WKPageDumpPrivateClickMeasurement(WKPageRef, WKPageDumpPrivateClickMeasurementFunction, void* callbackContext);
-typedef void (*WKPageClearPrivateClickMeasurementFunction)(void* functionContext);
-WK_EXPORT void WKPageClearPrivateClickMeasurement(WKPageRef, WKPageClearPrivateClickMeasurementFunction, void* callbackContext);
-typedef void (*WKPageSetPrivateClickMeasurementOverrideTimerForTestingFunction)(void* functionContext);
-WK_EXPORT void WKPageSetPrivateClickMeasurementOverrideTimerForTesting(WKPageRef page, bool value, WKPageSetPrivateClickMeasurementOverrideTimerForTestingFunction callback, void* callbackContext);
-typedef void (*WKPageSetPrivateClickMeasurementConversionURLForTestingFunction)(void* functionContext);
-WK_EXPORT void WKPageSetPrivateClickMeasurementConversionURLForTesting(WKPageRef page, WKURLRef urlString, WKPageSetPrivateClickMeasurementConversionURLForTestingFunction callback, void* callbackContext);
-typedef void (*WKPageMarkPrivateClickMeasurementsAsExpiredForTestingFunction)(void* functionContext);
-WK_EXPORT void WKPageMarkPrivateClickMeasurementsAsExpiredForTesting(WKPageRef page, WKPageMarkPrivateClickMeasurementsAsExpiredForTestingFunction callback, void* callbackContext);
</del><ins>+typedef void (*WKPageDumpAdClickAttributionFunction)(WKStringRef adClickAttributionRepresentation, void* functionContext);
+WK_EXPORT void WKPageDumpAdClickAttribution(WKPageRef, WKPageDumpAdClickAttributionFunction, void* callbackContext);
+typedef void (*WKPageClearAdClickAttributionFunction)(void* functionContext);
+WK_EXPORT void WKPageClearAdClickAttribution(WKPageRef, WKPageClearAdClickAttributionFunction, void* callbackContext);
+typedef void (*WKPageSetAdClickAttributionOverrideTimerForTestingFunction)(void* functionContext);
+WK_EXPORT void WKPageSetAdClickAttributionOverrideTimerForTesting(WKPageRef page, bool value, WKPageSetAdClickAttributionOverrideTimerForTestingFunction callback, void* callbackContext);
+typedef void (*WKPageSetAdClickAttributionConversionURLForTestingFunction)(void* functionContext);
+WK_EXPORT void WKPageSetAdClickAttributionConversionURLForTesting(WKPageRef page, WKURLRef urlString, WKPageSetAdClickAttributionConversionURLForTestingFunction callback, void* callbackContext);
+typedef void (*WKPageMarkAdClickAttributionsAsExpiredForTestingFunction)(void* functionContext);
+WK_EXPORT void WKPageMarkAdClickAttributionsAsExpiredForTesting(WKPageRef page, WKPageMarkAdClickAttributionsAsExpiredForTestingFunction callback, void* callbackContext);
</ins><span class="cx"> 
</span><span class="cx"> WK_EXPORT void WKPageSetMockCameraOrientation(WKPageRef page, uint64_t orientation);
</span><span class="cx"> WK_EXPORT bool WKPageIsMockRealtimeMediaSourceCenterEnabled(WKPageRef page);
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICWKWebsiteDataStoreRefcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp    2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -817,9 +817,9 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKWebsiteDataStoreClearPrivateClickMeasurementsThroughWebsiteDataRemoval(WKWebsiteDataStoreRef dataStoreRef, void* context, WKWebsiteDataStoreClearPrivateClickMeasurementsThroughWebsiteDataRemovalFunction callback)
</del><ins>+void WKWebsiteDataStoreClearAdClickAttributionsThroughWebsiteDataRemoval(WKWebsiteDataStoreRef dataStoreRef, void* context, WKWebsiteDataStoreClearAdClickAttributionsThroughWebsiteDataRemovalFunction callback)
</ins><span class="cx"> {
</span><del>-    OptionSet<WebKit::WebsiteDataType> dataTypes = WebKit::WebsiteDataType::PrivateClickMeasurements;
</del><ins>+    OptionSet<WebKit::WebsiteDataType> dataTypes = WebKit::WebsiteDataType::AdClickAttributions;
</ins><span class="cx">     WebKit::toImpl(dataStoreRef)->removeData(dataTypes, WallTime::fromRawSeconds(0), [context, callback] {
</span><span class="cx">         callback(context);
</span><span class="cx">     });
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICWKWebsiteDataStoreRefh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.h      2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.h 2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -186,8 +186,8 @@
</span><span class="cx"> 
</span><span class="cx"> WK_EXPORT void WKWebsiteDataStoreClearAllDeviceOrientationPermissions(WKWebsiteDataStoreRef dataStoreRef);
</span><span class="cx"> 
</span><del>-typedef void (*WKWebsiteDataStoreClearPrivateClickMeasurementsThroughWebsiteDataRemovalFunction)(void* functionContext);
-WK_EXPORT void WKWebsiteDataStoreClearPrivateClickMeasurementsThroughWebsiteDataRemoval(WKWebsiteDataStoreRef dataStoreRef, void* context, WKWebsiteDataStoreClearPrivateClickMeasurementsThroughWebsiteDataRemovalFunction callback);
</del><ins>+typedef void (*WKWebsiteDataStoreClearAdClickAttributionsThroughWebsiteDataRemovalFunction)(void* functionContext);
+WK_EXPORT void WKWebsiteDataStoreClearAdClickAttributionsThroughWebsiteDataRemoval(WKWebsiteDataStoreRef dataStoreRef, void* context, WKWebsiteDataStoreClearAdClickAttributionsThroughWebsiteDataRemovalFunction callback);
</ins><span class="cx"> 
</span><span class="cx"> WK_EXPORT void WKWebsiteDataStoreSetCacheModelSynchronouslyForTesting(WKWebsiteDataStoreRef dataStoreRef, WKCacheModel cacheModel);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICocoaWKWebsiteDataRecordmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataRecord.mm (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataRecord.mm   2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataRecord.mm      2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> NSString * const _WKWebsiteDataTypeSearchFieldRecentSearches = @"_WKWebsiteDataTypeSearchFieldRecentSearches";
</span><span class="cx"> NSString * const _WKWebsiteDataTypeResourceLoadStatistics = @"_WKWebsiteDataTypeResourceLoadStatistics";
</span><span class="cx"> NSString * const _WKWebsiteDataTypeCredentials = @"_WKWebsiteDataTypeCredentials";
</span><del>-NSString * const _WKWebsiteDataTypePrivateClickMeasurements = @"_WKWebsiteDataTypePrivateClickMeasurements";
</del><ins>+NSString * const _WKWebsiteDataTypeAdClickAttributions = @"_WKWebsiteDataTypeAdClickAttributions";
</ins><span class="cx"> NSString * const _WKWebsiteDataTypeAlternativeServices = @"_WKWebsiteDataTypeAlternativeServices";
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="lines">@@ -102,8 +102,8 @@
</span><span class="cx">         [array addObject:@"Resource Load Statistics"];
</span><span class="cx">     if ([dataTypes containsObject:_WKWebsiteDataTypeCredentials])
</span><span class="cx">         [array addObject:@"Credentials"];
</span><del>-    if ([dataTypes containsObject:_WKWebsiteDataTypePrivateClickMeasurements])
-        [array addObject:@"Private Click Measurements"];
</del><ins>+    if ([dataTypes containsObject:_WKWebsiteDataTypeAdClickAttributions])
+        [array addObject:@"Ad Click Attributions"];
</ins><span class="cx">     if ([dataTypes containsObject:_WKWebsiteDataTypeAlternativeServices])
</span><span class="cx">         [array addObject:@"Alternative Services"];
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICocoaWKWebsiteDataRecordInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h    2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -74,8 +74,8 @@
</span><span class="cx">         return WebsiteDataType::ResourceLoadStatistics;
</span><span class="cx">     if ([websiteDataType isEqualToString:_WKWebsiteDataTypeCredentials])
</span><span class="cx">         return WebsiteDataType::Credentials;
</span><del>-    if ([websiteDataType isEqualToString:_WKWebsiteDataTypePrivateClickMeasurements])
-        return WebsiteDataType::PrivateClickMeasurements;
</del><ins>+    if ([websiteDataType isEqualToString:_WKWebsiteDataTypeAdClickAttributions])
+        return WebsiteDataType::AdClickAttributions;
</ins><span class="cx"> #if HAVE(CFNETWORK_ALTERNATIVE_SERVICE)
</span><span class="cx">     if ([websiteDataType isEqualToString:_WKWebsiteDataTypeAlternativeServices])
</span><span class="cx">         return WebsiteDataType::AlternativeServices;
</span><span class="lines">@@ -135,8 +135,8 @@
</span><span class="cx">         [wkWebsiteDataTypes addObject:_WKWebsiteDataTypeResourceLoadStatistics];
</span><span class="cx">     if (websiteDataTypes.contains(WebsiteDataType::Credentials))
</span><span class="cx">         [wkWebsiteDataTypes addObject:_WKWebsiteDataTypeCredentials];
</span><del>-    if (websiteDataTypes.contains(WebsiteDataType::PrivateClickMeasurements))
-        [wkWebsiteDataTypes addObject:_WKWebsiteDataTypePrivateClickMeasurements];
</del><ins>+    if (websiteDataTypes.contains(WebsiteDataType::AdClickAttributions))
+        [wkWebsiteDataTypes addObject:_WKWebsiteDataTypeAdClickAttributions];
</ins><span class="cx"> #if HAVE(CFNETWORK_ALTERNATIVE_SERVICE)
</span><span class="cx">     if (websiteDataTypes.contains(WebsiteDataType::AlternativeServices))
</span><span class="cx">         [wkWebsiteDataTypes addObject:_WKWebsiteDataTypeAlternativeServices];
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICocoaWKWebsiteDataRecordPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h     2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h        2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> WK_EXTERN NSString * const _WKWebsiteDataTypeSearchFieldRecentSearches WK_API_AVAILABLE(macos(10.12), ios(10.0));
</span><span class="cx"> WK_EXTERN NSString * const _WKWebsiteDataTypeResourceLoadStatistics WK_API_AVAILABLE(macos(10.12), ios(10.0));
</span><span class="cx"> WK_EXTERN NSString * const _WKWebsiteDataTypeCredentials WK_API_AVAILABLE(macos(10.13), ios(11.0));
</span><del>-WK_EXTERN NSString * const _WKWebsiteDataTypePrivateClickMeasurements WK_API_AVAILABLE(macos(10.15), ios(13.0));
</del><ins>+WK_EXTERN NSString * const _WKWebsiteDataTypeAdClickAttributions WK_API_AVAILABLE(macos(10.15), ios(13.0));
</ins><span class="cx"> WK_EXTERN NSString * const _WKWebsiteDataTypeAlternativeServices WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
</span><span class="cx"> 
</span><span class="cx"> #if !TARGET_OS_IPHONE
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICocoaWKWebsiteDataStoremm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm    2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -239,7 +239,7 @@
</span><span class="cx">             _WKWebsiteDataTypeSearchFieldRecentSearches,
</span><span class="cx">             _WKWebsiteDataTypeResourceLoadStatistics,
</span><span class="cx">             _WKWebsiteDataTypeCredentials,
</span><del>-            _WKWebsiteDataTypePrivateClickMeasurements,
</del><ins>+            _WKWebsiteDataTypeAdClickAttributions,
</ins><span class="cx">             _WKWebsiteDataTypeAlternativeServices
</span><span class="cx"> #if !TARGET_OS_IPHONE
</span><span class="cx">             , _WKWebsiteDataTypePlugInData
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessCocoaWebProcessPoolCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm       2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm  2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -475,7 +475,7 @@
</span><span class="cx">     parameters.uiProcessCookieStorageIdentifier = identifyingDataFromCookieStorage([[NSHTTPCookieStorage sharedHTTPCookieStorage] _cookieStorage]);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    parameters.enablePrivateClickMeasurementDebugMode = [defaults boolForKey:[NSString stringWithFormat:@"Experimental%@", WebPreferencesKey::privateClickMeasurementDebugModeEnabledKey().createCFString().get()]];
</del><ins>+    parameters.enableAdClickAttributionDebugMode = [defaults boolForKey:[NSString stringWithFormat:@"Experimental%@", WebPreferencesKey::adClickAttributionDebugModeEnabledKey().createCFString().get()]];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebProcessPool::platformInvalidateContext()
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessInspectorWebInspectorProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp    2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -654,9 +654,9 @@
</span><span class="cx"> void WebInspectorProxy::setDeveloperPreferenceOverride(WebCore::InspectorClient::DeveloperPreference developerPreference, Optional<bool> overrideValue)
</span><span class="cx"> {
</span><span class="cx">     switch (developerPreference) {
</span><del>-    case InspectorClient::DeveloperPreference::PrivateClickMeasurementDebugModeEnabled:
</del><ins>+    case InspectorClient::DeveloperPreference::AdClickAttributionDebugModeEnabled:
</ins><span class="cx">         if (m_inspectedPage)
</span><del>-            m_inspectedPage->websiteDataStore().setPrivateClickMeasurementDebugMode(overrideValue && overrideValue.value());
</del><ins>+            m_inspectedPage->websiteDataStore().setAdClickAttributionDebugMode(overrideValue && overrideValue.value());
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     case InspectorClient::DeveloperPreference::ITPDebugModeEnabled:
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessNetworkNetworkProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp    2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1272,12 +1272,12 @@
</span><span class="cx"> }
</span><span class="cx"> #endif // ENABLE(RESOURCE_LOAD_STATISTICS)
</span><span class="cx"> 
</span><del>-void NetworkProcessProxy::setPrivateClickMeasurementDebugMode(bool debugMode)
</del><ins>+void NetworkProcessProxy::setAdClickAttributionDebugMode(bool debugMode)
</ins><span class="cx"> {
</span><span class="cx">     if (!canSendMessage())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    send(Messages::NetworkProcess::SetPrivateClickMeasurementDebugMode(debugMode), 0);
</del><ins>+    send(Messages::NetworkProcess::SetAdClickAttributionDebugMode(debugMode), 0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void NetworkProcessProxy::sendProcessWillSuspendImminentlyForTesting()
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessNetworkNetworkProcessProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h      2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h 2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -202,7 +202,7 @@
</span><span class="cx">     void setDomainsWithUserInteraction(HashSet<WebCore::RegistrableDomain>&&);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    void setPrivateClickMeasurementDebugMode(bool);
</del><ins>+    void setAdClickAttributionDebugMode(bool);
</ins><span class="cx">     
</span><span class="cx">     void synthesizeAppIsBackground(bool background);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp   2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp      2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -139,6 +139,7 @@
</span><span class="cx"> #include "WebViewDidMoveToWindowObserver.h"
</span><span class="cx"> #include "WebWheelEventCoalescer.h"
</span><span class="cx"> #include "WebsiteDataStore.h"
</span><ins>+#include <WebCore/AdClickAttribution.h>
</ins><span class="cx"> #include <WebCore/BitmapImage.h>
</span><span class="cx"> #include <WebCore/CompositionHighlight.h>
</span><span class="cx"> #include <WebCore/CrossSiteNavigationDataTransfer.h>
</span><span class="lines">@@ -162,7 +163,6 @@
</span><span class="cx"> #include <WebCore/MediaStreamRequest.h>
</span><span class="cx"> #include <WebCore/PerformanceLoggingClient.h>
</span><span class="cx"> #include <WebCore/PlatformEvent.h>
</span><del>-#include <WebCore/PrivateClickMeasurement.h>
</del><span class="cx"> #include <WebCore/PublicSuffix.h>
</span><span class="cx"> #include <WebCore/RenderEmbeddedObject.h>
</span><span class="cx"> #include <WebCore/ResourceLoadStatistics.h>
</span><span class="lines">@@ -4652,17 +4652,17 @@
</span><span class="cx">     frame->didCommitLoad(mimeType, webCertificateInfo, containsPluginDocument);
</span><span class="cx"> 
</span><span class="cx">     if (frame->isMainFrame()) {
</span><del>-        Optional<WebCore::PrivateClickMeasurement> privateClickMeasurement;
-        if (m_newPageNavigationPrivateClickMeasurement)
-            privateClickMeasurement = m_newPageNavigationPrivateClickMeasurement;
-        else if (navigation && navigation->privateClickMeasurement())
-            privateClickMeasurement = navigation->privateClickMeasurement();
-        if (privateClickMeasurement) {
-            if (privateClickMeasurement->destination().matches(frame->url()))
-                websiteDataStore().networkProcess().send(Messages::NetworkProcess::StorePrivateClickMeasurement(m_websiteDataStore->sessionID(), *privateClickMeasurement), 0);
</del><ins>+        Optional<WebCore::AdClickAttribution> adClickAttribution;
+        if (m_newPageNavigationAdClickAttribution)
+            adClickAttribution = m_newPageNavigationAdClickAttribution;
+        else if (navigation && navigation->adClickAttribution())
+            adClickAttribution = navigation->adClickAttribution();
+        if (adClickAttribution) {
+            if (adClickAttribution->destination().matches(frame->url()))
+                websiteDataStore().networkProcess().send(Messages::NetworkProcess::StoreAdClickAttribution(m_websiteDataStore->sessionID(), *adClickAttribution), 0);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><del>-    m_newPageNavigationPrivateClickMeasurement.reset();
</del><ins>+    m_newPageNavigationAdClickAttribution.reset();
</ins><span class="cx"> 
</span><span class="cx">     if (frame->isMainFrame()) {
</span><span class="cx">         m_mainFrameHasCustomContentProvider = frameHasCustomContentProvider;
</span><span class="lines">@@ -5524,7 +5524,7 @@
</span><span class="cx">     auto* originatingPage = m_process->webPage(originatingPageID);
</span><span class="cx">     auto originatingFrameInfo = API::FrameInfo::create(WTFMove(originatingFrameInfoData), originatingPage);
</span><span class="cx">     auto mainFrameURL = m_mainFrame ? m_mainFrame->url() : URL();
</span><del>-    auto completionHandler = [this, protectedThis = makeRef(*this), mainFrameURL, request, reply = WTFMove(reply), privateClickMeasurement = navigationActionData.privateClickMeasurement] (RefPtr<WebPageProxy> newPage) mutable {
</del><ins>+    auto completionHandler = [this, protectedThis = makeRef(*this), mainFrameURL, request, reply = WTFMove(reply), adClickAttribution = navigationActionData.adClickAttribution] (RefPtr<WebPageProxy> newPage) mutable {
</ins><span class="cx">         if (!newPage) {
</span><span class="cx">             reply(WTF::nullopt, WTF::nullopt);
</span><span class="cx">             return;
</span><span class="lines">@@ -5536,7 +5536,7 @@
</span><span class="cx"> 
</span><span class="cx">         newPage->m_shouldSuppressAppLinksInNextNavigationPolicyDecision = mainFrameURL.host() == request.url().host();
</span><span class="cx"> 
</span><del>-        newPage->m_newPageNavigationPrivateClickMeasurement = privateClickMeasurement;
</del><ins>+        newPage->m_newPageNavigationAdClickAttribution = adClickAttribution;
</ins><span class="cx"> #if HAVE(APP_SSO)
</span><span class="cx">         newPage->m_shouldSuppressSOAuthorizationInNextNavigationPolicyDecision = true;
</span><span class="cx"> #endif
</span><span class="lines">@@ -9956,29 +9956,29 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void WebPageProxy::dumpPrivateClickMeasurement(CompletionHandler<void(const String&)>&& completionHandler)
</del><ins>+void WebPageProxy::dumpAdClickAttribution(CompletionHandler<void(const String&)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    websiteDataStore().networkProcess().sendWithAsyncReply(Messages::NetworkProcess::DumpPrivateClickMeasurement(m_websiteDataStore->sessionID()), WTFMove(completionHandler));
</del><ins>+    websiteDataStore().networkProcess().sendWithAsyncReply(Messages::NetworkProcess::DumpAdClickAttribution(m_websiteDataStore->sessionID()), WTFMove(completionHandler));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::clearPrivateClickMeasurement(CompletionHandler<void()>&& completionHandler)
</del><ins>+void WebPageProxy::clearAdClickAttribution(CompletionHandler<void()>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    websiteDataStore().networkProcess().sendWithAsyncReply(Messages::NetworkProcess::ClearPrivateClickMeasurement(m_websiteDataStore->sessionID()), WTFMove(completionHandler));
</del><ins>+    websiteDataStore().networkProcess().sendWithAsyncReply(Messages::NetworkProcess::ClearAdClickAttribution(m_websiteDataStore->sessionID()), WTFMove(completionHandler));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::setPrivateClickMeasurementOverrideTimerForTesting(bool value, CompletionHandler<void()>&& completionHandler)
</del><ins>+void WebPageProxy::setAdClickAttributionOverrideTimerForTesting(bool value, CompletionHandler<void()>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    websiteDataStore().networkProcess().sendWithAsyncReply(Messages::NetworkProcess::SetPrivateClickMeasurementOverrideTimerForTesting(m_websiteDataStore->sessionID(), value), WTFMove(completionHandler));
</del><ins>+    websiteDataStore().networkProcess().sendWithAsyncReply(Messages::NetworkProcess::SetAdClickAttributionOverrideTimerForTesting(m_websiteDataStore->sessionID(), value), WTFMove(completionHandler));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::setPrivateClickMeasurementConversionURLForTesting(const URL& url, CompletionHandler<void()>&& completionHandler)
</del><ins>+void WebPageProxy::setAdClickAttributionConversionURLForTesting(const URL& url, CompletionHandler<void()>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    websiteDataStore().networkProcess().sendWithAsyncReply(Messages::NetworkProcess::SetPrivateClickMeasurementConversionURLForTesting(m_websiteDataStore->sessionID(), url), WTFMove(completionHandler));
</del><ins>+    websiteDataStore().networkProcess().sendWithAsyncReply(Messages::NetworkProcess::SetAdClickAttributionConversionURLForTesting(m_websiteDataStore->sessionID(), url), WTFMove(completionHandler));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::markPrivateClickMeasurementsAsExpiredForTesting(CompletionHandler<void()>&& completionHandler)
</del><ins>+void WebPageProxy::markAdClickAttributionsAsExpiredForTesting(CompletionHandler<void()>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    websiteDataStore().networkProcess().sendWithAsyncReply(Messages::NetworkProcess::MarkPrivateClickMeasurementsAsExpiredForTesting(m_websiteDataStore->sessionID()), WTFMove(completionHandler));
</del><ins>+    websiteDataStore().networkProcess().sendWithAsyncReply(Messages::NetworkProcess::MarkAdClickAttributionsAsExpiredForTesting(m_websiteDataStore->sessionID()), WTFMove(completionHandler));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SPEECH_SYNTHESIS)
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebPageProxy.h     2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h        2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1684,11 +1684,11 @@
</span><span class="cx">     void contentFilterDidBlockLoadForFrameShared(Ref<WebProcessProxy>&&, const WebCore::ContentFilterUnblockHandler&, WebCore::FrameIdentifier);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    void dumpPrivateClickMeasurement(CompletionHandler<void(const String&)>&&);
-    void clearPrivateClickMeasurement(CompletionHandler<void()>&&);
-    void setPrivateClickMeasurementOverrideTimerForTesting(bool value, CompletionHandler<void()>&&);
-    void setPrivateClickMeasurementConversionURLForTesting(const URL&, CompletionHandler<void()>&&);
-    void markPrivateClickMeasurementsAsExpiredForTesting(CompletionHandler<void()>&&);
</del><ins>+    void dumpAdClickAttribution(CompletionHandler<void(const String&)>&&);
+    void clearAdClickAttribution(CompletionHandler<void()>&&);
+    void setAdClickAttributionOverrideTimerForTesting(bool value, CompletionHandler<void()>&&);
+    void setAdClickAttributionConversionURLForTesting(const URL&, CompletionHandler<void()>&&);
+    void markAdClickAttributionsAsExpiredForTesting(CompletionHandler<void()>&&);
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(SPEECH_SYNTHESIS)
</span><span class="cx">     void speechSynthesisVoiceList(CompletionHandler<void(Vector<WebSpeechSynthesisVoice>&&)>&&);
</span><span class="lines">@@ -2887,7 +2887,7 @@
</span><span class="cx"> 
</span><span class="cx">     size_t m_suspendMediaPlaybackCounter { 0 };
</span><span class="cx"> 
</span><del>-    Optional<WebCore::PrivateClickMeasurement> m_newPageNavigationPrivateClickMeasurement;
</del><ins>+    Optional<WebCore::AdClickAttribution> m_newPageNavigationAdClickAttribution;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebsiteDataWebsiteDataStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp   2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp      2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -2050,9 +2050,9 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebsiteDataStore::setPrivateClickMeasurementDebugMode(bool enabled)
</del><ins>+void WebsiteDataStore::setAdClickAttributionDebugMode(bool enabled)
</ins><span class="cx"> {
</span><del>-    networkProcess().setPrivateClickMeasurementDebugMode(enabled);
</del><ins>+    networkProcess().setAdClickAttributionDebugMode(enabled);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(RESOURCE_LOAD_STATISTICS)
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebsiteDataWebsiteDataStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h     2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h        2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -149,7 +149,7 @@
</span><span class="cx">     void setResourceLoadStatisticsDebugMode(bool, CompletionHandler<void()>&&);
</span><span class="cx">     void isResourceLoadStatisticsEphemeral(CompletionHandler<void(bool)>&&) const;
</span><span class="cx"> 
</span><del>-    void setPrivateClickMeasurementDebugMode(bool);
</del><ins>+    void setAdClickAttributionDebugMode(bool);
</ins><span class="cx"> 
</span><span class="cx">     uint64_t perOriginStorageQuota() const { return m_resolvedConfiguration->perOriginStorageQuota(); }
</span><span class="cx">     uint64_t perThirdPartyOriginStorageQuota() const;
</span></span></pre></div>
<a id="trunkSourceWebKitWebKitxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj     2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj        2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1239,7 +1239,7 @@
</span><span class="cx">          63C32C281E98119000699BD0 /* _WKGeolocationPositionInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 63C32C271E98119000699BD0 /* _WKGeolocationPositionInternal.h */; };
</span><span class="cx">          65B86F1E12F11DE300B7DD8A /* WKBundleInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 65B86F1812F11D7B00B7DD8A /* WKBundleInspector.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          6A5080BF1F0EDAAA00E617C5 /* WKWindowFeaturesPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A5080BE1F0EDAAA00E617C5 /* WKWindowFeaturesPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-               6BD05865220CE8C2000BED5C /* PrivateClickMeasurementManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BD05863220CE8C2000BED5C /* PrivateClickMeasurementManager.h */; };
</del><ins>+                6BD05865220CE8C2000BED5C /* AdClickAttributionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BD05863220CE8C2000BED5C /* AdClickAttributionManager.h */; };
</ins><span class="cx">           6BE969C11E54D452008B7483 /* corePrediction_model in Resources */ = {isa = PBXBuildFile; fileRef = 6BE969C01E54D452008B7483 /* corePrediction_model */; };
</span><span class="cx">          6BE969CB1E54D4CF008B7483 /* ResourceLoadStatisticsClassifierCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BE969C91E54D4CF008B7483 /* ResourceLoadStatisticsClassifierCocoa.h */; };
</span><span class="cx">          6BE969CD1E54E054008B7483 /* ResourceLoadStatisticsClassifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BE969CC1E54E054008B7483 /* ResourceLoadStatisticsClassifier.h */; };
</span><span class="lines">@@ -4224,8 +4224,8 @@
</span><span class="cx">          65B86F1712F11D7B00B7DD8A /* WKBundleInspector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKBundleInspector.cpp; sourceTree = "<group>"; };
</span><span class="cx">          65B86F1812F11D7B00B7DD8A /* WKBundleInspector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBundleInspector.h; sourceTree = "<group>"; };
</span><span class="cx">          6A5080BE1F0EDAAA00E617C5 /* WKWindowFeaturesPrivate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WKWindowFeaturesPrivate.h; sourceTree = "<group>"; };
</span><del>-               6BD05863220CE8C2000BED5C /* PrivateClickMeasurementManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrivateClickMeasurementManager.h; sourceTree = "<group>"; };
-               6BD05864220CE8C2000BED5C /* PrivateClickMeasurementManager.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PrivateClickMeasurementManager.cpp; sourceTree = "<group>"; };
</del><ins>+                6BD05863220CE8C2000BED5C /* AdClickAttributionManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AdClickAttributionManager.h; sourceTree = "<group>"; };
+               6BD05864220CE8C2000BED5C /* AdClickAttributionManager.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AdClickAttributionManager.cpp; sourceTree = "<group>"; };
</ins><span class="cx">           6BE969C01E54D452008B7483 /* corePrediction_model */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = corePrediction_model; sourceTree = "<group>"; };
</span><span class="cx">          6BE969C61E54D4B6008B7483 /* ResourceLoadStatisticsClassifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceLoadStatisticsClassifier.cpp; sourceTree = "<group>"; };
</span><span class="cx">          6BE969C81E54D4CF008B7483 /* ResourceLoadStatisticsClassifierCocoa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceLoadStatisticsClassifierCocoa.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -7916,6 +7916,8 @@
</span><span class="cx">                          93BA04D92151ADCD007F455F /* ServiceWorker */,
</span><span class="cx">                          413075971DE84ED70039EC69 /* webrtc */,
</span><span class="cx">                          93B26143227D143100B97A76 /* WebStorage */,
</span><ins>+                               6BD05864220CE8C2000BED5C /* AdClickAttributionManager.cpp */,
+                               6BD05863220CE8C2000BED5C /* AdClickAttributionManager.h */,
</ins><span class="cx">                           53F3CAA5206C443E0086490E /* NetworkActivityTracker.cpp */,
</span><span class="cx">                          535BCB902069C49C00CCCE02 /* NetworkActivityTracker.h */,
</span><span class="cx">                          513A16491630A9BF005D7D22 /* NetworkConnectionToWebProcess.cpp */,
</span><span class="lines">@@ -7970,8 +7972,6 @@
</span><span class="cx">                          5CE85B1F1C88E6430070BFCE /* PingLoad.h */,
</span><span class="cx">                          83A0ED331F747CC7003299EB /* PreconnectTask.cpp */,
</span><span class="cx">                          83A0ED321F747CC6003299EB /* PreconnectTask.h */,
</span><del>-                               6BD05864220CE8C2000BED5C /* PrivateClickMeasurementManager.cpp */,
-                               6BD05863220CE8C2000BED5C /* PrivateClickMeasurementManager.h */,
</del><span class="cx">                           E1B78470163F24690007B692 /* RemoteNetworkingContext.h */,
</span><span class="cx">                          41287D4D225C161F009A3E26 /* WebSocketTask.h */,
</span><span class="cx">                  );
</span><span class="lines">@@ -10894,6 +10894,7 @@
</span><span class="cx">                          A182D5B51BE6BD250087A7CC /* AccessibilityIOS.h in Headers */,
</span><span class="cx">                          E3CAAA442413279900CED2E2 /* AccessibilitySupportSPI.h in Headers */,
</span><span class="cx">                          A7D792D81767CCA300881CBE /* ActivityAssertion.h in Headers */,
</span><ins>+                               6BD05865220CE8C2000BED5C /* AdClickAttributionManager.h in Headers */,
</ins><span class="cx">                           634842511FB26E7100946E3C /* APIApplicationManifest.h in Headers */,
</span><span class="cx">                          BC64697011DBE603006455B0 /* APIArray.h in Headers */,
</span><span class="cx">                          2E5C770E1FA7D429005932C3 /* APIAttachment.h in Headers */,
</span><span class="lines">@@ -11286,7 +11287,6 @@
</span><span class="cx">                          C15CBB3623F3777100300CC7 /* PreferenceObserver.h in Headers */,
</span><span class="cx">                          AAB145E6223F931200E489D8 /* PrefetchCache.h in Headers */,
</span><span class="cx">                          E1CC1B9012D7EADF00625838 /* PrintInfo.h in Headers */,
</span><del>-                               6BD05865220CE8C2000BED5C /* PrivateClickMeasurementManager.h in Headers */,
</del><span class="cx">                           86F9536518FF58F5001DB2EF /* ProcessAssertion.h in Headers */,
</span><span class="cx">                          BC1A7C581136E19C00FB7167 /* ProcessLauncher.h in Headers */,
</span><span class="cx">                          463FD4821EB94EC000A2982C /* ProcessTerminationReason.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebCoreSupportWebChromeClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp        2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp   2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -270,7 +270,7 @@
</span><span class="cx">     navigationActionData.canHandleRequest = m_page.canHandleRequest(navigationAction.resourceRequest());
</span><span class="cx">     navigationActionData.shouldOpenExternalURLsPolicy = navigationAction.shouldOpenExternalURLsPolicy();
</span><span class="cx">     navigationActionData.downloadAttribute = navigationAction.downloadAttribute();
</span><del>-    navigationActionData.privateClickMeasurement = navigationAction.privateClickMeasurement();
</del><ins>+    navigationActionData.adClickAttribution = navigationAction.adClickAttribution();
</ins><span class="cx"> 
</span><span class="cx">     WebFrame* webFrame = WebFrame::fromCoreFrame(frame);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebCoreSupportWebFrameLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp   2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp      2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -878,7 +878,7 @@
</span><span class="cx">     navigationActionData.canHandleRequest = webPage->canHandleRequest(request);
</span><span class="cx">     navigationActionData.shouldOpenExternalURLsPolicy = navigationAction.shouldOpenExternalURLsPolicy();
</span><span class="cx">     navigationActionData.downloadAttribute = navigationAction.downloadAttribute();
</span><del>-    navigationActionData.privateClickMeasurement = navigationAction.privateClickMeasurement();
</del><ins>+    navigationActionData.adClickAttribution = navigationAction.adClickAttribution();
</ins><span class="cx"> 
</span><span class="cx">     webPage->send(Messages::WebPageProxy::DecidePolicyForNewWindowAction(m_frame->frameID(), m_frame->info(), identifier, navigationActionData, request,
</span><span class="cx">         frameName, listenerID, UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
</span><span class="lines">@@ -985,7 +985,7 @@
</span><span class="cx">     navigationActionData.sourceBackForwardItemIdentifier = navigationAction.sourceBackForwardItemIdentifier();
</span><span class="cx">     navigationActionData.lockHistory = navigationAction.lockHistory();
</span><span class="cx">     navigationActionData.lockBackForwardList = navigationAction.lockBackForwardList();
</span><del>-    navigationActionData.privateClickMeasurement = navigationAction.privateClickMeasurement();
</del><ins>+    navigationActionData.adClickAttribution = navigationAction.adClickAttribution();
</ins><span class="cx"> 
</span><span class="cx">     auto* coreFrame = m_frame->coreFrame();
</span><span class="cx">     if (!coreFrame)
</span></span></pre></div>
<a id="trunkSourceWebKitLegacymacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/mac/ChangeLog  2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog     2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2020-11-10  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, reverting r269660.
+        https://bugs.webkit.org/show_bug.cgi?id=218786
+
+        Crashing in EWS iOS simulator bots
+
+        Reverted changeset:
+
+        "PCM: Change from ad-click-attribution to private-click-
+        measurement (in all forms, including .well-known URL)"
+        https://bugs.webkit.org/show_bug.cgi?id=218730
+        https://trac.webkit.org/changeset/269660
+
</ins><span class="cx"> 2020-11-10  Chris Dumez  <cdumez@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Webkit incorrectly setting visibilityState to "prerender" when opening link in new tab
</span></span></pre></div>
<a id="trunkSourceWebKitLegacymacWebCoreSupportWebChromeClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm  2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm     2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -124,7 +124,7 @@
</span><span class="cx"> NSString *WebConsoleMessageMediaSourceMessageSource = @"MediaSourceMessageSource";
</span><span class="cx"> NSString *WebConsoleMessageWebRTCMessageSource = @"WebRTCMessageSource";
</span><span class="cx"> NSString *WebConsoleMessageITPDebugMessageSource = @"ITPDebugMessageSource";
</span><del>-NSString *WebConsoleMessagePrivateClickMeasurementMessageSource = @"PrivateClickMeasurementMessageSource";
</del><ins>+NSString *WebConsoleMessageAdClickAttributionMessageSource = @"AdClickAttributionMessageSource";
</ins><span class="cx"> NSString *WebConsoleMessageOtherMessageSource = @"OtherMessageSource";
</span><span class="cx"> 
</span><span class="cx"> NSString *WebConsoleMessageDebugMessageLevel = @"DebugMessageLevel";
</span><span class="lines">@@ -403,8 +403,8 @@
</span><span class="cx">         return WebConsoleMessageWebRTCMessageSource;
</span><span class="cx">     case MessageSource::ITPDebug:
</span><span class="cx">         return WebConsoleMessageITPDebugMessageSource;
</span><del>-    case MessageSource::PrivateClickMeasurement:
-        return WebConsoleMessagePrivateClickMeasurementMessageSource;
</del><ins>+    case MessageSource::AdClickAttribution:
+        return WebConsoleMessageAdClickAttributionMessageSource;
</ins><span class="cx">     case MessageSource::Other:
</span><span class="cx">         return WebConsoleMessageOtherMessageSource;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebKitLegacymacWebViewWebPreferenceKeysPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h 2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -273,7 +273,7 @@
</span><span class="cx"> #define WebKitServerTimingEnabledPreferenceKey @"WebKitServerTimingEnabled"
</span><span class="cx"> #define WebKitCSSCustomPropertiesAndValuesEnabledPreferenceKey @"WebKitCSSCustomPropertiesAndValuesEnabled"
</span><span class="cx"> #define WebKitResizeObserverEnabledPreferenceKey @"WebKitResizeObserverEnabled"
</span><del>-#define WebKitPrivateClickMeasurementEnabledPreferenceKey @"WebKitPrivateClickMeasurementEnabled"
</del><ins>+#define WebKitAdClickAttributionEnabledPreferenceKey @"WebKitAdClickAttributionEnabled"
</ins><span class="cx"> #define WebKitFetchAPIKeepAliveEnabledPreferenceKey @"WebKitFetchAPIKeepAliveEnabled"
</span><span class="cx"> #define WebKitGenericCueAPIEnabledKey @"WebKitGenericCueAPIEnabled"
</span><span class="cx"> #define WebKitAspectRatioOfImgFromWidthAndHeightEnabledPreferenceKey @"WebKitAspectRatioOfImgFromWidthAndHeightEnabled"
</span></span></pre></div>
<a id="trunkSourceWebKitLegacymacWebViewWebPreferencesmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm  2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm     2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -3233,14 +3233,14 @@
</span><span class="cx">     [self _setBoolValue:flag forKey:WebKitResizeObserverEnabledPreferenceKey];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (BOOL)privateClickMeasurementEnabled
</del><ins>+- (BOOL)adClickAttributionEnabled
</ins><span class="cx"> {
</span><del>-    return [self _boolValueForKey:WebKitPrivateClickMeasurementEnabledPreferenceKey];
</del><ins>+    return [self _boolValueForKey:WebKitAdClickAttributionEnabledPreferenceKey];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)setPrivateClickMeasurementEnabled:(BOOL)flag
</del><ins>+- (void)setAdClickAttributionEnabled:(BOOL)flag
</ins><span class="cx"> {
</span><del>-    [self _setBoolValue:flag forKey:WebKitPrivateClickMeasurementEnabledPreferenceKey];
</del><ins>+    [self _setBoolValue:flag forKey:WebKitAdClickAttributionEnabledPreferenceKey];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (BOOL)fetchAPIKeepAliveEnabled
</span></span></pre></div>
<a id="trunkSourceWebKitLegacymacWebViewWebPreferencesPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h    2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -334,7 +334,7 @@
</span><span class="cx"> @property (nonatomic) BOOL serverTimingEnabled;
</span><span class="cx"> @property (nonatomic) BOOL CSSCustomPropertiesAndValuesEnabled;
</span><span class="cx"> @property (nonatomic) BOOL resizeObserverEnabled;
</span><del>-@property (nonatomic) BOOL privateClickMeasurementEnabled;
</del><ins>+@property (nonatomic) BOOL adClickAttributionEnabled;
</ins><span class="cx"> @property (nonatomic) BOOL fetchAPIKeepAliveEnabled;
</span><span class="cx"> @property (nonatomic) BOOL genericCueAPIEnabled;
</span><span class="cx"> @property (nonatomic) BOOL aspectRatioOfImgFromWidthAndHeightEnabled;
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog    2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Tools/ChangeLog       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2020-11-10  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, reverting r269660.
+        https://bugs.webkit.org/show_bug.cgi?id=218786
+
+        Crashing in EWS iOS simulator bots
+
+        Reverted changeset:
+
+        "PCM: Change from ad-click-attribution to private-click-
+        measurement (in all forms, including .well-known URL)"
+        https://bugs.webkit.org/show_bug.cgi?id=218730
+        https://trac.webkit.org/changeset/269660
+
</ins><span class="cx"> 2020-11-10  Chris Dumez  <cdumez@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Webkit incorrectly setting visibilityState to "prerender" when opening link in new tab
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeTestOptionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/TestOptions.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/TestOptions.cpp       2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Tools/DumpRenderTree/TestOptions.cpp  2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -66,6 +66,7 @@
</span><span class="cx">             // These are WebPreference values that must always be set as they may
</span><span class="cx">             // differ from the default set in the WebPreferences*.yaml configuration.
</span><span class="cx">             { "AcceleratedDrawingEnabled", false },
</span><ins>+            { "AdClickAttributionEnabled", false },
</ins><span class="cx">             { "AllowCrossOriginSubresourcesToAskForCredentials", false },
</span><span class="cx">             { "AllowFileAccessFromFileURLs", true },
</span><span class="cx">             { "AllowTopNavigationToDataURLs", true },
</span><span class="lines">@@ -95,7 +96,6 @@
</span><span class="cx">             { "ModernMediaControlsEnabled", true },
</span><span class="cx">             { "NeedsStorageAccessFromFileURLsQuirk", false },
</span><span class="cx">             { "PluginsEnabled", true },
</span><del>-            { "PrivateClickMeasurementEnabled", false },
</del><span class="cx">             { "RequestIdleCallbackEnabled", false },
</span><span class="cx">             { "ResizeObserverEnabled", false },
</span><span class="cx">             { "SelectionAcrossShadowBoundariesEnabled", true },
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj   2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -505,7 +505,7 @@
</span><span class="cx">          637281A721AE1386009E0DE6 /* DownloadProgress.mm in Sources */ = {isa = PBXBuildFile; fileRef = 637281A621AE1386009E0DE6 /* DownloadProgress.mm */; };
</span><span class="cx">          63A61B8B1FAD251100F06885 /* display-mode.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 63A61B8A1FAD204D00F06885 /* display-mode.html */; };
</span><span class="cx">          63F668221F97F7F90032EE51 /* ApplicationManifest.mm in Sources */ = {isa = PBXBuildFile; fileRef = 63F668201F97C3AA0032EE51 /* ApplicationManifest.mm */; };
</span><del>-               6B0A07F721FA9C2B00D57391 /* PrivateClickMeasurement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6B0A07F621FA9C2B00D57391 /* PrivateClickMeasurement.cpp */; };
</del><ins>+                6B0A07F721FA9C2B00D57391 /* AdClickAttribution.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6B0A07F621FA9C2B00D57391 /* AdClickAttribution.cpp */; };
</ins><span class="cx">           6B306106218A372900F5A802 /* ClosingWebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6B306105218A372900F5A802 /* ClosingWebView.mm */; };
</span><span class="cx">          6B4E861C2220A5520022F389 /* RegistrableDomain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6B4E861B2220A5520022F389 /* RegistrableDomain.cpp */; };
</span><span class="cx">          6B9ABE122086952F00D75DE6 /* HTTPParsers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6B9ABE112086952F00D75DE6 /* HTTPParsers.cpp */; };
</span><span class="lines">@@ -2271,7 +2271,7 @@
</span><span class="cx">          637281A621AE1386009E0DE6 /* DownloadProgress.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = DownloadProgress.mm; sourceTree = "<group>"; };
</span><span class="cx">          63A61B8A1FAD204D00F06885 /* display-mode.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "display-mode.html"; sourceTree = "<group>"; };
</span><span class="cx">          63F668201F97C3AA0032EE51 /* ApplicationManifest.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = ApplicationManifest.mm; sourceTree = "<group>"; };
</span><del>-               6B0A07F621FA9C2B00D57391 /* PrivateClickMeasurement.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PrivateClickMeasurement.cpp; sourceTree = "<group>"; };
</del><ins>+                6B0A07F621FA9C2B00D57391 /* AdClickAttribution.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AdClickAttribution.cpp; sourceTree = "<group>"; };
</ins><span class="cx">           6B306105218A372900F5A802 /* ClosingWebView.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = ClosingWebView.mm; sourceTree = "<group>"; };
</span><span class="cx">          6B4E861B2220A5520022F389 /* RegistrableDomain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RegistrableDomain.cpp; sourceTree = "<group>"; };
</span><span class="cx">          6B9ABE112086952F00D75DE6 /* HTTPParsers.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = HTTPParsers.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -3479,6 +3479,7 @@
</span><span class="cx">                          CD89D0371C4EDB1300040A04 /* cocoa */,
</span><span class="cx">                          A1EC11851F4253D900D0146E /* ios */,
</span><span class="cx">                          ABF510632A19B8AC7EC40E17 /* AbortableTaskQueue.cpp */,
</span><ins>+                               6B0A07F621FA9C2B00D57391 /* AdClickAttribution.cpp */,
</ins><span class="cx">                           7A909A6F1D877475007E10F8 /* AffineTransform.cpp */,
</span><span class="cx">                          57152B5D21CC2045000C37CA /* ApduTest.cpp */,
</span><span class="cx">                          6354F4D01F7C3AB500D89DF3 /* ApplicationManifestParser.cpp */,
</span><span class="lines">@@ -3524,7 +3525,6 @@
</span><span class="cx">                          A5B149DD1F5A19DC00C6DAFF /* MIMETypeRegistry.cpp */,
</span><span class="cx">                          CD225C071C45A69200140761 /* ParsedContentRange.cpp */,
</span><span class="cx">                          AA96CAB421C7DB4200FD2F97 /* ParsedContentType.cpp */,
</span><del>-                               6B0A07F621FA9C2B00D57391 /* PrivateClickMeasurement.cpp */,
</del><span class="cx">                           041A1E33216FFDBC00789E0A /* PublicSuffix.cpp */,
</span><span class="cx">                          6B4E861B2220A5520022F389 /* RegistrableDomain.cpp */,
</span><span class="cx">                          F418BE141F71B7DC001970E6 /* RoundedRectTests.cpp */,
</span><span class="lines">@@ -5040,6 +5040,7 @@
</span><span class="cx">                          2E205BA41F527746005952DD /* AccessibilityTestsIOS.mm in Sources */,
</span><span class="cx">                          9BD5111C1FE8E11600D2B630 /* AccessingPastedImage.mm in Sources */,
</span><span class="cx">                          F45B63FE1F19D410009D38B9 /* ActionSheetTests.mm in Sources */,
</span><ins>+                               6B0A07F721FA9C2B00D57391 /* AdClickAttribution.cpp in Sources */,
</ins><span class="cx">                           37E7DD641EA06FF2009B396D /* AdditionalReadAccessAllowedURLs.mm in Sources */,
</span><span class="cx">                          55A817FC218100E00004A39A /* AdditionalSupportedImageTypes.mm in Sources */,
</span><span class="cx">                          55F9D2E52205031800A9AB38 /* AdditionalSupportedImageTypes.mm in Sources */,
</span><span class="lines">@@ -5380,7 +5381,6 @@
</span><span class="cx">                          7CCE7F2C1A411B1000447C4C /* PreventImageLoadWithAutoResizing.mm in Sources */,
</span><span class="cx">                          A1EC11881F42541200D0146E /* PreviewConverter.cpp in Sources */,
</span><span class="cx">                          7CCE7F0C1A411AE600447C4C /* PrivateBrowsingPushStateNoHistoryCallback.cpp in Sources */,
</span><del>-                               6B0A07F721FA9C2B00D57391 /* PrivateClickMeasurement.cpp in Sources */,
</del><span class="cx">                           4647B1261EBA3B850041D7EF /* ProcessDidTerminate.cpp in Sources */,
</span><span class="cx">                          41882F0321010C0D002FF288 /* ProcessPreWarming.mm in Sources */,
</span><span class="cx">                          CDA4438E21F7A47700379489 /* ProcessSuspendMediaBuffering.mm in Sources */,
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebCoreAdClickAttributioncpp"></a>
<div class="addfile"><h4>Added: trunk/Tools/TestWebKitAPI/Tests/WebCore/AdClickAttribution.cpp (0 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebCore/AdClickAttribution.cpp                           (rev 0)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/AdClickAttribution.cpp      2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -0,0 +1,278 @@
</span><ins>+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include <WebCore/AdClickAttribution.h>
+#include <wtf/URL.h>
+#include <wtf/WallTime.h>
+
+using namespace WebCore;
+
+namespace TestWebKitAPI {
+
+constexpr uint32_t min6BitValue { 0 };
+
+const URL webKitURL { { }, "https://webkit.org"_s };
+const URL exampleURL { { }, "https://example.com"_s };
+const URL emptyURL { };
+
+// Positive test cases.
+
+TEST(AdClickAttribution, ValidMinValues)
+{
+    AdClickAttribution attribution { AdClickAttribution::Campaign(min6BitValue), AdClickAttribution::Source { webKitURL }, AdClickAttribution::Destination { exampleURL } };
+    attribution.convertAndGetEarliestTimeToSend(AdClickAttribution::Conversion(min6BitValue, AdClickAttribution::Priority(min6BitValue)));
+
+    auto attributionURL = attribution.reportURL();
+    
+    ASSERT_EQ(attributionURL.string(), "https://webkit.org/.well-known/ad-click-attribution/");
+
+    ASSERT_EQ(attribution.json()->toJSONString(), "{\"content-type\":\"click\",\"content-site\":\"webkit.org\",\"content-id\":0,\"conversion-site\":\"example.com\",\"conversion-data\":0,\"report-version\":1}");
+}
+
+TEST(AdClickAttribution, ValidMidValues)
+{
+    AdClickAttribution attribution { AdClickAttribution::Campaign((uint32_t)12), AdClickAttribution::Source { webKitURL }, AdClickAttribution::Destination { exampleURL } };
+    attribution.convertAndGetEarliestTimeToSend(AdClickAttribution::Conversion((uint32_t)44, AdClickAttribution::Priority((uint32_t)22)));
+
+    auto attributionURL = attribution.reportURL();
+    
+    ASSERT_EQ(attributionURL.string(), "https://webkit.org/.well-known/ad-click-attribution/");
+
+    ASSERT_EQ(attribution.json()->toJSONString(), "{\"content-type\":\"click\",\"content-site\":\"webkit.org\",\"content-id\":12,\"conversion-site\":\"example.com\",\"conversion-data\":44,\"report-version\":1}");
+}
+
+TEST(AdClickAttribution, ValidMaxValues)
+{
+    AdClickAttribution attribution { AdClickAttribution::Campaign(AdClickAttribution::MaxEntropy), AdClickAttribution::Source { webKitURL }, AdClickAttribution::Destination { exampleURL } };
+    attribution.convertAndGetEarliestTimeToSend(AdClickAttribution::Conversion(AdClickAttribution::MaxEntropy, AdClickAttribution::Priority(AdClickAttribution::MaxEntropy)));
+
+    auto attributionURL = attribution.reportURL();
+    
+    ASSERT_EQ(attributionURL.string(), "https://webkit.org/.well-known/ad-click-attribution/");
+
+    ASSERT_EQ(attribution.json()->toJSONString(), "{\"content-type\":\"click\",\"content-site\":\"webkit.org\",\"content-id\":63,\"conversion-site\":\"example.com\",\"conversion-data\":63,\"report-version\":1}");
+}
+
+TEST(AdClickAttribution, EarliestTimeToSendAttributionMinimumDelay)
+{
+    AdClickAttribution attribution { AdClickAttribution::Campaign(AdClickAttribution::MaxEntropy), AdClickAttribution::Source { webKitURL }, AdClickAttribution::Destination { exampleURL } };
+    auto now = WallTime::now();
+    attribution.convertAndGetEarliestTimeToSend(AdClickAttribution::Conversion(AdClickAttribution::MaxEntropy, AdClickAttribution::Priority(AdClickAttribution::MaxEntropy)));
+    auto earliestTimeToSend = attribution.earliestTimeToSend();
+    ASSERT_TRUE(earliestTimeToSend);
+    ASSERT_TRUE(earliestTimeToSend.value().secondsSinceEpoch() - 24_h >= now.secondsSinceEpoch());
+}
+
+TEST(AdClickAttribution, ValidConversionURLs)
+{
+    const URL conversionURLWithoutPriority { { }, "https://webkit.org/.well-known/ad-click-attribution/22"_s };
+    auto optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithoutPriority);
+    ASSERT_TRUE(optionalConversion);
+    ASSERT_EQ(optionalConversion->data, (uint32_t)22);
+
+    const URL conversionURLWithoutPriorityMaxEntropy { { }, "https://webkit.org/.well-known/ad-click-attribution/63"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithoutPriorityMaxEntropy);
+    ASSERT_TRUE(optionalConversion);
+    ASSERT_EQ(optionalConversion->data, (uint32_t)63);
+    
+    const URL conversionURLWithoutPriorityAndLeadingZero { { }, "https://webkit.org/.well-known/ad-click-attribution/02"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithoutPriorityAndLeadingZero);
+    ASSERT_TRUE(optionalConversion);
+    ASSERT_EQ(optionalConversion->data, (uint32_t)2);
+
+    const URL conversionURLWithPriority { { }, "https://webkit.org/.well-known/ad-click-attribution/22/12"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithPriority);
+    ASSERT_TRUE(optionalConversion);
+    ASSERT_EQ(optionalConversion->data, (uint32_t)22);
+    ASSERT_EQ(optionalConversion->priority, (uint32_t)12);
+
+    const URL conversionURLWithPriorityMaxEntropy { { }, "https://webkit.org/.well-known/ad-click-attribution/63/63"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithPriorityMaxEntropy);
+    ASSERT_TRUE(optionalConversion);
+    ASSERT_EQ(optionalConversion->data, (uint32_t)63);
+    ASSERT_EQ(optionalConversion->priority, (uint32_t)63);
+    
+    const URL conversionURLWithPriorityAndLeadingZero { { }, "https://webkit.org/.well-known/ad-click-attribution/22/02"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithPriorityAndLeadingZero);
+    ASSERT_TRUE(optionalConversion);
+    ASSERT_EQ(optionalConversion->data, (uint32_t)22);
+    ASSERT_EQ(optionalConversion->priority, (uint32_t)2);
+}
+
+// Negative test cases.
+
+TEST(AdClickAttribution, InvalidCampaignId)
+{
+    AdClickAttribution attribution { AdClickAttribution::Campaign(AdClickAttribution::MaxEntropy + 1), AdClickAttribution::Source { webKitURL }, AdClickAttribution::Destination { exampleURL } };
+    attribution.convertAndGetEarliestTimeToSend(AdClickAttribution::Conversion(AdClickAttribution::MaxEntropy, AdClickAttribution::Priority(AdClickAttribution::MaxEntropy)));
+
+    ASSERT_TRUE(attribution.reportURL().isEmpty());
+}
+
+TEST(AdClickAttribution, InvalidSourceHost)
+{
+    AdClickAttribution attribution { AdClickAttribution::Campaign(AdClickAttribution::MaxEntropy), AdClickAttribution::Source { emptyURL }, AdClickAttribution::Destination { exampleURL } };
+    attribution.convertAndGetEarliestTimeToSend(AdClickAttribution::Conversion(AdClickAttribution::MaxEntropy, AdClickAttribution::Priority(AdClickAttribution::MaxEntropy)));
+
+    ASSERT_TRUE(attribution.reportURL().isEmpty());
+}
+
+TEST(AdClickAttribution, InvalidDestinationHost)
+{
+    AdClickAttribution attribution { AdClickAttribution::Campaign(AdClickAttribution::MaxEntropy + 1), AdClickAttribution::Source { webKitURL }, AdClickAttribution::Destination { emptyURL } };
+    attribution.convertAndGetEarliestTimeToSend(AdClickAttribution::Conversion(AdClickAttribution::MaxEntropy, AdClickAttribution::Priority(AdClickAttribution::MaxEntropy)));
+
+    ASSERT_TRUE(attribution.reportURL().isEmpty());
+}
+
+TEST(AdClickAttribution, InvalidConversionData)
+{
+    AdClickAttribution attribution { AdClickAttribution::Campaign(AdClickAttribution::MaxEntropy), AdClickAttribution::Source { webKitURL }, AdClickAttribution::Destination { exampleURL } };
+    attribution.convertAndGetEarliestTimeToSend(AdClickAttribution::Conversion((AdClickAttribution::MaxEntropy + 1), AdClickAttribution::Priority(AdClickAttribution::MaxEntropy)));
+
+    ASSERT_TRUE(attribution.reportURL().isEmpty());
+}
+
+TEST(AdClickAttribution, InvalidPriority)
+{
+    AdClickAttribution attribution { AdClickAttribution::Campaign(AdClickAttribution::MaxEntropy), AdClickAttribution::Source { webKitURL }, AdClickAttribution::Destination { exampleURL } };
+    attribution.convertAndGetEarliestTimeToSend(AdClickAttribution::Conversion(AdClickAttribution::MaxEntropy, AdClickAttribution::Priority(AdClickAttribution::MaxEntropy + 1)));
+
+    ASSERT_TRUE(attribution.reportURL().isEmpty());
+}
+
+TEST(AdClickAttribution, InvalidMissingConversion)
+{
+    AdClickAttribution attribution { AdClickAttribution::Campaign(AdClickAttribution::MaxEntropy), AdClickAttribution::Source { webKitURL }, AdClickAttribution::Destination { exampleURL } };
+
+    ASSERT_TRUE(attribution.reportURL().isEmpty());
+    ASSERT_FALSE(attribution.earliestTimeToSend());
+}
+
+TEST(AdClickAttribution, InvalidConversionURLs)
+{
+    const URL conversionURLWithSingleDigitConversionData { { }, "https://webkit.org/.well-known/ad-click-attribution/2"_s };
+    auto optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithSingleDigitConversionData);
+    ASSERT_FALSE(optionalConversion);
+    
+    const URL conversionURLWithNonNumeralConversionData { { }, "https://webkit.org/.well-known/ad-click-attribution/2s"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithNonNumeralConversionData);
+    ASSERT_FALSE(optionalConversion);
+
+    const URL conversionURLWithNegativeConversionData { { }, "https://webkit.org/.well-known/ad-click-attribution/-2"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithNegativeConversionData);
+    ASSERT_FALSE(optionalConversion);
+
+    const URL conversionURLWithTooLargeConversionData { { }, "https://webkit.org/.well-known/ad-click-attribution/64"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithTooLargeConversionData);
+    ASSERT_FALSE(optionalConversion);
+
+    const URL conversionURLWithSingleDigitPriority { { }, "https://webkit.org/.well-known/ad-click-attribution/22/2"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithSingleDigitPriority);
+    ASSERT_FALSE(optionalConversion);
+    
+    const URL conversionURLWithNonNumeralPriority { { }, "https://webkit.org/.well-known/ad-click-attribution/22/2s"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithNonNumeralPriority);
+    ASSERT_FALSE(optionalConversion);
+    
+    const URL conversionURLWithNegativePriority { { }, "https://webkit.org/.well-known/ad-click-attribution/22/-2"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithNegativePriority);
+    ASSERT_FALSE(optionalConversion);
+    
+    const URL conversionURLWithTooLargePriority { { }, "https://webkit.org/.well-known/ad-click-attribution/22/64"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithTooLargePriority);
+    ASSERT_FALSE(optionalConversion);
+
+    const URL conversionURLWithTooLargeConversionDataAndPriority { { }, "https://webkit.org/.well-known/ad-click-attribution/64/22"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithTooLargeConversionDataAndPriority);
+    ASSERT_FALSE(optionalConversion);
+
+    const URL conversionURLWithTooLargeConversionDataAndTooLargePriority { { }, "https://webkit.org/.well-known/ad-click-attribution/64/64"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithTooLargeConversionDataAndTooLargePriority);
+    ASSERT_FALSE(optionalConversion);
+
+    const URL conversionURLWithExtraLeadingSlash = { { }, "https://webkit.org/.well-known/ad-click-attribution//22/12"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithExtraLeadingSlash);
+    ASSERT_FALSE(optionalConversion);
+
+    const URL conversionURLWithExtraTrailingSlash = { { }, "https://webkit.org/.well-known/ad-click-attribution/22/12/"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithExtraTrailingSlash);
+    ASSERT_FALSE(optionalConversion);
+
+    const URL conversionURLWithTrailingQuestionMark = { { }, "https://webkit.org/.well-known/ad-click-attribution/22/12?"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithTrailingQuestionMark);
+    ASSERT_FALSE(optionalConversion);
+}
+
+TEST(AdClickAttribution, InvalidConversionWithDisallowedURLComponents)
+{
+    // Protocol.
+    const URL conversionURLWithHttpProtocol { { }, "http://webkit.org/.well-known/ad-click-attribution/2"_s };
+    auto optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithHttpProtocol);
+    ASSERT_FALSE(optionalConversion);
+
+    const URL conversionURLWithWssProtocol { { }, "wss://webkit.org/.well-known/ad-click-attribution/2"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithWssProtocol);
+    ASSERT_FALSE(optionalConversion);
+
+    const URL conversionURLWithFileProtocol { { }, "file:///.well-known/ad-click-attribution/2"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithFileProtocol);
+    ASSERT_FALSE(optionalConversion);
+
+    // Username and password.
+    const URL conversionURLWithUserName { { }, "https://user@webkit.org/.well-known/ad-click-attribution/2"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithUserName);
+    ASSERT_FALSE(optionalConversion);
+
+    const URL conversionURLWithPassword = { { }, "https://:pwd@webkit.org/.well-known/ad-click-attribution/22/12?"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithPassword);
+    ASSERT_FALSE(optionalConversion);
+
+    const URL conversionURLWithUsernameAndPassword = { { }, "https://user:pwd@webkit.org/.well-known/ad-click-attribution/22/12?"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithUsernameAndPassword);
+    ASSERT_FALSE(optionalConversion);
+
+    // Query string.
+    const URL conversionURLWithTrailingQuestionMark = { { }, "https://webkit.org/.well-known/ad-click-attribution/22/12?"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithTrailingQuestionMark);
+    ASSERT_FALSE(optionalConversion);
+
+    const URL conversionURLWithQueryString = { { }, "https://webkit.org/.well-known/ad-click-attribution/22/12?extra=data"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithQueryString);
+    ASSERT_FALSE(optionalConversion);
+    
+    // Fragment.
+    const URL conversionURLWithTrailingHash = { { }, "https://webkit.org/.well-known/ad-click-attribution/22/12#"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithTrailingHash);
+    ASSERT_FALSE(optionalConversion);
+
+    const URL conversionURLWithFragment = { { }, "https://webkit.org/.well-known/ad-click-attribution/22/12#fragment"_s };
+    optionalConversion = AdClickAttribution::parseConversionRequest(conversionURLWithFragment);
+    ASSERT_FALSE(optionalConversion);
+}
+
+} // namespace TestWebKitAPI
</ins></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebCorePrivateClickMeasurementcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp      2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp 2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1,278 +0,0 @@
</span><del>-/*
- * Copyright (C) 2019 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include <WebCore/PrivateClickMeasurement.h>
-#include <wtf/URL.h>
-#include <wtf/WallTime.h>
-
-using namespace WebCore;
-
-namespace TestWebKitAPI {
-
-constexpr uint32_t min6BitValue { 0 };
-
-const URL webKitURL { { }, "https://webkit.org"_s };
-const URL exampleURL { { }, "https://example.com"_s };
-const URL emptyURL { };
-
-// Positive test cases.
-
-TEST(PrivateClickMeasurement, ValidMinValues)
-{
-    PrivateClickMeasurement attribution { PrivateClickMeasurement::Campaign(min6BitValue), PrivateClickMeasurement::Source { webKitURL }, PrivateClickMeasurement::Destination { exampleURL } };
-    attribution.convertAndGetEarliestTimeToSend(PrivateClickMeasurement::Conversion(min6BitValue, PrivateClickMeasurement::Priority(min6BitValue)));
-
-    auto attributionURL = attribution.reportURL();
-    
-    ASSERT_EQ(attributionURL.string(), "https://webkit.org/.well-known/private-click-measurement/");
-
-    ASSERT_EQ(attribution.json()->toJSONString(), "{\"content-type\":\"click\",\"content-site\":\"webkit.org\",\"content-id\":0,\"conversion-site\":\"example.com\",\"conversion-data\":0,\"report-version\":1}");
-}
-
-TEST(PrivateClickMeasurement, ValidMidValues)
-{
-    PrivateClickMeasurement attribution { PrivateClickMeasurement::Campaign((uint32_t)12), PrivateClickMeasurement::Source { webKitURL }, PrivateClickMeasurement::Destination { exampleURL } };
-    attribution.convertAndGetEarliestTimeToSend(PrivateClickMeasurement::Conversion((uint32_t)44, PrivateClickMeasurement::Priority((uint32_t)22)));
-
-    auto attributionURL = attribution.reportURL();
-    
-    ASSERT_EQ(attributionURL.string(), "https://webkit.org/.well-known/private-click-measurement/");
-
-    ASSERT_EQ(attribution.json()->toJSONString(), "{\"content-type\":\"click\",\"content-site\":\"webkit.org\",\"content-id\":12,\"conversion-site\":\"example.com\",\"conversion-data\":44,\"report-version\":1}");
-}
-
-TEST(PrivateClickMeasurement, ValidMaxValues)
-{
-    PrivateClickMeasurement attribution { PrivateClickMeasurement::Campaign(PrivateClickMeasurement::MaxEntropy), PrivateClickMeasurement::Source { webKitURL }, PrivateClickMeasurement::Destination { exampleURL } };
-    attribution.convertAndGetEarliestTimeToSend(PrivateClickMeasurement::Conversion(PrivateClickMeasurement::MaxEntropy, PrivateClickMeasurement::Priority(PrivateClickMeasurement::MaxEntropy)));
-
-    auto attributionURL = attribution.reportURL();
-    
-    ASSERT_EQ(attributionURL.string(), "https://webkit.org/.well-known/private-click-measurement/");
-
-    ASSERT_EQ(attribution.json()->toJSONString(), "{\"content-type\":\"click\",\"content-site\":\"webkit.org\",\"content-id\":63,\"conversion-site\":\"example.com\",\"conversion-data\":63,\"report-version\":1}");
-}
-
-TEST(PrivateClickMeasurement, EarliestTimeToSendAttributionMinimumDelay)
-{
-    PrivateClickMeasurement attribution { PrivateClickMeasurement::Campaign(PrivateClickMeasurement::MaxEntropy), PrivateClickMeasurement::Source { webKitURL }, PrivateClickMeasurement::Destination { exampleURL } };
-    auto now = WallTime::now();
-    attribution.convertAndGetEarliestTimeToSend(PrivateClickMeasurement::Conversion(PrivateClickMeasurement::MaxEntropy, PrivateClickMeasurement::Priority(PrivateClickMeasurement::MaxEntropy)));
-    auto earliestTimeToSend = attribution.earliestTimeToSend();
-    ASSERT_TRUE(earliestTimeToSend);
-    ASSERT_TRUE(earliestTimeToSend.value().secondsSinceEpoch() - 24_h >= now.secondsSinceEpoch());
-}
-
-TEST(PrivateClickMeasurement, ValidConversionURLs)
-{
-    const URL conversionURLWithoutPriority { { }, "https://webkit.org/.well-known/private-click-measurement/22"_s };
-    auto optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithoutPriority);
-    ASSERT_TRUE(optionalConversion);
-    ASSERT_EQ(optionalConversion->data, (uint32_t)22);
-
-    const URL conversionURLWithoutPriorityMaxEntropy { { }, "https://webkit.org/.well-known/private-click-measurement/63"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithoutPriorityMaxEntropy);
-    ASSERT_TRUE(optionalConversion);
-    ASSERT_EQ(optionalConversion->data, (uint32_t)63);
-    
-    const URL conversionURLWithoutPriorityAndLeadingZero { { }, "https://webkit.org/.well-known/private-click-measurement/02"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithoutPriorityAndLeadingZero);
-    ASSERT_TRUE(optionalConversion);
-    ASSERT_EQ(optionalConversion->data, (uint32_t)2);
-
-    const URL conversionURLWithPriority { { }, "https://webkit.org/.well-known/private-click-measurement/22/12"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithPriority);
-    ASSERT_TRUE(optionalConversion);
-    ASSERT_EQ(optionalConversion->data, (uint32_t)22);
-    ASSERT_EQ(optionalConversion->priority, (uint32_t)12);
-
-    const URL conversionURLWithPriorityMaxEntropy { { }, "https://webkit.org/.well-known/private-click-measurement/63/63"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithPriorityMaxEntropy);
-    ASSERT_TRUE(optionalConversion);
-    ASSERT_EQ(optionalConversion->data, (uint32_t)63);
-    ASSERT_EQ(optionalConversion->priority, (uint32_t)63);
-    
-    const URL conversionURLWithPriorityAndLeadingZero { { }, "https://webkit.org/.well-known/private-click-measurement/22/02"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithPriorityAndLeadingZero);
-    ASSERT_TRUE(optionalConversion);
-    ASSERT_EQ(optionalConversion->data, (uint32_t)22);
-    ASSERT_EQ(optionalConversion->priority, (uint32_t)2);
-}
-
-// Negative test cases.
-
-TEST(PrivateClickMeasurement, InvalidCampaignId)
-{
-    PrivateClickMeasurement attribution { PrivateClickMeasurement::Campaign(PrivateClickMeasurement::MaxEntropy + 1), PrivateClickMeasurement::Source { webKitURL }, PrivateClickMeasurement::Destination { exampleURL } };
-    attribution.convertAndGetEarliestTimeToSend(PrivateClickMeasurement::Conversion(PrivateClickMeasurement::MaxEntropy, PrivateClickMeasurement::Priority(PrivateClickMeasurement::MaxEntropy)));
-
-    ASSERT_TRUE(attribution.reportURL().isEmpty());
-}
-
-TEST(PrivateClickMeasurement, InvalidSourceHost)
-{
-    PrivateClickMeasurement attribution { PrivateClickMeasurement::Campaign(PrivateClickMeasurement::MaxEntropy), PrivateClickMeasurement::Source { emptyURL }, PrivateClickMeasurement::Destination { exampleURL } };
-    attribution.convertAndGetEarliestTimeToSend(PrivateClickMeasurement::Conversion(PrivateClickMeasurement::MaxEntropy, PrivateClickMeasurement::Priority(PrivateClickMeasurement::MaxEntropy)));
-
-    ASSERT_TRUE(attribution.reportURL().isEmpty());
-}
-
-TEST(PrivateClickMeasurement, InvalidDestinationHost)
-{
-    PrivateClickMeasurement attribution { PrivateClickMeasurement::Campaign(PrivateClickMeasurement::MaxEntropy + 1), PrivateClickMeasurement::Source { webKitURL }, PrivateClickMeasurement::Destination { emptyURL } };
-    attribution.convertAndGetEarliestTimeToSend(PrivateClickMeasurement::Conversion(PrivateClickMeasurement::MaxEntropy, PrivateClickMeasurement::Priority(PrivateClickMeasurement::MaxEntropy)));
-
-    ASSERT_TRUE(attribution.reportURL().isEmpty());
-}
-
-TEST(PrivateClickMeasurement, InvalidConversionData)
-{
-    PrivateClickMeasurement attribution { PrivateClickMeasurement::Campaign(PrivateClickMeasurement::MaxEntropy), PrivateClickMeasurement::Source { webKitURL }, PrivateClickMeasurement::Destination { exampleURL } };
-    attribution.convertAndGetEarliestTimeToSend(PrivateClickMeasurement::Conversion((PrivateClickMeasurement::MaxEntropy + 1), PrivateClickMeasurement::Priority(PrivateClickMeasurement::MaxEntropy)));
-
-    ASSERT_TRUE(attribution.reportURL().isEmpty());
-}
-
-TEST(PrivateClickMeasurement, InvalidPriority)
-{
-    PrivateClickMeasurement attribution { PrivateClickMeasurement::Campaign(PrivateClickMeasurement::MaxEntropy), PrivateClickMeasurement::Source { webKitURL }, PrivateClickMeasurement::Destination { exampleURL } };
-    attribution.convertAndGetEarliestTimeToSend(PrivateClickMeasurement::Conversion(PrivateClickMeasurement::MaxEntropy, PrivateClickMeasurement::Priority(PrivateClickMeasurement::MaxEntropy + 1)));
-
-    ASSERT_TRUE(attribution.reportURL().isEmpty());
-}
-
-TEST(PrivateClickMeasurement, InvalidMissingConversion)
-{
-    PrivateClickMeasurement attribution { PrivateClickMeasurement::Campaign(PrivateClickMeasurement::MaxEntropy), PrivateClickMeasurement::Source { webKitURL }, PrivateClickMeasurement::Destination { exampleURL } };
-
-    ASSERT_TRUE(attribution.reportURL().isEmpty());
-    ASSERT_FALSE(attribution.earliestTimeToSend());
-}
-
-TEST(PrivateClickMeasurement, InvalidConversionURLs)
-{
-    const URL conversionURLWithSingleDigitConversionData { { }, "https://webkit.org/.well-known/private-click-measurement/2"_s };
-    auto optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithSingleDigitConversionData);
-    ASSERT_FALSE(optionalConversion);
-    
-    const URL conversionURLWithNonNumeralConversionData { { }, "https://webkit.org/.well-known/private-click-measurement/2s"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithNonNumeralConversionData);
-    ASSERT_FALSE(optionalConversion);
-
-    const URL conversionURLWithNegativeConversionData { { }, "https://webkit.org/.well-known/private-click-measurement/-2"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithNegativeConversionData);
-    ASSERT_FALSE(optionalConversion);
-
-    const URL conversionURLWithTooLargeConversionData { { }, "https://webkit.org/.well-known/private-click-measurement/64"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithTooLargeConversionData);
-    ASSERT_FALSE(optionalConversion);
-
-    const URL conversionURLWithSingleDigitPriority { { }, "https://webkit.org/.well-known/private-click-measurement/22/2"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithSingleDigitPriority);
-    ASSERT_FALSE(optionalConversion);
-    
-    const URL conversionURLWithNonNumeralPriority { { }, "https://webkit.org/.well-known/private-click-measurement/22/2s"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithNonNumeralPriority);
-    ASSERT_FALSE(optionalConversion);
-    
-    const URL conversionURLWithNegativePriority { { }, "https://webkit.org/.well-known/private-click-measurement/22/-2"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithNegativePriority);
-    ASSERT_FALSE(optionalConversion);
-    
-    const URL conversionURLWithTooLargePriority { { }, "https://webkit.org/.well-known/private-click-measurement/22/64"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithTooLargePriority);
-    ASSERT_FALSE(optionalConversion);
-
-    const URL conversionURLWithTooLargeConversionDataAndPriority { { }, "https://webkit.org/.well-known/private-click-measurement/64/22"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithTooLargeConversionDataAndPriority);
-    ASSERT_FALSE(optionalConversion);
-
-    const URL conversionURLWithTooLargeConversionDataAndTooLargePriority { { }, "https://webkit.org/.well-known/private-click-measurement/64/64"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithTooLargeConversionDataAndTooLargePriority);
-    ASSERT_FALSE(optionalConversion);
-
-    const URL conversionURLWithExtraLeadingSlash = { { }, "https://webkit.org/.well-known/private-click-measurement//22/12"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithExtraLeadingSlash);
-    ASSERT_FALSE(optionalConversion);
-
-    const URL conversionURLWithExtraTrailingSlash = { { }, "https://webkit.org/.well-known/private-click-measurement/22/12/"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithExtraTrailingSlash);
-    ASSERT_FALSE(optionalConversion);
-
-    const URL conversionURLWithTrailingQuestionMark = { { }, "https://webkit.org/.well-known/private-click-measurement/22/12?"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithTrailingQuestionMark);
-    ASSERT_FALSE(optionalConversion);
-}
-
-TEST(PrivateClickMeasurement, InvalidConversionWithDisallowedURLComponents)
-{
-    // Protocol.
-    const URL conversionURLWithHttpProtocol { { }, "http://webkit.org/.well-known/private-click-measurement/2"_s };
-    auto optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithHttpProtocol);
-    ASSERT_FALSE(optionalConversion);
-
-    const URL conversionURLWithWssProtocol { { }, "wss://webkit.org/.well-known/private-click-measurement/2"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithWssProtocol);
-    ASSERT_FALSE(optionalConversion);
-
-    const URL conversionURLWithFileProtocol { { }, "file:///.well-known/private-click-measurement/2"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithFileProtocol);
-    ASSERT_FALSE(optionalConversion);
-
-    // Username and password.
-    const URL conversionURLWithUserName { { }, "https://user@webkit.org/.well-known/private-click-measurement/2"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithUserName);
-    ASSERT_FALSE(optionalConversion);
-
-    const URL conversionURLWithPassword = { { }, "https://:pwd@webkit.org/.well-known/private-click-measurement/22/12?"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithPassword);
-    ASSERT_FALSE(optionalConversion);
-
-    const URL conversionURLWithUsernameAndPassword = { { }, "https://user:pwd@webkit.org/.well-known/private-click-measurement/22/12?"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithUsernameAndPassword);
-    ASSERT_FALSE(optionalConversion);
-
-    // Query string.
-    const URL conversionURLWithTrailingQuestionMark = { { }, "https://webkit.org/.well-known/private-click-measurement/22/12?"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithTrailingQuestionMark);
-    ASSERT_FALSE(optionalConversion);
-
-    const URL conversionURLWithQueryString = { { }, "https://webkit.org/.well-known/private-click-measurement/22/12?extra=data"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithQueryString);
-    ASSERT_FALSE(optionalConversion);
-    
-    // Fragment.
-    const URL conversionURLWithTrailingHash = { { }, "https://webkit.org/.well-known/private-click-measurement/22/12#"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithTrailingHash);
-    ASSERT_FALSE(optionalConversion);
-
-    const URL conversionURLWithFragment = { { }, "https://webkit.org/.well-known/private-click-measurement/22/12#fragment"_s };
-    optionalConversion = PrivateClickMeasurement::parseConversionRequest(conversionURLWithFragment);
-    ASSERT_FALSE(optionalConversion);
-}
-
-} // namespace TestWebKitAPI
</del></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleBindingsTestRunneridl"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl      2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx">     undefined dumpDOMAsWebArchive();
</span><span class="cx">     undefined dumpPolicyDelegateCallbacks();
</span><span class="cx">     undefined dumpResourceLoadStatistics();
</span><del>-    undefined dumpPrivateClickMeasurement();
</del><ins>+    undefined dumpAdClickAttribution();
</ins><span class="cx"> 
</span><span class="cx">     undefined clearDOMCaches();
</span><span class="cx">     undefined clearDOMCache(DOMString origin);
</span><span class="lines">@@ -397,10 +397,10 @@
</span><span class="cx">     undefined cleanUpKeychain(DOMString attrLabel, optional DOMString applicationLabelBase64);
</span><span class="cx">     boolean keyExistsInKeychain(DOMString attrLabel, DOMString applicationLabelBase64);
</span><span class="cx"> 
</span><del>-    // Private Click Measurement
-    undefined clearPrivateClickMeasurement();
-    undefined clearPrivateClickMeasurementsThroughWebsiteDataRemoval();
-    undefined setPrivateClickMeasurementOverrideTimerForTesting(boolean value);
-    undefined setPrivateClickMeasurementConversionURLForTesting(DOMString url);
-    undefined markPrivateClickMeasurementsAsExpiredForTesting();
</del><ins>+    // Ad Click Attribution
+    undefined clearAdClickAttribution();
+    undefined clearAdClickAttributionsThroughWebsiteDataRemoval();
+    undefined setAdClickAttributionOverrideTimerForTesting(boolean value);
+    undefined setAdClickAttributionConversionURLForTesting(DOMString url);
+    undefined markAdClickAttributionsAsExpiredForTesting();
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleTestRunnercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp       2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp  2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1995,35 +1995,35 @@
</span><span class="cx">     postSynchronousMessage("AbortModal");
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestRunner::dumpPrivateClickMeasurement()
</del><ins>+void TestRunner::dumpAdClickAttribution()
</ins><span class="cx"> {
</span><del>-    postSynchronousPageMessage("DumpPrivateClickMeasurement");
</del><ins>+    postSynchronousPageMessage("DumpAdClickAttribution");
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestRunner::clearPrivateClickMeasurement()
</del><ins>+void TestRunner::clearAdClickAttribution()
</ins><span class="cx"> {
</span><del>-    postSynchronousPageMessage("ClearPrivateClickMeasurement");
</del><ins>+    postSynchronousPageMessage("ClearAdClickAttribution");
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestRunner::clearPrivateClickMeasurementsThroughWebsiteDataRemoval()
</del><ins>+void TestRunner::clearAdClickAttributionsThroughWebsiteDataRemoval()
</ins><span class="cx"> {
</span><del>-    postSynchronousMessage("ClearPrivateClickMeasurementsThroughWebsiteDataRemoval");
</del><ins>+    postSynchronousMessage("ClearAdClickAttributionsThroughWebsiteDataRemoval");
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestRunner::setPrivateClickMeasurementOverrideTimerForTesting(bool value)
</del><ins>+void TestRunner::setAdClickAttributionOverrideTimerForTesting(bool value)
</ins><span class="cx"> {
</span><del>-    postSynchronousPageMessage("SetPrivateClickMeasurementOverrideTimerForTesting", value);
</del><ins>+    postSynchronousPageMessage("SetAdClickAttributionOverrideTimerForTesting", value);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestRunner::setPrivateClickMeasurementConversionURLForTesting(JSStringRef urlString)
</del><ins>+void TestRunner::setAdClickAttributionConversionURLForTesting(JSStringRef urlString)
</ins><span class="cx"> {
</span><del>-    postSynchronousPageMessage("SetPrivateClickMeasurementConversionURLForTesting",
</del><ins>+    postSynchronousPageMessage("SetAdClickAttributionConversionURLForTesting",
</ins><span class="cx">         adoptWK(WKURLCreateWithUTF8CString(toWTFString(urlString).utf8().data())));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestRunner::markPrivateClickMeasurementsAsExpiredForTesting()
</del><ins>+void TestRunner::markAdClickAttributionsAsExpiredForTesting()
</ins><span class="cx"> {
</span><del>-    postSynchronousPageMessage("MarkPrivateClickMeasurementsAsExpiredForTesting");
</del><ins>+    postSynchronousPageMessage("MarkAdClickAttributionsAsExpiredForTesting");
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool TestRunner::hasAppBoundSession()
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleTestRunnerh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h    2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -507,13 +507,13 @@
</span><span class="cx"> 
</span><span class="cx">     unsigned long serverTrustEvaluationCallbackCallsCount();
</span><span class="cx"> 
</span><del>-    // Private Click Measurement.
-    void dumpPrivateClickMeasurement();
-    void clearPrivateClickMeasurement();
-    void clearPrivateClickMeasurementsThroughWebsiteDataRemoval();
-    void setPrivateClickMeasurementOverrideTimerForTesting(bool value);
-    void setPrivateClickMeasurementConversionURLForTesting(JSStringRef);
-    void markPrivateClickMeasurementsAsExpiredForTesting();
</del><ins>+    // Ad Click Attribution.
+    void dumpAdClickAttribution();
+    void clearAdClickAttribution();
+    void clearAdClickAttributionsThroughWebsiteDataRemoval();
+    void setAdClickAttributionOverrideTimerForTesting(bool value);
+    void setAdClickAttributionConversionURLForTesting(JSStringRef);
+    void markAdClickAttributionsAsExpiredForTesting();
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     TestRunner();
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.cpp  2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp     2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -1046,7 +1046,7 @@
</span><span class="cx">     statisticsResetToConsistentState();
</span><span class="cx">     clearLoadedSubresourceDomains();
</span><span class="cx">     clearAppBoundSession();
</span><del>-    clearPrivateClickMeasurement();
</del><ins>+    clearAdClickAttribution();
</ins><span class="cx"> 
</span><span class="cx">     WKPageDispatchActivityStateUpdateForTesting(m_mainWebView->page());
</span><span class="cx"> 
</span><span class="lines">@@ -3508,8 +3508,8 @@
</span><span class="cx">     WKWebsiteDataStoreSetServiceWorkerFetchTimeoutForTesting(websiteDataStore(), seconds);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-struct PrivateClickMeasurementStringResultCallbackContext {
-    explicit PrivateClickMeasurementStringResultCallbackContext(TestController& controller)
</del><ins>+struct AdClickAttributionStringResultCallbackContext {
+    explicit AdClickAttributionStringResultCallbackContext(TestController& controller)
</ins><span class="cx">         : testController(controller)
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="lines">@@ -3516,27 +3516,27 @@
</span><span class="cx">     
</span><span class="cx">     TestController& testController;
</span><span class="cx">     bool done { false };
</span><del>-    WKRetainPtr<WKStringRef> privateClickMeasurementRepresentation;
</del><ins>+    WKRetainPtr<WKStringRef> adClickAttributionRepresentation;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><del>-static void privateClickMeasurementStringResultCallback(WKStringRef privateClickMeasurementRepresentation, void* userData)
</del><ins>+static void adClickAttributionStringResultCallback(WKStringRef adClickAttributionRepresentation, void* userData)
</ins><span class="cx"> {
</span><del>-    auto* context = static_cast<PrivateClickMeasurementStringResultCallbackContext*>(userData);
-    context->privateClickMeasurementRepresentation = privateClickMeasurementRepresentation;
</del><ins>+    auto* context = static_cast<AdClickAttributionStringResultCallbackContext*>(userData);
+    context->adClickAttributionRepresentation = adClickAttributionRepresentation;
</ins><span class="cx">     context->done = true;
</span><span class="cx">     context->testController.notifyDone();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-String TestController::dumpPrivateClickMeasurement()
</del><ins>+String TestController::dumpAdClickAttribution()
</ins><span class="cx"> {
</span><del>-    PrivateClickMeasurementStringResultCallbackContext callbackContext(*this);
-    WKPageDumpPrivateClickMeasurement(m_mainWebView->page(), privateClickMeasurementStringResultCallback, &callbackContext);
</del><ins>+    AdClickAttributionStringResultCallbackContext callbackContext(*this);
+    WKPageDumpAdClickAttribution(m_mainWebView->page(), adClickAttributionStringResultCallback, &callbackContext);
</ins><span class="cx">     runUntil(callbackContext.done, noTimeout);
</span><del>-    return toWTFString(callbackContext.privateClickMeasurementRepresentation.get());
</del><ins>+    return toWTFString(callbackContext.adClickAttributionRepresentation.get());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-struct PrivateClickMeasurementVoidCallbackContext {
-    explicit PrivateClickMeasurementVoidCallbackContext(TestController& controller)
</del><ins>+struct AdClickAttributionVoidCallbackContext {
+    explicit AdClickAttributionVoidCallbackContext(TestController& controller)
</ins><span class="cx">         : testController(controller)
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="lines">@@ -3545,45 +3545,45 @@
</span><span class="cx">     bool done { false };
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-static void privateClickMeasurementVoidCallback(void* userData)
</del><ins>+static void adClickAttributionVoidCallback(void* userData)
</ins><span class="cx"> {
</span><del>-    auto* context = static_cast<PrivateClickMeasurementVoidCallbackContext*>(userData);
</del><ins>+    auto* context = static_cast<AdClickAttributionVoidCallbackContext*>(userData);
</ins><span class="cx">     context->done = true;
</span><span class="cx">     context->testController.notifyDone();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestController::clearPrivateClickMeasurement()
</del><ins>+void TestController::clearAdClickAttribution()
</ins><span class="cx"> {
</span><del>-    PrivateClickMeasurementVoidCallbackContext callbackContext(*this);
-    WKPageClearPrivateClickMeasurement(m_mainWebView->page(), privateClickMeasurementVoidCallback, &callbackContext);
</del><ins>+    AdClickAttributionVoidCallbackContext callbackContext(*this);
+    WKPageClearAdClickAttribution(m_mainWebView->page(), adClickAttributionVoidCallback, &callbackContext);
</ins><span class="cx">     runUntil(callbackContext.done, noTimeout);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestController::clearPrivateClickMeasurementsThroughWebsiteDataRemoval()
</del><ins>+void TestController::clearAdClickAttributionsThroughWebsiteDataRemoval()
</ins><span class="cx"> {
</span><del>-    PrivateClickMeasurementVoidCallbackContext callbackContext(*this);
-    WKWebsiteDataStoreClearPrivateClickMeasurementsThroughWebsiteDataRemoval(websiteDataStore(), &callbackContext, privateClickMeasurementVoidCallback);
</del><ins>+    AdClickAttributionVoidCallbackContext callbackContext(*this);
+    WKWebsiteDataStoreClearAdClickAttributionsThroughWebsiteDataRemoval(websiteDataStore(), &callbackContext, adClickAttributionVoidCallback);
</ins><span class="cx">     runUntil(callbackContext.done, noTimeout);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestController::setPrivateClickMeasurementOverrideTimerForTesting(bool value)
</del><ins>+void TestController::setAdClickAttributionOverrideTimerForTesting(bool value)
</ins><span class="cx"> {
</span><del>-    PrivateClickMeasurementVoidCallbackContext callbackContext(*this);
-    WKPageSetPrivateClickMeasurementOverrideTimerForTesting(m_mainWebView->page(), value, privateClickMeasurementVoidCallback, &callbackContext);
</del><ins>+    AdClickAttributionVoidCallbackContext callbackContext(*this);
+    WKPageSetAdClickAttributionOverrideTimerForTesting(m_mainWebView->page(), value, adClickAttributionVoidCallback, &callbackContext);
</ins><span class="cx">     runUntil(callbackContext.done, noTimeout);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestController::setPrivateClickMeasurementConversionURLForTesting(WKURLRef url)
</del><ins>+void TestController::setAdClickAttributionConversionURLForTesting(WKURLRef url)
</ins><span class="cx"> {
</span><del>-    PrivateClickMeasurementVoidCallbackContext callbackContext(*this);
-    WKPageSetPrivateClickMeasurementConversionURLForTesting(m_mainWebView->page(), url, privateClickMeasurementVoidCallback, &callbackContext);
</del><ins>+    AdClickAttributionVoidCallbackContext callbackContext(*this);
+    WKPageSetAdClickAttributionConversionURLForTesting(m_mainWebView->page(), url, adClickAttributionVoidCallback, &callbackContext);
</ins><span class="cx">     runUntil(callbackContext.done, noTimeout);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestController::markPrivateClickMeasurementsAsExpiredForTesting()
</del><ins>+void TestController::markAdClickAttributionsAsExpiredForTesting()
</ins><span class="cx"> {
</span><del>-    PrivateClickMeasurementVoidCallbackContext callbackContext(*this);
-    WKPageMarkPrivateClickMeasurementsAsExpiredForTesting(m_mainWebView->page(), privateClickMeasurementVoidCallback, &callbackContext);
</del><ins>+    AdClickAttributionVoidCallbackContext callbackContext(*this);
+    WKPageMarkAdClickAttributionsAsExpiredForTesting(m_mainWebView->page(), adClickAttributionVoidCallback, &callbackContext);
</ins><span class="cx">     runUntil(callbackContext.done, noTimeout);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.h    2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Tools/WebKitTestRunner/TestController.h       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -340,12 +340,12 @@
</span><span class="cx"> 
</span><span class="cx">     bool isDoingMediaCapture() const;
</span><span class="cx"> 
</span><del>-    String dumpPrivateClickMeasurement();
-    void clearPrivateClickMeasurement();
-    void clearPrivateClickMeasurementsThroughWebsiteDataRemoval();
-    void setPrivateClickMeasurementOverrideTimerForTesting(bool value);
-    void setPrivateClickMeasurementConversionURLForTesting(WKURLRef);
-    void markPrivateClickMeasurementsAsExpiredForTesting();
</del><ins>+    String dumpAdClickAttribution();
+    void clearAdClickAttribution();
+    void clearAdClickAttributionsThroughWebsiteDataRemoval();
+    void setAdClickAttributionOverrideTimerForTesting(bool value);
+    void setAdClickAttributionConversionURLForTesting(WKURLRef);
+    void markAdClickAttributionsAsExpiredForTesting();
</ins><span class="cx"> 
</span><span class="cx">     void didSetAppBoundDomains() const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestInvocationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp  2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp     2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -243,8 +243,8 @@
</span><span class="cx">     if (m_shouldDumpResourceLoadStatistics)
</span><span class="cx">         m_textOutput.append(m_savedResourceLoadStatistics.isNull() ? TestController::singleton().dumpResourceLoadStatistics() : m_savedResourceLoadStatistics);
</span><span class="cx"> 
</span><del>-    if (m_shouldDumpPrivateClickMeasurement)
-        m_textOutput.append(TestController::singleton().dumpPrivateClickMeasurement());
</del><ins>+    if (m_shouldDumpAdClickAttribution)
+        m_textOutput.append(TestController::singleton().dumpAdClickAttribution());
</ins><span class="cx">     
</span><span class="cx">     if (m_textOutput.length() || !m_audioResult)
</span><span class="cx">         dump(m_textOutput.toString().utf8().data());
</span><span class="lines">@@ -1304,18 +1304,18 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (WKStringIsEqualToUTF8CString(messageName, "DumpPrivateClickMeasurement")) {
-        dumpPrivateClickMeasurement();
</del><ins>+    if (WKStringIsEqualToUTF8CString(messageName, "DumpAdClickAttribution")) {
+        dumpAdClickAttribution();
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    if (WKStringIsEqualToUTF8CString(messageName, "ClearPrivateClickMeasurement")) {
-        TestController::singleton().clearPrivateClickMeasurement();
</del><ins>+    if (WKStringIsEqualToUTF8CString(messageName, "ClearAdClickAttribution")) {
+        TestController::singleton().clearAdClickAttribution();
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (WKStringIsEqualToUTF8CString(messageName, "ClearPrivateClickMeasurementsThroughWebsiteDataRemoval")) {
-        TestController::singleton().clearPrivateClickMeasurementsThroughWebsiteDataRemoval();
</del><ins>+    if (WKStringIsEqualToUTF8CString(messageName, "ClearAdClickAttributionsThroughWebsiteDataRemoval")) {
+        TestController::singleton().clearAdClickAttributionsThroughWebsiteDataRemoval();
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="lines">@@ -1324,19 +1324,19 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (WKStringIsEqualToUTF8CString(messageName, "SetPrivateClickMeasurementOverrideTimerForTesting")) {
-        TestController::singleton().setPrivateClickMeasurementOverrideTimerForTesting(booleanValue(messageBody));
</del><ins>+    if (WKStringIsEqualToUTF8CString(messageName, "SetAdClickAttributionOverrideTimerForTesting")) {
+        TestController::singleton().setAdClickAttributionOverrideTimerForTesting(booleanValue(messageBody));
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    if (WKStringIsEqualToUTF8CString(messageName, "SetPrivateClickMeasurementConversionURLForTesting")) {
</del><ins>+    if (WKStringIsEqualToUTF8CString(messageName, "SetAdClickAttributionConversionURLForTesting")) {
</ins><span class="cx">         ASSERT(WKGetTypeID(messageBody) == WKURLGetTypeID());
</span><del>-        TestController::singleton().setPrivateClickMeasurementConversionURLForTesting(static_cast<WKURLRef>(messageBody));
</del><ins>+        TestController::singleton().setAdClickAttributionConversionURLForTesting(static_cast<WKURLRef>(messageBody));
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (WKStringIsEqualToUTF8CString(messageName, "MarkPrivateClickMeasurementsAsExpiredForTesting")) {
-        TestController::singleton().markPrivateClickMeasurementsAsExpiredForTesting();
</del><ins>+    if (WKStringIsEqualToUTF8CString(messageName, "MarkAdClickAttributionsAsExpiredForTesting")) {
+        TestController::singleton().markAdClickAttributionsAsExpiredForTesting();
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1533,9 +1533,9 @@
</span><span class="cx">     m_shouldDumpResourceLoadStatistics = true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestInvocation::dumpPrivateClickMeasurement()
</del><ins>+void TestInvocation::dumpAdClickAttribution()
</ins><span class="cx"> {
</span><del>-    m_shouldDumpPrivateClickMeasurement = true;
</del><ins>+    m_shouldDumpAdClickAttribution = true;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestInvocation::performCustomMenuAction()
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestInvocationh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestInvocation.h (269670 => 269671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestInvocation.h    2020-11-11 02:28:59 UTC (rev 269670)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.h       2020-11-11 04:55:57 UTC (rev 269671)
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool canOpenWindows() const { return m_canOpenWindows; }
</span><span class="cx"> 
</span><del>-    void dumpPrivateClickMeasurement();
</del><ins>+    void dumpAdClickAttribution();
</ins><span class="cx">     void performCustomMenuAction();
</span><span class="cx"> 
</span><span class="cx">     void willCreateNewPage();
</span><span class="lines">@@ -162,7 +162,7 @@
</span><span class="cx">     bool m_pixelResultIsPending { false };
</span><span class="cx">     bool m_shouldDumpResourceLoadStatistics { false };
</span><span class="cx">     bool m_canOpenWindows { false };
</span><del>-    bool m_shouldDumpPrivateClickMeasurement { false };
</del><ins>+    bool m_shouldDumpAdClickAttribution { false };
</ins><span class="cx">     WhatToDump m_whatToDump { WhatToDump::RenderTree };
</span><span class="cx"> 
</span><span class="cx">     StringBuilder m_textOutput;
</span></span></pre>
</div>
</div>

</body>
</html>