Skip to content
Permalink
Browse files
Adjust what we consider to be private relayed
https://bugs.webkit.org/show_bug.cgi?id=239784
<rdar://92336270>

Patch by Alex Christensen <achristensen@webkit.org> on 2022-04-26
Reviewed by Geoffrey Garen.

If a request is not eligible for private relay, then do not consider it having been private relayed.

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):

Canonical link: https://commits.webkit.org/250016@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Alex Christensen authored and webkit-commit-queue committed Apr 26, 2022
1 parent 8b23f3f commit ab204b3e6170a37f096ec119a394f835842e01f0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
@@ -1,3 +1,16 @@
2022-04-26 Alex Christensen <achristensen@webkit.org>

Adjust what we consider to be private relayed
https://bugs.webkit.org/show_bug.cgi?id=239784
<rdar://92336270>

Reviewed by Geoffrey Garen.

If a request is not eligible for private relay, then do not consider it having been private relayed.

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):

2022-04-26 Elliott Williams <emw@apple.com>

Fix build error: "cp: JavaScriptCore.profdata is not a directory"
@@ -936,7 +936,9 @@ - (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)data

NSURLSessionTaskTransactionMetrics *metrics = taskMetrics.transactionMetrics.lastObject;
#if HAVE(NETWORK_CONNECTION_PRIVACY_STANCE)
auto privateRelayed = metrics._privacyStance == nw_connection_privacy_stance_direct ? PrivateRelayed::No : PrivateRelayed::Yes;
auto privateRelayed = metrics._privacyStance == nw_connection_privacy_stance_direct
|| metrics._privacyStance == nw_connection_privacy_stance_not_eligible
? PrivateRelayed::No : PrivateRelayed::Yes;
#else
auto privateRelayed = PrivateRelayed::No;
#endif

0 comments on commit ab204b3

Please sign in to comment.