Changeset 166223 in webkit
- Timestamp:
- Mar 24, 2014 11:24:13 PM (10 years ago)
- Location:
- tags/Safari-538.24.2/Source/WebKit2
- Files:
-
- 10 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
tags/Safari-538.24.2/Source/WebKit2/ChangeLog
r166222 r166223 1 2014-03-24 Babak Shafiei <bshafiei@apple.com> 2 3 Merge r166103 4 5 2014-03-21 Sam Weinig <sam@webkit.org> 6 7 [WebKit2] Implement NetworkingContext::sourceApplicationAuditData() for WebKit2 8 https://bugs.webkit.org/show_bug.cgi?id=130528 9 10 Reviewed by Tim Horton. 11 12 * Platform/IPC/Connection.h: 13 * Platform/IPC/mac/ConnectionMac.cpp: 14 (IPC::Connection::getAuditToken): 15 Expose the audit data if available. 16 17 * NetworkProcess/mac/RemoteNetworkingContext.mm: 18 (WebKit::RemoteNetworkingContext::sourceApplicationAuditData): 19 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: 20 (WebKit::WebFrameNetworkingContext::sourceApplicationAuditData): 21 Pass the audit data corresponding to the UIProcess. 22 23 * Configurations/Network-iOS.entitlements: Copied from Configurations/WebContent-iOS.entitlements. 24 * Configurations/NetworkProcess.xcconfig: 25 * Configurations/NetworkService.Development.xcconfig: 26 * Configurations/NetworkService.xcconfig: 27 * Configurations/WebContent-iOS.entitlements: 28 Add entitlement allowing the audit data to be used. 29 1 30 2014-03-24 Babak Shafiei <bshafiei@apple.com> 2 31 -
tags/Safari-538.24.2/Source/WebKit2/Configurations/NetworkProcess.xcconfig
r162104 r166223 30 30 EXCLUDED_SHIM_FILE_NAME_iphoneos = SecItemShim.dylib; 31 31 EXCLUDED_SHIM_FILE_NAME_iphonesimulator = $(EXCLUDED_SHIM_FILE_NAME_iphoneos); 32 33 CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*] = Configurations/Network-iOS.entitlements 34 CODE_SIGN_ENTITLEMENTS[sdk=iphonesimulator*] = Configurations/Network-iOS.entitlements -
tags/Safari-538.24.2/Source/WebKit2/Configurations/NetworkService.Development.xcconfig
r164547 r166223 30 30 INFOPLIST_FILE_macosx = NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info-OSX.plist; 31 31 INFOPLIST_FILE_iphoneos = NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info-iOS.plist; 32 33 CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*] = Configurations/Network-iOS.entitlements 34 CODE_SIGN_ENTITLEMENTS[sdk=iphonesimulator*] = Configurations/Network-iOS.entitlements -
tags/Safari-538.24.2/Source/WebKit2/Configurations/NetworkService.xcconfig
r164547 r166223 30 30 INFOPLIST_FILE_macosx = NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist; 31 31 INFOPLIST_FILE_iphoneos = NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist; 32 33 CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*] = Configurations/Network-iOS.entitlements 34 CODE_SIGN_ENTITLEMENTS[sdk=iphonesimulator*] = Configurations/Network-iOS.entitlements -
tags/Safari-538.24.2/Source/WebKit2/Configurations/WebContent-iOS.entitlements
r165514 r166223 3 3 <plist version="1.0"> 4 4 <dict> 5 <key>com.apple.private.allow-explicit-graphics-priority</key> 6 <true/> 7 <key>com.apple.private.webinspector.allow-remote-inspection</key> 8 <true/> 9 <key>dynamic-codesigning</key> 10 <true/> 11 <key>com.apple.private.assets.accessible-asset-types</key> 12 <array> 13 <string>com.apple.MobileAsset.WebKitBlocklist</string> 14 </array> 5 <key>com.apple.private.allow-explicit-graphics-priority</key> 6 <true/> 7 <key>com.apple.private.network.socket-delegate</key> 8 <true/> 9 <key>com.apple.private.webinspector.allow-remote-inspection</key> 10 <true/> 11 <key>dynamic-codesigning</key> 12 <true/> 13 <key>com.apple.private.assets.accessible-asset-types</key> 14 <array> 15 <string>com.apple.MobileAsset.WebKitBlocklist</string> 16 </array> 15 17 </dict> 16 18 </plist> -
tags/Safari-538.24.2/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm
r164726 r166223 27 27 #import "RemoteNetworkingContext.h" 28 28 29 #import "NetworkProcess.h" 29 30 #import "SessionTracker.h" 30 31 #import "WebErrors.h" … … 70 71 RetainPtr<CFDataRef> RemoteNetworkingContext::sourceApplicationAuditData() const 71 72 { 72 return nil; 73 #if PLATFORM(IOS) 74 audit_token_t auditToken; 75 if (!NetworkProcess::shared().parentProcessConnection()->getAuditToken(auditToken)) 76 return nullptr; 77 return adoptCF(CFDataCreate(0, (const UInt8*)&auditToken, sizeof(auditToken))); 78 #else 79 return nullptr; 80 #endif 73 81 } 74 82 -
tags/Safari-538.24.2/Source/WebKit2/Platform/IPC/Connection.h
r165931 r166223 115 115 static bool identifierIsNull(Identifier identifier) { return identifier.port == MACH_PORT_NULL; } 116 116 xpc_connection_t xpcConnection() { return m_xpcConnection; } 117 117 bool getAuditToken(audit_token_t&); 118 118 #elif USE(UNIX_DOMAIN_SOCKETS) 119 119 typedef int Identifier; -
tags/Safari-538.24.2/Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp
r165746 r166223 36 36 #include <xpc/xpc.h> 37 37 38 #if __has_include(<xpc/private.h>) 39 #include <xpc/private.h> 40 #endif 41 42 extern "C" void xpc_connection_get_audit_token(xpc_connection_t, audit_token_t*); 43 38 44 namespace IPC { 39 45 … … 512 518 } 513 519 520 bool Connection::getAuditToken(audit_token_t& auditToken) 521 { 522 if (!m_xpcConnection) 523 return false; 524 525 xpc_connection_get_audit_token(m_xpcConnection, &auditToken); 526 return true; 527 } 528 514 529 } // namespace IPC -
tags/Safari-538.24.2/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
r166222 r166223 2740 2740 7801C095142290C400FAF9AF /* WebHitTestResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebHitTestResult.cpp; sourceTree = "<group>"; }; 2741 2741 7801C096142290C400FAF9AF /* WebHitTestResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebHitTestResult.h; sourceTree = "<group>"; }; 2742 7C0BB9A718DCDE890006C086 /* iOS.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = iOS.xcconfig; sourceTree = "<group>"; }; 2743 7C0BB9A818DCDE890006C086 /* WebContent-iOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "WebContent-iOS.entitlements"; sourceTree = "<group>"; }; 2744 7C0BB9A918DCDF5A0006C086 /* Network-iOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "Network-iOS.entitlements"; sourceTree = "<group>"; }; 2742 2745 7C135AA6173B0BCA00586AE2 /* WKPluginInformation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKPluginInformation.cpp; sourceTree = "<group>"; }; 2743 2746 7C135AA7173B0BCA00586AE2 /* WKPluginInformation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPluginInformation.h; sourceTree = "<group>"; }; … … 3792 3795 1A4F976B100E7B6600637A18 /* DebugRelease.xcconfig */, 3793 3796 1A4F976C100E7B6600637A18 /* FeatureDefines.xcconfig */, 3797 7C0BB9A718DCDE890006C086 /* iOS.xcconfig */, 3798 7C0BB9A918DCDF5A0006C086 /* Network-iOS.entitlements */, 3794 3799 510CC8461613C7C600D03ED3 /* NetworkProcess.xcconfig */, 3795 3800 BC8283AA16B4BEAD00A278FE /* NetworkService.Development.xcconfig */, … … 3804 3809 5183B3931379F85C00E8754E /* Shim.xcconfig */, 3805 3810 1A4F976E100E7B6600637A18 /* Version.xcconfig */, 3811 7C0BB9A818DCDE890006C086 /* WebContent-iOS.entitlements */, 3806 3812 5DAD7294116FF70B00EE5396 /* WebContentProcess.xcconfig */, 3807 3813 BCACC40F16B0B8A800B6E092 /* WebContentService.Development.xcconfig */, -
tags/Safari-538.24.2/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
r164726 r166223 25 25 26 26 #include "config.h" 27 #include "WebFrameNetworkingContext.h" 27 28 28 29 #include "SessionTracker.h" 29 30 #include "WebCookieManager.h" 30 #include "WebFrameNetworkingContext.h"31 31 #include "WebPage.h" 32 #include "WebProcess.h" 32 33 #include <WebCore/Frame.h> 33 34 #include <WebCore/FrameLoader.h> … … 91 92 RetainPtr<CFDataRef> WebFrameNetworkingContext::sourceApplicationAuditData() const 92 93 { 93 return RetainPtr<CFDataRef>(); 94 #if PLATFORM(IOS) 95 audit_token_t auditToken; 96 if (!WebProcess::shared().parentProcessConnection()->getAuditToken(auditToken)) 97 return nullptr; 98 return adoptCF(CFDataCreate(0, (const UInt8*)&auditToken, sizeof(auditToken))); 99 #else 100 return nullptr; 101 #endif 94 102 } 95 103
Note: See TracChangeset
for help on using the changeset viewer.