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
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@269671 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/loader/PrivateClickMeasurement.cpp b/Source/WebCore/loader/AdClickAttribution.cpp
similarity index 60%
rename from Source/WebCore/loader/PrivateClickMeasurement.cpp
rename to Source/WebCore/loader/AdClickAttribution.cpp
index a67e6cd8..42311be 100644
--- a/Source/WebCore/loader/PrivateClickMeasurement.cpp
+++ b/Source/WebCore/loader/AdClickAttribution.cpp
@@ -24,7 +24,7 @@
*/
#include "config.h"
-#include "PrivateClickMeasurement.h"
+#include "AdClickAttribution.h"
#include "Logging.h"
#include "RuntimeEnabledFeatures.h"
@@ -36,12 +36,12 @@
namespace WebCore {
-static const char privateClickMeasurementPathPrefix[] = "/.well-known/private-click-measurement/";
-const size_t privateClickMeasurementConversionDataPathSegmentSize = 2;
-const size_t privateClickMeasurementPriorityPathSegmentSize = 2;
+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 PrivateClickMeasurement::isValid() const
+bool AdClickAttribution::isValid() const
{
return m_conversion
&& m_conversion.value().isValid()
@@ -51,32 +51,32 @@
&& m_earliestTimeToSend;
}
-Expected<PrivateClickMeasurement::Conversion, String> PrivateClickMeasurement::parseConversionRequest(const URL& redirectURL)
+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(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);
+ 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(privateClickMeasurementPathPrefix)) {
+ if (path.isEmpty() || !path.startsWith(adClickAttributionPathPrefix)) {
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));
+ 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(privateClickMeasurementPathPrefix) - 1;
- if (path.length() == prefixLength + privateClickMeasurementConversionDataPathSegmentSize) {
- auto conversionDataUInt64 = path.substring(prefixLength, privateClickMeasurementConversionDataPathSegmentSize).toUInt64Strict();
+ 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(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));
+ 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());
}
@@ -84,21 +84,21 @@
return Conversion { static_cast<uint32_t>(*conversionDataUInt64), Priority { 0 } };
}
- if (path.length() == prefixLength + privateClickMeasurementConversionDataPathSegmentSize + 1 + privateClickMeasurementPriorityPathSegmentSize) {
- auto conversionDataUInt64 = path.substring(prefixLength, privateClickMeasurementConversionDataPathSegmentSize).toUInt64Strict();
+ if (path.length() == prefixLength + adClickConversionDataPathSegmentSize + 1 + adClickPriorityPathSegmentSize) {
+ auto conversionDataUInt64 = path.substring(prefixLength, adClickConversionDataPathSegmentSize).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));
+ 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 + privateClickMeasurementConversionDataPathSegmentSize + 1, privateClickMeasurementPriorityPathSegmentSize).toUInt64Strict();
+ auto conversionPriorityUInt64 = path.substring(prefixLength + adClickConversionDataPathSegmentSize + 1, adClickPriorityPathSegmentSize).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));
+ 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());
}
@@ -107,13 +107,13 @@
}
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);
+ 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> PrivateClickMeasurement::convertAndGetEarliestTimeToSend(Conversion&& conversion)
+Optional<Seconds> AdClickAttribution::convertAndGetEarliestTimeToSend(Conversion&& conversion)
{
if (!conversion.isValid() || (m_conversion && m_conversion->priority >= conversion.priority))
return { };
@@ -126,17 +126,17 @@
return seconds;
}
-void PrivateClickMeasurement::markAsExpired()
+void AdClickAttribution::markAsExpired()
{
m_timeOfAdClick = { };
}
-bool PrivateClickMeasurement::hasExpired() const
+bool AdClickAttribution::hasExpired() const
{
return WallTime::now() > m_timeOfAdClick + maxAge;
}
-bool PrivateClickMeasurement::hasHigherPriorityThan(const PrivateClickMeasurement& other) const
+bool AdClickAttribution::hasHigherPriorityThan(const AdClickAttribution& other) const
{
if (!other.m_conversion)
return true;
@@ -147,7 +147,7 @@
return m_conversion->priority > other.m_conversion->priority;
}
-URL PrivateClickMeasurement::reportURL() const
+URL AdClickAttribution::reportURL() const
{
if (!isValid())
return URL();
@@ -155,7 +155,7 @@
StringBuilder builder;
builder.appendLiteral("https://");
builder.append(m_source.registrableDomain.string());
- builder.appendLiteral(privateClickMeasurementPathPrefix);
+ builder.appendLiteral(adClickAttributionPathPrefix);
URL url { URL(), builder.toString() };
if (url.isValid())
@@ -164,7 +164,7 @@
return URL();
}
-Ref<JSON::Object> PrivateClickMeasurement::json() const
+Ref<JSON::Object> AdClickAttribution::json() const
{
auto reportDetails = JSON::Object::create();
if (!m_conversion)
@@ -179,19 +179,19 @@
return reportDetails;
}
-void PrivateClickMeasurement::markConversionAsSent()
+void AdClickAttribution::markConversionAsSent()
{
ASSERT(m_conversion);
if (m_conversion)
m_conversion->wasSent = Conversion::WasSent::Yes;
}
-bool PrivateClickMeasurement::wasConversionSent() const
+bool AdClickAttribution::wasConversionSent() const
{
return m_conversion && m_conversion->wasSent == Conversion::WasSent::Yes;
}
-String PrivateClickMeasurement::toString() const
+String AdClickAttribution::toString() const
{
StringBuilder builder;
builder.appendLiteral("Source: ");
@@ -221,9 +221,9 @@
return builder.toString();
}
-bool PrivateClickMeasurement::debugModeEnabled()
+bool AdClickAttribution::debugModeEnabled()
{
- return RuntimeEnabledFeatures::sharedFeatures().privateClickMeasurementDebugModeEnabled();
+ return RuntimeEnabledFeatures::sharedFeatures().adClickAttributionDebugModeEnabled();
}
}
diff --git a/Source/WebCore/loader/PrivateClickMeasurement.h b/Source/WebCore/loader/AdClickAttribution.h
similarity index 81%
rename from Source/WebCore/loader/PrivateClickMeasurement.h
rename to Source/WebCore/loader/AdClickAttribution.h
index a602f7c..7d19eca 100644
--- a/Source/WebCore/loader/PrivateClickMeasurement.h
+++ b/Source/WebCore/loader/AdClickAttribution.h
@@ -37,7 +37,7 @@
namespace WebCore {
-class PrivateClickMeasurement {
+class AdClickAttribution {
public:
using CampaignId = uint32_t;
using ConversionData = uint32_t;
@@ -232,8 +232,8 @@
template<class Decoder> static Optional<Conversion> decode(Decoder&);
};
- PrivateClickMeasurement() = default;
- PrivateClickMeasurement(Campaign campaign, const Source& source, const Destination& destination)
+ AdClickAttribution() = default;
+ AdClickAttribution(Campaign campaign, const Source& source, const Destination& destination)
: m_campaign { campaign }
, m_source { source }
, m_destination { destination }
@@ -243,7 +243,7 @@
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 bool hasHigherPriorityThan(const AdClickAttribution&) const;
WEBCORE_EXPORT URL reportURL() const;
WEBCORE_EXPORT Ref<JSON::Object> json() const;
const Source& source() const { return m_source; };
@@ -259,7 +259,7 @@
WEBCORE_EXPORT String toString() const;
template<class Encoder> void encode(Encoder&) const;
- template<class Decoder> static Optional<PrivateClickMeasurement> decode(Decoder&);
+ template<class Decoder> static Optional<AdClickAttribution> decode(Decoder&);
private:
bool isValid() const;
@@ -275,13 +275,13 @@
};
template<class Encoder>
-void PrivateClickMeasurement::encode(Encoder& encoder) const
+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<PrivateClickMeasurement> PrivateClickMeasurement::decode(Decoder& decoder)
+Optional<AdClickAttribution> AdClickAttribution::decode(Decoder& decoder)
{
Optional<CampaignId> campaignId;
decoder >> campaignId;
@@ -313,7 +313,7 @@
if (!earliestTimeToSend)
return WTF::nullopt;
- PrivateClickMeasurement attribution { Campaign { WTFMove(*campaignId) }, Source { WTFMove(*sourceRegistrableDomain) }, Destination { WTFMove(*destinationRegistrableDomain) } };
+ AdClickAttribution attribution { Campaign { WTFMove(*campaignId) }, Source { WTFMove(*sourceRegistrableDomain) }, Destination { WTFMove(*destinationRegistrableDomain) } };
attribution.m_conversion = WTFMove(*conversion);
attribution.m_earliestTimeToSend = WTFMove(*earliestTimeToSend);
@@ -321,13 +321,13 @@
}
template<class Encoder>
-void PrivateClickMeasurement::Conversion::encode(Encoder& encoder) const
+void AdClickAttribution::Conversion::encode(Encoder& encoder) const
{
encoder << data << priority << wasSent;
}
template<class Decoder>
-Optional<PrivateClickMeasurement::Conversion> PrivateClickMeasurement::Conversion::decode(Decoder& decoder)
+Optional<AdClickAttribution::Conversion> AdClickAttribution::Conversion::decode(Decoder& decoder)
{
Optional<ConversionData> data;
decoder >> data;
@@ -352,17 +352,17 @@
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::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::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(); }
+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(); }
};
}
diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp
index 79c5448..be6ca769 100644
--- a/Source/WebCore/loader/FrameLoader.cpp
+++ b/Source/WebCore/loader/FrameLoader.cpp
@@ -422,7 +422,7 @@
client().dispatchDecidePolicyForResponse(response, activeDocumentLoader()->request(), identifier, activeDocumentLoader()->downloadAttribute(), WTFMove(function));
}
-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)
+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)
{
auto* frame = lexicalFrameFromCommonVM();
auto initiatedByMainFrame = frame && frame->isMainFrame() ? InitiatedByMainFrame::Yes : InitiatedByMainFrame::Unknown;
@@ -435,10 +435,10 @@
frameLoadRequest.setReferrerPolicy(referrerPolicy);
frameLoadRequest.setShouldOpenExternalURLsPolicy(shouldOpenExternalURLsPolicy);
frameLoadRequest.disableShouldReplaceDocumentIfJavaScriptURL();
- changeLocation(WTFMove(frameLoadRequest), triggeringEvent, WTFMove(privateClickMeasurement));
+ changeLocation(WTFMove(frameLoadRequest), triggeringEvent, WTFMove(adClickAttribution));
}
-void FrameLoader::changeLocation(FrameLoadRequest&& frameRequest, Event* triggeringEvent, Optional<PrivateClickMeasurement>&& privateClickMeasurement)
+void FrameLoader::changeLocation(FrameLoadRequest&& frameRequest, Event* triggeringEvent, Optional<AdClickAttribution>&& adClickAttribution)
{
FRAMELOADER_RELEASE_LOG_IF_ALLOWED(ResourceLoading, "changeLocation: frame load started");
ASSERT(frameRequest.resourceRequest().httpMethod() == "GET");
@@ -456,7 +456,7 @@
m_frame.document()->contentSecurityPolicy()->upgradeInsecureRequestIfNeeded(frameRequest.resourceRequest(), ContentSecurityPolicy::InsecureRequestType::Navigation);
- loadFrameRequest(WTFMove(frameRequest), triggeringEvent, { }, WTFMove(privateClickMeasurement));
+ loadFrameRequest(WTFMove(frameRequest), triggeringEvent, { }, WTFMove(adClickAttribution));
}
void FrameLoader::submitForm(Ref<FormSubmission>&& submission)
@@ -1239,7 +1239,7 @@
detachChildren();
}
-void FrameLoader::loadFrameRequest(FrameLoadRequest&& request, Event* event, RefPtr<FormState>&& formState, Optional<PrivateClickMeasurement>&& privateClickMeasurement)
+void FrameLoader::loadFrameRequest(FrameLoadRequest&& request, Event* event, RefPtr<FormState>&& formState, Optional<AdClickAttribution>&& adClickAttribution)
{
FRAMELOADER_RELEASE_LOG_IF_ALLOWED(ResourceLoading, "loadFrameRequest: frame load started");
@@ -1287,7 +1287,7 @@
if (request.resourceRequest().httpMethod() == "POST")
loadPostRequest(WTFMove(request), referrer, loadType, event, WTFMove(formState), WTFMove(completionHandler));
else
- loadURL(WTFMove(request), referrer, loadType, event, WTFMove(formState), WTFMove(privateClickMeasurement), WTFMove(completionHandler));
+ loadURL(WTFMove(request), referrer, loadType, event, WTFMove(formState), WTFMove(adClickAttribution), WTFMove(completionHandler));
}
static ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicyToApply(Frame& currentFrame, InitiatedByMainFrame initiatedByMainFrame, ShouldOpenExternalURLsPolicy propagatedPolicy)
@@ -1329,7 +1329,7 @@
return m_pageDismissalEventBeingDispatched == PageDismissalType::None;
}
-void FrameLoader::loadURL(FrameLoadRequest&& frameLoadRequest, const String& referrer, FrameLoadType newLoadType, Event* event, RefPtr<FormState>&& formState, Optional<PrivateClickMeasurement>&& privateClickMeasurement, CompletionHandler<void()>&& completionHandler)
+void FrameLoader::loadURL(FrameLoadRequest&& frameLoadRequest, const String& referrer, FrameLoadType newLoadType, Event* event, RefPtr<FormState>&& formState, Optional<AdClickAttribution>&& adClickAttribution, CompletionHandler<void()>&& completionHandler)
{
FRAMELOADER_RELEASE_LOG_IF_ALLOWED(ResourceLoading, "loadURL: frame load started");
ASSERT(frameLoadRequest.resourceRequest().httpMethod() == "GET");
@@ -1348,7 +1348,7 @@
auto targetFrame = isFormSubmission ? nullptr : makeRefPtr(findFrameForNavigation(effectiveFrameName));
if (targetFrame && targetFrame != &m_frame) {
frameLoadRequest.setFrameName("_self");
- targetFrame->loader().loadURL(WTFMove(frameLoadRequest), referrer, newLoadType, event, WTFMove(formState), WTFMove(privateClickMeasurement), completionHandlerCaller.release());
+ targetFrame->loader().loadURL(WTFMove(frameLoadRequest), referrer, newLoadType, event, WTFMove(formState), WTFMove(adClickAttribution), completionHandlerCaller.release());
return;
}
@@ -1367,8 +1367,8 @@
NavigationAction action { frameLoadRequest.requester(), request, frameLoadRequest.initiatedByMainFrame(), newLoadType, isFormSubmission, event, frameLoadRequest.shouldOpenExternalURLsPolicy(), frameLoadRequest.downloadAttribute() };
action.setLockHistory(frameLoadRequest.lockHistory());
action.setLockBackForwardList(frameLoadRequest.lockBackForwardList());
- if (privateClickMeasurement && m_frame.isMainFrame())
- action.setPrivateClickMeasurement(WTFMove(*privateClickMeasurement));
+ if (adClickAttribution && m_frame.isMainFrame())
+ action.setAdClickAttribution(WTFMove(*adClickAttribution));
NewFrameOpenerPolicy openerPolicy = frameLoadRequest.newFrameOpenerPolicy();
AllowNavigationToInvalidURL allowNavigationToInvalidURL = frameLoadRequest.allowNavigationToInvalidURL();
diff --git a/Source/WebCore/loader/FrameLoader.h b/Source/WebCore/loader/FrameLoader.h
index c2f639a..84b085e 100644
--- a/Source/WebCore/loader/FrameLoader.h
+++ b/Source/WebCore/loader/FrameLoader.h
@@ -31,6 +31,7 @@
#pragma once
+#include "AdClickAttribution.h"
#include "CachePolicy.h"
#include "FrameIdentifier.h"
#include "FrameLoaderStateMachine.h"
@@ -38,7 +39,6 @@
#include "LayoutMilestone.h"
#include "MixedContentChecker.h"
#include "PageIdentifier.h"
-#include "PrivateClickMeasurement.h"
#include "ReferrerPolicy.h"
#include "ResourceLoadNotifier.h"
#include "ResourceLoaderOptions.h"
@@ -124,7 +124,7 @@
void setupForReplace();
// FIXME: These are all functions which start loads. We have too many.
- WEBCORE_EXPORT void loadFrameRequest(FrameLoadRequest&&, Event*, RefPtr<FormState>&&, Optional<PrivateClickMeasurement>&& = WTF::nullopt); // Called by submitForm, calls loadPostRequest and loadURL.
+ WEBCORE_EXPORT void loadFrameRequest(FrameLoadRequest&&, Event*, RefPtr<FormState>&&, Optional<AdClickAttribution>&& = WTF::nullopt); // Called by submitForm, calls loadPostRequest and loadURL.
WEBCORE_EXPORT void load(FrameLoadRequest&&);
@@ -133,8 +133,8 @@
#endif
unsigned long loadResourceSynchronously(const ResourceRequest&, ClientCredentialPolicy, const FetchOptions&, const HTTPHeaderMap&, ResourceError&, ResourceResponse&, RefPtr<SharedBuffer>& data);
- 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);
+ 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);
void submitForm(Ref<FormSubmission>&&);
WEBCORE_EXPORT void reload(OptionSet<ReloadOption> = { });
@@ -387,7 +387,7 @@
void loadWithNavigationAction(const ResourceRequest&, NavigationAction&&, FrameLoadType, RefPtr<FormState>&&, AllowNavigationToInvalidURL, CompletionHandler<void()>&& = [] { }); // Calls loadWithDocumentLoader
void loadPostRequest(FrameLoadRequest&&, const String& referrer, FrameLoadType, Event*, RefPtr<FormState>&&, CompletionHandler<void()>&&);
- void loadURL(FrameLoadRequest&&, const String& referrer, FrameLoadType, Event*, RefPtr<FormState>&&, Optional<PrivateClickMeasurement>&&, CompletionHandler<void()>&&);
+ void loadURL(FrameLoadRequest&&, const String& referrer, FrameLoadType, Event*, RefPtr<FormState>&&, Optional<AdClickAttribution>&&, CompletionHandler<void()>&&);
bool shouldReload(const URL& currentURL, const URL& destinationURL);
diff --git a/Source/WebCore/loader/NavigationAction.h b/Source/WebCore/loader/NavigationAction.h
index dc20019..6994df3 100644
--- a/Source/WebCore/loader/NavigationAction.h
+++ b/Source/WebCore/loader/NavigationAction.h
@@ -28,11 +28,11 @@
#pragma once
+#include "AdClickAttribution.h"
#include "BackForwardItemIdentifier.h"
#include "FrameLoaderTypes.h"
#include "GlobalFrameIdentifier.h"
#include "LayoutPoint.h"
-#include "PrivateClickMeasurement.h"
#include "ResourceRequest.h"
#include "SecurityOrigin.h"
#include "UserGestureIndicator.h"
@@ -137,8 +137,8 @@
LockBackForwardList lockBackForwardList() const { return m_lockBackForwardList; }
void setLockBackForwardList(LockBackForwardList lockBackForwardList) { m_lockBackForwardList = lockBackForwardList; }
- const Optional<PrivateClickMeasurement>& privateClickMeasurement() const { return m_privateClickMeasurement; };
- void setPrivateClickMeasurement(PrivateClickMeasurement&& privateClickMeasurement) { m_privateClickMeasurement = privateClickMeasurement; };
+ const Optional<AdClickAttribution>& adClickAttribution() const { return m_adClickAttribution; };
+ void setAdClickAttribution(AdClickAttribution&& adClickAttribution) { m_adClickAttribution = adClickAttribution; };
private:
// Do not add a strong reference to the originating document or a subobject that holds the
@@ -159,7 +159,7 @@
Optional<BackForwardItemIdentifier> m_sourceBackForwardItemIdentifier;
LockHistory m_lockHistory { LockHistory::No };
LockBackForwardList m_lockBackForwardList { LockBackForwardList::No };
- Optional<PrivateClickMeasurement> m_privateClickMeasurement;
+ Optional<AdClickAttribution> m_adClickAttribution;
};
} // namespace WebCore