Give NSURLSessionConfiguration information about parent process
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Mar 2016 00:05:17 +0000 (00:05 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Mar 2016 00:05:17 +0000 (00:05 +0000)
commit42807a77296e76ef13df9c9f4a9bf0e8779e5f5b
treef09b22ed9ae79d850f7a74226f79b2d60657c889
parent88e0d96feb9716e0ffb6781c829cc592e6d136a3
Give NSURLSessionConfiguration information about parent process
https://bugs.webkit.org/show_bug.cgi?id=155661
Source/WebCore:

Reviewed by Anders Carlsson.

* platform/spi/cf/CFNetworkSPI.h:
Add newly-used SPI declarations.

Source/WebKit2:

rdar://problem/25225850

Reviewed by Anders Carlsson.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkSession::sessionID):
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::partitionName):
(WebKit::NetworkProcess::sourceApplicationAuditData):
(WebKit::NetworkProcess::cfURLCacheOrigins):
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::globalCustomProtocolManager):
(WebKit::globalSourceApplicationAuditTokenData):
(WebKit::NetworkSession::setCustomProtocolManager):
(WebKit::NetworkSession::setSourceApplicationAuditTokenData):
(WebKit::NetworkSession::defaultSession):
(WebKit::NetworkSession::NetworkSession):
Tell the NSURLSessionConfiguration what the source application bundle identifier
and audit token data are so we can correctly keep track of which application is using data.
This also gives CFNetwork enough information to determine if the application is allowed to
use cell data in Settings, so it seems like we do not need to explicitly set allowsCellularAccess.
* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::sourceApplicationAuditData):
(WebKit::RemoteNetworkingContext::sourceApplicationIdentifier):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::sourceApplicationAuditData):
(WebKit::WebFrameNetworkingContext::sourceApplicationIdentifier):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
* WebProcess/WebProcess.h:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformTerminate):
(WebKit::WebProcess::sourceApplicationAuditData):
(WebKit::WebProcess::initializeSandbox):
I moved the calls to getAuditToken from RemoteNetworkingContext.mm and WebFrameNetworkingContext.mm
to NetworkProcessCocoa.mm and WebProcessCocoa.mm, respectively, to share with NetworkSession code,
which does not use NetworkingContexts.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@198457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/spi/cf/CFNetworkSPI.h
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/NetworkProcess.cpp
Source/WebKit2/NetworkProcess/NetworkProcess.h
Source/WebKit2/NetworkProcess/NetworkSession.h
Source/WebKit2/NetworkProcess/cocoa/NetworkProcessCocoa.mm
Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm
Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
Source/WebKit2/WebProcess/WebProcess.cpp
Source/WebKit2/WebProcess/WebProcess.h
Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm