<!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>[279120] 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/279120">279120</a></dd>
<dt>Author</dt> <dd>tsavell@apple.com</dd>
<dt>Date</dt> <dd>2021-06-22 09:44:56 -0700 (Tue, 22 Jun 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unreviewed, reverting <a href="http://trac.webkit.org/projects/webkit/changeset/279083">r279083</a>.

Broke Mac Builds

Reverted changeset:

"Migrate App Privacy Report code from WebKitAdditions"
https://bugs.webkit.org/show_bug.cgi?id=227045
https://commits.webkit.org/<a href="http://trac.webkit.org/projects/webkit/changeset/279083">r279083</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfPlatformEnableCocoah">trunk/Source/WTF/wtf/PlatformEnableCocoa.h</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitNetworkProcesscocoaNetworkDataTaskCocoamm">trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm</a></li>
<li><a href="#trunkSourceWebKitNetworkProcesscocoaNetworkSessionCocoamm">trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessCocoaWebPageProxyCocoamm">trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKitCocoaInAppBrowserPrivacymm">trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (279119 => 279120)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog       2021-06-22 16:17:45 UTC (rev 279119)
+++ trunk/Source/WTF/ChangeLog  2021-06-22 16:44:56 UTC (rev 279120)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2021-06-22  Truitt Savell  <tsavell@apple.com>
+
+        Unreviewed, reverting r279083.
+
+        Broke Mac Builds
+
+        Reverted changeset:
+
+        "Migrate App Privacy Report code from WebKitAdditions"
+        https://bugs.webkit.org/show_bug.cgi?id=227045
+        https://commits.webkit.org/r279083
+
</ins><span class="cx"> 2021-06-22  Kimmo Kinnunen  <kkinnunen@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Functions dispatched to WorkQueue are sometimes destroyed in the calling thread due to block refcounting
</span></span></pre></div>
<a id="trunkSourceWTFwtfPlatformEnableCocoah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/PlatformEnableCocoa.h (279119 => 279120)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/PlatformEnableCocoa.h       2021-06-22 16:17:45 UTC (rev 279119)
+++ trunk/Source/WTF/wtf/PlatformEnableCocoa.h  2021-06-22 16:44:56 UTC (rev 279120)
</span><span class="lines">@@ -699,8 +699,8 @@
</span><span class="cx"> #define ENABLE_NOTIFY_FILTERING 1
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if !defined(ENABLE_APP_PRIVACY_REPORT) && PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000
-#define ENABLE_APP_PRIVACY_REPORT 1
</del><ins>+#if !defined(ENABLE_APP_BOUND_REQUESTS) && PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000
+#define ENABLE_APP_BOUND_REQUESTS 1
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if !defined(ENABLE_DESTINATION_COLOR_SPACE_DISPLAY_P3)
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (279119 => 279120)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2021-06-22 16:17:45 UTC (rev 279119)
+++ trunk/Source/WebKit/ChangeLog       2021-06-22 16:44:56 UTC (rev 279120)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2021-06-22  Truitt Savell  <tsavell@apple.com>
+
+        Unreviewed, reverting r279083.
+
+        Broke Mac Builds
+
+        Reverted changeset:
+
+        "Migrate App Privacy Report code from WebKitAdditions"
+        https://bugs.webkit.org/show_bug.cgi?id=227045
+        https://commits.webkit.org/r279083
+
</ins><span class="cx"> 2021-06-22  Kimmo Kinnunen  <kkinnunen@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Functions dispatched to WorkQueue are sometimes destroyed in the calling thread due to block refcounting
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcesscocoaNetworkDataTaskCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm (279119 => 279120)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm 2021-06-22 16:17:45 UTC (rev 279119)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm    2021-06-22 16:44:56 UTC (rev 279120)
</span><span class="lines">@@ -57,7 +57,8 @@
</span><span class="cx"> #if USE(APPLE_INTERNAL_SDK)
</span><span class="cx"> #import <WebKitAdditions/NetworkDataTaskCocoaAdditions.h>
</span><span class="cx"> #else
</span><del>-static void processPCMRequest(WebCore::PrivateClickMeasurement::PcmDataCarried, NSMutableURLRequest *) { };
</del><ins>+#define NETWORK_DATA_TASK_COCOA_ADDITIONS UNUSED_VARIABLE(pcmDataCarried);
+static WebCore::RegistrableDomain contextString(NSURLRequest *) { return { }; }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="lines">@@ -337,31 +338,24 @@
</span><span class="cx"> #endif
</span><span class="cx">     restrictRequestReferrerToOriginIfNeeded(request);
</span><span class="cx"> 
</span><del>-    RetainPtr<NSURLRequest> nsRequest = request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody);
-    RetainPtr<NSMutableURLRequest> mutableRequest = adoptNS([nsRequest.get() mutableCopy]);
</del><ins>+    // FIXME: Once we are done with NETWORK_DATA_TASK_COCOA_ADDITIONS, make nsRequest a RetainPtr and get rid of protectedNSRequest and pcmDataCarried.
+    NSURLRequest *nsRequest = request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody);
+    auto pcmDataCarried = parameters.pcmDataCarried;
</ins><span class="cx"> 
</span><del>-#if ENABLE(APP_PRIVACY_REPORT)
-    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-    mutableRequest.get()._isNonAppInitiated = !request.isAppBound();
-    ALLOW_DEPRECATED_DECLARATIONS_END
-#endif
</del><ins>+    NETWORK_DATA_TASK_COCOA_ADDITIONS
</ins><span class="cx"> 
</span><del>-    if (parameters.pcmDataCarried)
-        processPCMRequest(*parameters.pcmDataCarried, mutableRequest.get());
</del><ins>+    auto protectedNSRequest = retainPtr(nsRequest);
+    m_session->appBoundNavigationTestingData().updateAppBoundNavigationTestingData(request, contextString(protectedNSRequest.get()));
</ins><span class="cx"> 
</span><del>-    nsRequest = mutableRequest;
</del><ins>+    applySniffingPoliciesAndBindRequestToInferfaceIfNeeded(protectedNSRequest, parameters.contentSniffingPolicy == WebCore::ContentSniffingPolicy::SniffContent && !url.isLocalFile(), parameters.contentEncodingSniffingPolicy == WebCore::ContentEncodingSniffingPolicy::Sniff);
</ins><span class="cx"> 
</span><del>-    m_session->appBoundNavigationTestingData().updateAppBoundNavigationTestingData(request, request.firstPartyForCookies().isEmpty() ? WebCore::RegistrableDomain(request.url()) : WebCore::RegistrableDomain(request.firstPartyForCookies()));
</del><ins>+    m_task = [m_sessionWrapper->session dataTaskWithRequest:protectedNSRequest.get()];
</ins><span class="cx"> 
</span><del>-    applySniffingPoliciesAndBindRequestToInferfaceIfNeeded(nsRequest, parameters.contentSniffingPolicy == WebCore::ContentSniffingPolicy::SniffContent && !url.isLocalFile(), parameters.contentEncodingSniffingPolicy == WebCore::ContentEncodingSniffingPolicy::Sniff);
-
-    m_task = [m_sessionWrapper->session dataTaskWithRequest:nsRequest.get()];
-
</del><span class="cx">     WTFBeginSignpost(m_task.get(), "DataTask", "%{public}s pri: %.2f preconnect: %d", url.string().ascii().data(), toNSURLSessionTaskPriority(request.priority()), parameters.shouldPreconnectOnly == PreconnectOnly::Yes);
</span><span class="cx"> 
</span><span class="cx">     RELEASE_ASSERT(!m_sessionWrapper->dataTaskMap.contains([m_task taskIdentifier]));
</span><span class="cx">     m_sessionWrapper->dataTaskMap.add([m_task taskIdentifier], this);
</span><del>-    LOG(NetworkSession, "%lu Creating NetworkDataTask with URL %s", (unsigned long)[m_task taskIdentifier], [nsRequest URL].absoluteString.UTF8String);
</del><ins>+    LOG(NetworkSession, "%lu Creating NetworkDataTask with URL %s", (unsigned long)[m_task taskIdentifier], [protectedNSRequest URL].absoluteString.UTF8String);
</ins><span class="cx"> 
</span><span class="cx">     if (parameters.shouldPreconnectOnly == PreconnectOnly::Yes) {
</span><span class="cx"> #if ENABLE(SERVER_PRECONNECT)
</span><span class="lines">@@ -378,9 +372,9 @@
</span><span class="cx">     if (shouldBlockCookies) {
</span><span class="cx"> #if !RELEASE_LOG_DISABLED
</span><span class="cx">         if (m_session->shouldLogCookieInformation())
</span><del>-            RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::logCookieInformation: pageID=%" PRIu64 ", frameID=%" PRIu64 ", taskID=%lu: Blocking cookies for URL %s", this, pageID().toUInt64(), frameID().toUInt64(), (unsigned long)[m_task taskIdentifier], [nsRequest URL].absoluteString.UTF8String);
</del><ins>+            RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::logCookieInformation: pageID=%" PRIu64 ", frameID=%" PRIu64 ", taskID=%lu: Blocking cookies for URL %s", this, pageID().toUInt64(), frameID().toUInt64(), (unsigned long)[m_task taskIdentifier], [protectedNSRequest URL].absoluteString.UTF8String);
</ins><span class="cx"> #else
</span><del>-        LOG(NetworkSession, "%lu Blocking cookies for URL %s", (unsigned long)[m_task taskIdentifier], [nsRequest URL].absoluteString.UTF8String);
</del><ins>+        LOG(NetworkSession, "%lu Blocking cookies for URL %s", (unsigned long)[m_task taskIdentifier], [protectedNSRequest URL].absoluteString.UTF8String);
</ins><span class="cx"> #endif
</span><span class="cx">         blockCookies();
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcesscocoaNetworkSessionCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (279119 => 279120)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm  2021-06-22 16:17:45 UTC (rev 279119)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm     2021-06-22 16:44:56 UTC (rev 279120)
</span><span class="lines">@@ -59,31 +59,10 @@
</span><span class="cx"> #import <wtf/SoftLinking.h>
</span><span class="cx"> #import <wtf/URL.h>
</span><span class="cx"> #import <wtf/WeakObjCPtr.h>
</span><del>-#import <wtf/cocoa/VectorCocoa.h>
-#import <wtf/darwin/WeakLinking.h>
</del><span class="cx"> #import <wtf/text/WTFString.h>
</span><span class="cx"> 
</span><span class="cx"> #if USE(APPLE_INTERNAL_SDK)
</span><span class="cx"> #import <WebKitAdditions/NetworkSessionCocoaAdditions.h>
</span><del>-
-#if !PLATFORM(IOS_FAMILY_SIMULATOR)
-#import <Symptoms/SymptomAnalytics.h>
-#import <Symptoms/SymptomPresentationFeed.h>
-#endif
-
-#if !PLATFORM(IOS_FAMILY_SIMULATOR) && !PLATFORM(WATCHOS)
-SOFT_LINK_PRIVATE_FRAMEWORK_IN_UMBRELLA_OPTIONAL(Symptoms, SymptomAnalytics);
-SOFT_LINK_PRIVATE_FRAMEWORK_IN_UMBRELLA_OPTIONAL(Symptoms, SymptomPresentationFeed);
-SOFT_LINK_PRIVATE_FRAMEWORK_IN_UMBRELLA_OPTIONAL(Symptoms, SymptomPresentationLite);
-SOFT_LINK_CLASS_OPTIONAL(SymptomAnalytics, AnalyticsWorkspace);
-SOFT_LINK_CLASS_OPTIONAL(SymptomPresentationFeed, UsageFeed);
-SOFT_LINK_CONSTANT_MAY_FAIL(SymptomPresentationFeed, kSymptomAnalyticsServiceDomainTrackingClearHistoryBundleIDs, const NSString *);
-SOFT_LINK_CONSTANT_MAY_FAIL(SymptomPresentationFeed, kSymptomAnalyticsServiceDomainTrackingClearHistoryStartDate, const NSString *);
-SOFT_LINK_CONSTANT_MAY_FAIL(SymptomPresentationFeed, kSymptomAnalyticsServiceDomainTrackingClearHistoryEndDate, const NSString *);
-SOFT_LINK_CONSTANT_MAY_FAIL(SymptomPresentationFeed, kSymptomAnalyticsServiceDomainTrackingClearHistoryKey, const NSString *);
-SOFT_LINK_CONSTANT_MAY_FAIL(SymptomPresentationLite, kSymptomAnalyticsServiceEndpoint, NSString *)
-#endif
-
</del><span class="cx"> #else
</span><span class="cx"> #define NETWORK_SESSION_COCOA_ADDITIONS_1
</span><span class="cx"> void WebKit::NetworkSessionCocoa::removeNetworkWebsiteData(std::optional<WallTime>, std::optional<HashSet<WebCore::RegistrableDomain>>&&, CompletionHandler<void()>&& completionHandler) { completionHandler(); }
</span><span class="lines">@@ -1785,85 +1764,4 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if USE(APPLE_INTERNAL_SDK)
-
-#if !PLATFORM(IOS_FAMILY_SIMULATOR) && !PLATFORM(WATCHOS)
-static bool isActingOnBehalfOfAFullWebBrowser(const String& bundleID)
-{
-    return bundleID == "com.apple.webbookmarksd";
-}
-#endif
-
-void NetworkSessionCocoa::removeNetworkWebsiteData(std::optional<WallTime> modifiedSince, std::optional<HashSet<WebCore::RegistrableDomain>>&& domains, CompletionHandler<void()>&& completionHandler)
-{
-#if !PLATFORM(IOS_FAMILY_SIMULATOR) && !PLATFORM(WATCHOS)
-    auto bundleID = WebCore::applicationBundleIdentifier();
-    if (!isParentProcessAFullWebBrowser(networkProcess()) && !isActingOnBehalfOfAFullWebBrowser(bundleID))
-        return completionHandler();
-
-    if (!SymptomAnalyticsLibrary()
-        || !SymptomPresentationFeedLibrary()
-        || !SymptomPresentationLiteLibrary()
-        || !getAnalyticsWorkspaceClass()
-        || !getUsageFeedClass()
-        || !canLoadkSymptomAnalyticsServiceEndpoint()) {
-        completionHandler();
-        return;
-    }
-
-    RetainPtr<AnalyticsWorkspace> workspace = adoptNS([allocAnalyticsWorkspaceInstance() initWorkspaceWithService:getkSymptomAnalyticsServiceEndpoint()]);
-    RetainPtr<UsageFeed> usageFeed = adoptNS([allocUsageFeedInstance() initWithWorkspace:workspace.get()]);
-
-    if (![usageFeed.get() respondsToSelector:@selector(performNetworkDomainsActionWithOptions:reply:)]
-        || !canLoadkSymptomAnalyticsServiceDomainTrackingClearHistoryKey()
-        || !canLoadkSymptomAnalyticsServiceDomainTrackingClearHistoryBundleIDs()
-        || !canLoadkSymptomAnalyticsServiceDomainTrackingClearHistoryStartDate()
-        || !canLoadkSymptomAnalyticsServiceDomainTrackingClearHistoryEndDate()) {
-        completionHandler();
-        return;
-    }
-
-    auto *startDate = [NSDate distantPast];
-    if (modifiedSince) {
-        NSTimeInterval timeInterval = modifiedSince.value().secondsSinceEpoch().seconds();
-        startDate = [NSDate dateWithTimeIntervalSince1970:timeInterval];
-    }
-
-    auto contextArray = adoptNS([[NSMutableArray alloc] init]);
-    if (domains) {
-        contextArray = createNSArray(*domains, [&] (auto domain) {
-            return [NSString stringWithUTF8String:domain.string().utf8().data()];
-        });
-    }
-
-    if (isActingOnBehalfOfAFullWebBrowser(bundleID))
-        bundleID = "com.apple.mobilesafari";
-
-    NSDictionary *options = @{
-        (id)getkSymptomAnalyticsServiceDomainTrackingClearHistoryKey(): @{
-            (id)getkSymptomAnalyticsServiceDomainTrackingClearHistoryBundleIDs(): @{
-                bundleID : contextArray.get(),
-            },
-            (id)getkSymptomAnalyticsServiceDomainTrackingClearHistoryStartDate(): startDate,
-            (id)getkSymptomAnalyticsServiceDomainTrackingClearHistoryEndDate(): [NSDate distantFuture]
-        }
-    };
-
-    bool result = [usageFeed performNetworkDomainsActionWithOptions:options reply:makeBlockPtr([completionHandler = WTFMove(completionHandler)](NSDictionary *reply, NSError *error) mutable {
-        if (error)
-            LOG(NetworkSession, "Error deleting network domain data %" PUBLIC_LOG_STRING, error);
-
-        completionHandler();
-    }).get()];
-
-    if (!result)
-        LOG(NetworkSession, "Error deleting network domain data: invalid parameter or failure to contact the service");
-#else
-    UNUSED_PARAM(modifiedSince);
-    completionHandler();
-#endif
-}
-
-#endif // USE(APPLE_INTERNAL_SDK)
-
</del><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessCocoaWebPageProxyCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm (279119 => 279120)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm 2021-06-22 16:17:45 UTC (rev 279119)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm    2021-06-22 16:44:56 UTC (rev 279120)
</span><span class="lines">@@ -48,7 +48,6 @@
</span><span class="cx"> #import "WebProcessProxy.h"
</span><span class="cx"> #import "WebsiteDataStore.h"
</span><span class="cx"> #import "WKErrorInternal.h"
</span><del>-#import <Foundation/NSURLRequest.h>
</del><span class="cx"> #import <WebCore/DragItem.h>
</span><span class="cx"> #import <WebCore/GeometryUtilities.h>
</span><span class="cx"> #import <WebCore/HighlightVisibility.h>
</span><span class="lines">@@ -86,6 +85,13 @@
</span><span class="cx"> SOFT_LINK_CLASS(WebContentAnalysis, WebFilterEvaluator);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if USE(APPLE_INTERNAL_SDK)
+// FIXME: This additions file should be renamed to WebPageProxyAdditions.mm.
+#import <WebKitAdditions/WebPageProxyAdditions.h>
+#else
+#define WEB_PAGE_PROXY_ADDITIONS
+#endif
+
</ins><span class="cx"> #define MESSAGE_CHECK(assertion) MESSAGE_CHECK_BASE(assertion, process().connection())
</span><span class="cx"> #define MESSAGE_CHECK_COMPLETION(assertion, completion) MESSAGE_CHECK_COMPLETION_BASE(assertion, process().connection(), completion)
</span><span class="cx"> 
</span><span class="lines">@@ -653,12 +659,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::setLastNavigationWasAppBound(ResourceRequest& request)
</span><span class="cx"> {
</span><del>-#if ENABLE(APP_PRIVACY_REPORT)
-    auto *nsRequest = request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::DoNotUpdateHTTPBody);
-    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-    request.setIsAppBound(!nsRequest._isNonAppInitiated);
-    ALLOW_DEPRECATED_DECLARATIONS_END
-#endif
</del><ins>+    WEB_PAGE_PROXY_ADDITIONS
</ins><span class="cx">     m_lastNavigationWasAppBound = request.isAppBound();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (279119 => 279120)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog    2021-06-22 16:17:45 UTC (rev 279119)
+++ trunk/Tools/ChangeLog       2021-06-22 16:44:56 UTC (rev 279120)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2021-06-22  Truitt Savell  <tsavell@apple.com>
+
+        Unreviewed, reverting r279083.
+
+        Broke Mac Builds
+
+        Reverted changeset:
+
+        "Migrate App Privacy Report code from WebKitAdditions"
+        https://bugs.webkit.org/show_bug.cgi?id=227045
+        https://commits.webkit.org/r279083
+
</ins><span class="cx"> 2021-06-22  Kimmo Kinnunen  <kkinnunen@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Functions dispatched to WorkQueue are sometimes destroyed in the calling thread due to block refcounting
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKitCocoaInAppBrowserPrivacymm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm (279119 => 279120)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm       2021-06-22 16:17:45 UTC (rev 279119)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm  2021-06-22 16:44:56 UTC (rev 279120)
</span><span class="lines">@@ -33,7 +33,6 @@
</span><span class="cx"> #import "TestURLSchemeHandler.h"
</span><span class="cx"> #import "TestWKWebView.h"
</span><span class="cx"> #import "WKWebViewConfigurationExtras.h"
</span><del>-#import <Foundation/NSURLRequest.h>
</del><span class="cx"> #import <WebCore/RegistrableDomain.h>
</span><span class="cx"> #import <WebCore/RuntimeApplicationChecks.h>
</span><span class="cx"> #import <WebKit/WKHTTPCookieStorePrivate.h>
</span><span class="lines">@@ -44,10 +43,13 @@
</span><span class="cx"> #import <WebKit/WKWebsiteDataStorePrivate.h>
</span><span class="cx"> #import <WebKit/_WKUserContentWorld.h>
</span><span class="cx"> #import <WebKit/_WKUserStyleSheet.h>
</span><del>-#import <pal/spi/cf/CFNetworkSPI.h>
</del><span class="cx"> #import <wtf/RunLoop.h>
</span><span class="cx"> #import <wtf/text/WTFString.h>
</span><span class="cx"> 
</span><ins>+#if USE(APPLE_INTERNAL_SDK)
+#import <WebKitAdditions/InAppBrowserPrivacyAdditions.h>
+#endif
+
</ins><span class="cx"> #if ENABLE(APP_BOUND_DOMAINS)
</span><span class="cx"> 
</span><span class="cx"> static bool isDone;
</span><span class="lines">@@ -1418,7 +1420,7 @@
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(APP_BOUND_DOMAINS)
</span><span class="cx"> 
</span><del>-#if ENABLE(APP_PRIVACY_REPORT)
</del><ins>+#if USE(APPLE_INTERNAL_SDK) && ENABLE(APP_BOUND_REQUESTS)
</ins><span class="cx"> TEST(InAppBrowserPrivacy, AppBoundRequest)
</span><span class="cx"> {
</span><span class="cx">     auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
</span><span class="lines">@@ -1428,11 +1430,8 @@
</span><span class="cx"> 
</span><span class="cx">     __block bool isDone = false;
</span><span class="cx">     NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]];
</span><ins>+    APP_BOUND_REQUEST_ADDITIONS
</ins><span class="cx"> 
</span><del>-    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-    nonAppBoundRequest._isNonAppInitiated = YES;
-    ALLOW_DEPRECATED_DECLARATIONS_END
-
</del><span class="cx">     [webView loadRequest:nonAppBoundRequest];
</span><span class="cx">     [webView _test_waitForDidFinishNavigation];
</span><span class="cx"> 
</span><span class="lines">@@ -1485,9 +1484,7 @@
</span><span class="cx">     
</span><span class="cx">     isDone = false;
</span><span class="cx">     NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:nonAppBoundURL]];
</span><del>-    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-    nonAppBoundRequest._isNonAppInitiated = YES;
-    ALLOW_DEPRECATED_DECLARATIONS_END
</del><ins>+    APP_BOUND_REQUEST_ADDITIONS
</ins><span class="cx">     
</span><span class="cx">     isDone = false;
</span><span class="cx">     [webView _clearAppBoundNavigationData:^{
</span><span class="lines">@@ -1545,9 +1542,7 @@
</span><span class="cx">     __block bool isDone = false;
</span><span class="cx">     auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
</span><span class="cx">     NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"page-with-csp" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
</span><del>-    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-    nonAppBoundRequest._isNonAppInitiated = YES;
-    ALLOW_DEPRECATED_DECLARATIONS_END
</del><ins>+    APP_BOUND_REQUEST_ADDITIONS
</ins><span class="cx"> 
</span><span class="cx">     [webView loadRequest:nonAppBoundRequest];
</span><span class="cx"> 
</span><span class="lines">@@ -1627,9 +1622,7 @@
</span><span class="cx">     NSURLRequest *request = server.request();
</span><span class="cx">     if (appBound == IsAppBound::No) {
</span><span class="cx">         NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server.port()]]];
</span><del>-        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-        nonAppBoundRequest._isNonAppInitiated = YES;
-        ALLOW_DEPRECATED_DECLARATIONS_END
</del><ins>+        APP_BOUND_REQUEST_ADDITIONS
</ins><span class="cx">         request = nonAppBoundRequest;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1737,9 +1730,7 @@
</span><span class="cx"> 
</span><span class="cx">     isDone = false;
</span><span class="cx">     NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/main.html", server.port()]]];
</span><del>-    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-    nonAppBoundRequest._isNonAppInitiated = YES;
-    ALLOW_DEPRECATED_DECLARATIONS_END
</del><ins>+    APP_BOUND_REQUEST_ADDITIONS
</ins><span class="cx">     [webView2 loadRequest:nonAppBoundRequest];
</span><span class="cx">     EXPECT_WK_STREQ([webView2 _test_waitForAlert], "fetched from server");
</span><span class="cx"> 
</span><span class="lines">@@ -1789,9 +1780,7 @@
</span><span class="cx">         NSURLRequest *request = server1.request();
</span><span class="cx">         if (isAppBound == IsAppBound::No) {
</span><span class="cx">             NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server1.port()]]];
</span><del>-            ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-            nonAppBoundRequest._isNonAppInitiated = YES;
-            ALLOW_DEPRECATED_DECLARATIONS_END
</del><ins>+            APP_BOUND_REQUEST_ADDITIONS
</ins><span class="cx">             request = nonAppBoundRequest;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -1810,9 +1799,7 @@
</span><span class="cx">         NSURLRequest *request2 = server2.request();
</span><span class="cx">         if (isAppBound == IsAppBound::No) {
</span><span class="cx">             NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server2.port()]]];
</span><del>-            ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-            nonAppBoundRequest._isNonAppInitiated = YES;
-            ALLOW_DEPRECATED_DECLARATIONS_END
</del><ins>+            APP_BOUND_REQUEST_ADDITIONS
</ins><span class="cx">             request2 = nonAppBoundRequest;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -1863,9 +1850,7 @@
</span><span class="cx">     NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]];
</span><span class="cx">     if (isAppBound == IsAppBound::No) {
</span><span class="cx">         NSMutableURLRequest *nonAppBoundRequest = request;
</span><del>-        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-        nonAppBoundRequest._isNonAppInitiated = YES;
-        ALLOW_DEPRECATED_DECLARATIONS_END
</del><ins>+        APP_BOUND_REQUEST_ADDITIONS
</ins><span class="cx">         request = nonAppBoundRequest;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -2020,9 +2005,7 @@
</span><span class="cx">     expectedMessage = "starts app-bound";
</span><span class="cx">     receivedMessage = false;
</span><span class="cx">     NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://127.0.0.1:%d/main.html", server.port()]]];
</span><del>-    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-    nonAppBoundRequest._isNonAppInitiated = YES;
-    ALLOW_DEPRECATED_DECLARATIONS_END
</del><ins>+    APP_BOUND_REQUEST_ADDITIONS
</ins><span class="cx"> 
</span><span class="cx">     [webView2 loadRequest:nonAppBoundRequest];
</span><span class="cx">     TestWebKitAPI::Util::run(&receivedMessage);
</span></span></pre>
</div>
</div>

</body>
</html>