[Cocoa] Pass the embedding app's bundle ID to new instances of NEFilterSource
authoraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Nov 2016 20:34:18 +0000 (20:34 +0000)
committeraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Nov 2016 20:34:18 +0000 (20:34 +0000)
commitd153ec3b99639959307038169ce4401628e46835
tree3f622a480fc033d12c213c857359cf2485c37b35
parentc2973a42f7136df5a5a5a4a8a25b9cb4a5960930
[Cocoa] Pass the embedding app's bundle ID to new instances of NEFilterSource
https://bugs.webkit.org/show_bug.cgi?id=165168
<rdar://problem/29003618>

Reviewed by Simon Fraser.

* platform/RuntimeApplicationChecks.h: Declared applicationBundleIdentifier().
* platform/RuntimeApplicationChecks.mm:
(WebCore::applicationBundleIdentifier): Made non-static.
* platform/cocoa/NetworkExtensionContentFilter.mm:
(WebCore::NetworkExtensionContentFilter::initialize): If the new NEFilterSource instance
responds to -setSourceAppBundleID:, call it with applicationBundleIdentifier().
* platform/spi/cocoa/NEFilterSourceSPI.h: Moved NEFilterSourceOptionsRedirectURL into the
!USE(APPLE_INTERNAL_SDK) section and unconditionally declared @property sourceAppBundleID in
a new category on NEFilterSource.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/RuntimeApplicationChecks.h
Source/WebCore/platform/RuntimeApplicationChecks.mm
Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm
Source/WebCore/platform/spi/cocoa/NEFilterSourceSPI.h