[PAL] Move SessionID into PAL
authordon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Aug 2017 15:17:02 +0000 (15:17 +0000)
committerdon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Aug 2017 15:17:02 +0000 (15:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=174192

Reviewed by Antti Koivisto.

Source/WebCore:

No new tests. No change in behavior.

* CMakeLists.txt:
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::connect):
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::sessionID const):
* dom/Document.h:
* dom/ScriptExecutionContext.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::elementWithID):
(WebCore::HTMLMediaElement::finishParsingChildren):
(WebCore::HTMLMediaElement::scheduleEvent):
(WebCore::HTMLMediaElement::canPlayType const):
(WebCore::HTMLMediaElement::load):
(WebCore::HTMLMediaElement::loadResource):
(WebCore::HTMLMediaElement::textTracksAreReady const):
(WebCore::HTMLMediaElement::textTrackModeChanged):
(WebCore::HTMLMediaElement::noneSupported):
(WebCore::HTMLMediaElement::mediaLoadingFailedFatally):
(WebCore::HTMLMediaElement::mediaLoadingFailed):
(WebCore::HTMLMediaElement::setReadyState):
(WebCore::HTMLMediaElement::addPlayedRange):
(WebCore::HTMLMediaElement::seekTask):
(WebCore::HTMLMediaElement::refreshCachedTime const):
(WebCore::HTMLMediaElement::currentMediaTime const):
(WebCore::HTMLMediaElement::setWebkitPreservesPitch):
(WebCore::HTMLMediaElement::ended const):
(WebCore::HTMLMediaElement::playInternal):
(WebCore::HTMLMediaElement::pause):
(WebCore::HTMLMediaElement::togglePlayState):
(WebCore::HTMLMediaElement::beginScrubbing):
(WebCore::HTMLMediaElement::playbackProgressTimerFired):
(WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack):
(WebCore::HTMLMediaElement::didAddTextTrack):
(WebCore::HTMLMediaElement::didRemoveTextTrack):
(WebCore::controllerJSValue):
(WebCore::HTMLMediaElement::configureTextTracks):
(WebCore::HTMLMediaElement::selectNextSourceChild):
(WebCore::HTMLMediaElement::sourceWasAdded):
(WebCore::HTMLMediaElement::sourceWasRemoved):
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
(WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):
(WebCore::HTMLMediaElement::potentiallyPlaying const):
(WebCore::HTMLMediaElement::endedPlayback const):
(WebCore::HTMLMediaElement::stoppedDueToErrors const):
(WebCore::HTMLMediaElement::updatePlayState):
(WebCore::HTMLMediaElement::userCancelledLoad):
(WebCore::HTMLMediaElement::canSuspendForDocumentSuspension const):
(WebCore::HTMLMediaElement::addEventListener):
(WebCore::HTMLMediaElement::isFullscreen const):
(WebCore::HTMLMediaElement::toggleStandardFullscreenState):
(WebCore::HTMLMediaElement::waitForPreparedForInlineThen):
(WebCore::HTMLMediaElement::setVideoFullscreenLayer):
(WebCore::HTMLMediaElement::updateTextTrackDisplay):
(WebCore::HTMLMediaElement::mediaControls const):
(WebCore::HTMLMediaElement::configureTextTrackDisplay):
(WebCore::HTMLMediaElement::setMediaGroup):
(WebCore::HTMLMediaElement::setControllerForBindings):
(WebCore::HTMLMediaElement::isBlockedOnMediaController const):
(WebCore::HTMLMediaElement::prepareMediaFragmentURI):
(WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
(WebCore::HTMLMediaElement::fileSize const):
(WebCore::HTMLMediaElement::mediaSessionTitle const):
(WebCore::needsSeekingSupportQuirk):
(WebCore::HTMLMediaElement::supportsSeeking const):
(WebCore::HTMLMediaElement::doesHaveAttribute const):
(WebCore::HTMLMediaElement::isVideoTooSmallForInlinePlayback):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::continueAfterContentPolicy):
* loader/EmptyClients.cpp:
* loader/FrameLoaderClient.h:
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
* loader/cache/CachedCSSStyleSheet.h:
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::CachedFont):
* loader/cache/CachedFont.h:
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::CachedImage):
* loader/cache/CachedImage.h:
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::CachedRawResource):
* loader/cache/CachedRawResource.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::sessionID const):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::createResource):
(WebCore::CachedResourceLoader::sessionID const):
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::CachedSVGDocument):
* loader/cache/CachedSVGDocument.h:
* loader/cache/CachedSVGFont.cpp:
(WebCore::CachedSVGFont::CachedSVGFont):
* loader/cache/CachedSVGFont.h:
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::CachedScript):
* loader/cache/CachedScript.h:
* loader/cache/CachedTextTrack.cpp:
(WebCore::CachedTextTrack::CachedTextTrack):
* loader/cache/CachedTextTrack.h:
* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
* loader/cache/CachedXSLStyleSheet.h:
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::sessionResourceMap const):
(WebCore::MemoryCache::ensureSessionResourceMap):
(WebCore::MemoryCache::resourceForRequest):
(WebCore::MemoryCache::addImageToCache):
(WebCore::MemoryCache::removeImageFromCache):
(WebCore::MemoryCache::forEachSessionResource):
(WebCore::MemoryCache::removeResourcesWithOrigins):
(WebCore::MemoryCache::originsWithCache const):
(WebCore::MemoryCache::evictResources):
* loader/cache/MemoryCache.h:
* loader/cocoa/DiskCacheMonitorCocoa.h:
(WebCore::DiskCacheMonitor::sessionID const):
* loader/cocoa/DiskCacheMonitorCocoa.mm:
(WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation):
(WebCore::DiskCacheMonitor::DiskCacheMonitor):
* page/CacheStorageProvider.h:
* page/DatabaseProvider.h:
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::enableLegacyPrivateBrowsing):
(WebCore::Page::sessionID const):
(WebCore::Page::setSessionID):
* page/Page.h:
* page/PlugInClient.h:
* page/SocketProvider.cpp:
(WebCore::SocketProvider::createSocketStreamHandle):
* page/SocketProvider.h:
* platform/CookiesStrategy.h:
* platform/WebCoreCrossThreadCopier.cpp:
(WTF::PAL::SessionID>::copy):
(WTF::WebCore::SessionID>::copy): Deleted.
* platform/WebCoreCrossThreadCopier.h:
* platform/network/CacheValidation.cpp:
(WebCore::headerValueForVary):
(WebCore::collectVaryingRequestHeaders):
(WebCore::verifyVaryingRequestHeaders):
* platform/network/CacheValidation.h:
* platform/network/NetworkStorageSession.cpp:
(WebCore::NetworkStorageSession::globalSessionMap):
(WebCore::NetworkStorageSession::storageSession):
(WebCore::NetworkStorageSession::destroySession):
* platform/network/NetworkStorageSession.h:
(WebCore::NetworkStorageSession::sessionID const):
* platform/network/NetworkStorageSessionStub.cpp:
(WebCore::NetworkStorageSession::NetworkStorageSession):
(WebCore::NetworkStorageSession::ensurePrivateBrowsingSession):
(WebCore::NetworkStorageSession::ensureSession):
(WebCore::NetworkStorageSession::defaultStorageSession):
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::NetworkStorageSession):
(WebCore::NetworkStorageSession::switchToNewTestingSession):
(WebCore::NetworkStorageSession::defaultStorageSession):
(WebCore::NetworkStorageSession::ensurePrivateBrowsingSession):
(WebCore::NetworkStorageSession::ensureSession):
* platform/network/cf/SocketStreamHandleImpl.h:
(WebCore::SocketStreamHandleImpl::create):
* platform/network/cf/SocketStreamHandleImplCFNet.cpp:
(WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl):
* platform/network/curl/SocketStreamHandleImpl.h:
(WebCore::SocketStreamHandleImpl::create):
* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::NetworkStorageSession):
(WebCore::NetworkStorageSession::defaultStorageSession):
(WebCore::NetworkStorageSession::ensurePrivateBrowsingSession):
(WebCore::NetworkStorageSession::ensureSession):
(WebCore::NetworkStorageSession::switchToNewTestingSession):
* platform/network/soup/SocketStreamHandleImpl.h:
* platform/network/soup/SocketStreamHandleImplSoup.cpp:
(WebCore::SocketStreamHandleImpl::create):
* workers/DedicatedWorkerGlobalScope.cpp:
(WebCore::DedicatedWorkerGlobalScope::create):
(WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
* workers/DedicatedWorkerGlobalScope.h:
* workers/DedicatedWorkerThread.cpp:
(WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
(WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
* workers/DedicatedWorkerThread.h:
* workers/Worker.cpp:
(WebCore::Worker::notifyFinished):
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::WorkerGlobalScope):
* workers/WorkerGlobalScope.h:
* workers/WorkerGlobalScopeProxy.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
* workers/WorkerMessagingProxy.h:
* workers/WorkerThread.cpp:
(WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
(WebCore::WorkerThread::WorkerThread):
* workers/WorkerThread.h:
* workers/service/ServiceWorkerContainer.h:
* workers/service/ServiceWorkerRegistrationParameters.h:

Source/WebCore/PAL:

* PAL.xcodeproj/project.pbxproj:
* pal/CMakeLists.txt:
* pal/identifier/SessionID.cpp: Renamed from Source/WebCore/page/SessionID.cpp.
* pal/identifier/SessionID.h: Renamed from Source/WebCore/page/SessionID.h.
(WTF::SessionIDHash::hash):
(WTF::SessionIDHash::equal):
(WTF::HashTraits<PAL::SessionID>::emptyValue):
(WTF::HashTraits<PAL::SessionID>::constructDeletedValue):
(WTF::HashTraits<PAL::SessionID>::isDeletedValue):

Source/WebKit:

* NetworkProcess/Downloads/Download.cpp:
(WebKit::Download::Download):
* NetworkProcess/Downloads/Download.h:
(WebKit::Download::Download):
* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::startDownload):
(WebKit::DownloadManager::resumeDownload):
* NetworkProcess/Downloads/DownloadManager.h:
(WebKit::DownloadManager::startDownload):
* NetworkProcess/NetworkCORSPreflightChecker.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::createSocketStream):
(WebKit::storageSession):
(WebKit::NetworkConnectionToWebProcess::startDownload):
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
(WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
(WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
(WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
(WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
(WebKit::NetworkConnectionToWebProcess::getRawCookies):
(WebKit::NetworkConnectionToWebProcess::deleteCookie):
(WebKit::NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession):
* NetworkProcess/NetworkConnectionToWebProcess.h:
(WebKit::NetworkConnectionToWebProcess::startDownload):
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkLoad.cpp:
* NetworkProcess/NetworkLoadParameters.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::destroySession):
(WebKit::fetchDiskCacheEntries):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::downloadRequest):
(WebKit::NetworkProcess::resumeDownload):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoadParameters.h:
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::create):
(WebKit::NetworkSession::defaultSession):
(WebKit::NetworkSession::NetworkSession):
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkSession::sessionID const):
* NetworkProcess/NetworkSocketStream.cpp:
(WebKit::NetworkSocketStream::create):
(WebKit::NetworkSocketStream::NetworkSocketStream):
* NetworkProcess/NetworkSocketStream.h:
* NetworkProcess/RemoteNetworkingContext.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
(WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
* NetworkProcess/cocoa/NetworkSessionCocoa.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::configurationForSessionID):
(WebKit::NetworkSessionCocoa::create):
(WebKit::NetworkSessionCocoa::defaultSession):
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
* NetworkProcess/soup/NetworkSessionSoup.cpp:
(WebKit::NetworkSessionSoup::NetworkSessionSoup):
* NetworkProcess/soup/NetworkSessionSoup.h:
* Scripts/webkit/messages.py:
(forward_declarations_and_headers.templates): Deleted.
(class_template_headers.template): Deleted.
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::initialize):
* Shared/SessionTracker.cpp:
(WebKit::staticSessionMap):
(WebKit::SessionTracker::networkSession):
(WebKit::SessionTracker::setSession):
(WebKit::SessionTracker::destroySession):
* Shared/SessionTracker.h:
* Shared/Storage/StorageProcessCreationParameters.h:
* Shared/WebCoreArgumentCoders.cpp:
* Shared/WebCoreArgumentCoders.h:
* Shared/WebPageCreationParameters.h:
* Shared/WebProcessCreationParameters.h:
* Shared/WebsiteDataStoreParameters.h:
* Shared/mac/CookieStorageShim.mm:
(WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
* StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp:
(WebKit::WebIDBConnectionToClient::create):
(WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient):
* StorageProcess/IndexedDB/WebIDBConnectionToClient.h:
* StorageProcess/StorageProcess.cpp:
(WebKit::StorageProcess::idbServer):
(WebKit::StorageProcess::fetchWebsiteData):
(WebKit::StorageProcess::deleteWebsiteData):
(WebKit::StorageProcess::deleteWebsiteDataForOrigins):
* StorageProcess/StorageProcess.h:
* StorageProcess/StorageProcess.messages.in:
* StorageProcess/StorageToWebProcessConnection.cpp:
(WebKit::StorageToWebProcessConnection::establishIDBConnectionToServer):
* StorageProcess/StorageToWebProcessConnection.h:
* StorageProcess/StorageToWebProcessConnection.messages.in:
* UIProcess/API/APIPageConfiguration.cpp:
(API::PageConfiguration::setWebsiteDataStore):
(API::PageConfiguration::sessionID):
(API::PageConfiguration::setSessionID):
* UIProcess/API/APIPageConfiguration.h:
* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::defaultDataStore):
(API::WebsiteDataStore::createLegacy):
(API::WebsiteDataStore::WebsiteDataStore):
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/C/WKCookieManager.cpp:
(WKCookieManagerGetHostnamesWithCookies):
(WKCookieManagerDeleteCookiesForHostname):
(WKCookieManagerDeleteAllCookies):
(WKCookieManagerDeleteAllCookiesModifiedAfterDate):
(WKCookieManagerSetHTTPCookieAcceptPolicy):
(WKCookieManagerGetHTTPCookieAcceptPolicy):
(WKCookieManagerStartObservingCookieChanges):
(WKCookieManagerStopObservingCookieChanges):
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _setCookieAcceptPolicy:]):
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _initWithConfiguration:]):
* UIProcess/API/glib/WebKitCookieManager.cpp:
(webkit_cookie_manager_set_accept_policy):
(webkit_cookie_manager_get_accept_policy):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::fetchWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Plugins/PlugInAutoStartProvider.cpp:
(WebKit::PlugInAutoStartProvider::PlugInAutoStartProvider):
(WebKit::PlugInAutoStartProvider::addAutoStartOriginHash):
(WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy const):
(WebKit::PlugInAutoStartProvider::setAutoStartOriginsTableWithItemsPassingTest):
(WebKit::PlugInAutoStartProvider::didReceiveUserInteraction):
* UIProcess/Plugins/PlugInAutoStartProvider.h:
* UIProcess/Storage/StorageProcessProxy.cpp:
(WebKit::StorageProcessProxy::fetchWebsiteData):
(WebKit::StorageProcessProxy::deleteWebsiteData):
(WebKit::StorageProcessProxy::deleteWebsiteDataForOrigins):
* UIProcess/Storage/StorageProcessProxy.h:
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
(WebKit::WebCookieManagerProxy::deleteCookiesForHostname):
(WebKit::WebCookieManagerProxy::deleteAllCookies):
(WebKit::WebCookieManagerProxy::deleteCookie):
(WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
(WebKit::WebCookieManagerProxy::setCookie):
(WebKit::WebCookieManagerProxy::setCookies):
(WebKit::WebCookieManagerProxy::getAllCookies):
(WebKit::WebCookieManagerProxy::getCookies):
(WebKit::WebCookieManagerProxy::startObservingCookieChanges):
(WebKit::WebCookieManagerProxy::stopObservingCookieChanges):
(WebKit::WebCookieManagerProxy::setCookieObserverCallback):
(WebKit::WebCookieManagerProxy::registerObserver):
(WebKit::WebCookieManagerProxy::unregisterObserver):
(WebKit::WebCookieManagerProxy::cookiesDidChange):
(WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
(WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
* UIProcess/WebCookieManagerProxy.h:
* UIProcess/WebCookieManagerProxy.messages.in:
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::sessionID const):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::createWebPage):
(WebKit::WebProcessPool::pageAddedToProcess):
(WebKit::WebProcessPool::pageRemovedFromProcess):
(WebKit::WebProcessPool::download):
(WebKit::WebProcessPool::resumeDownload):
(WebKit::WebProcessPool::addPlugInAutoStartOriginHash):
(WebKit::WebProcessPool::plugInDidReceiveUserInteraction):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessPool.messages.in:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
(WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebsiteData):
(WebKit::WebProcessProxy::fetchWebsiteData):
(WebKit::WebProcessProxy::deleteWebsiteData):
(WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::createNonPersistent):
(WebKit::WebsiteDataStore::create):
(WebKit::WebsiteDataStore::WebsiteDataStore):
(WebKit::WebsiteDataStore::~WebsiteDataStore):
* UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::sessionID const):
* WebProcess/Cookies/WebCookieManager.cpp:
(WebKit::WebCookieManager::getHostnamesWithCookies):
(WebKit::WebCookieManager::deleteCookiesForHostname):
(WebKit::WebCookieManager::deleteAllCookies):
(WebKit::WebCookieManager::deleteCookie):
(WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
(WebKit::WebCookieManager::getAllCookies):
(WebKit::WebCookieManager::getCookies):
(WebKit::WebCookieManager::setCookie):
(WebKit::WebCookieManager::setCookies):
(WebKit::WebCookieManager::notifyCookiesDidChange):
(WebKit::WebCookieManager::startObservingCookieChanges):
(WebKit::WebCookieManager::stopObservingCookieChanges):
* WebProcess/Cookies/WebCookieManager.h:
* WebProcess/Cookies/WebCookieManager.messages.in:
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
(WebKit::WebIDBConnectionToServer::create):
(WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
* WebProcess/Databases/WebDatabaseProvider.cpp:
(WebKit::WebDatabaseProvider::idbConnectionToServerForSession):
* WebProcess/Databases/WebDatabaseProvider.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setPrivateBrowsingEnabled):
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::didCacheResource):
* WebProcess/Network/NetworkProcessConnection.h:
* WebProcess/Network/NetworkProcessConnection.messages.in:
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoad):
(WebKit::WebLoaderStrategy::loadResourceSynchronously):
(WebKit::WebLoaderStrategy::createPingHandle):
* WebProcess/Network/WebSocketProvider.cpp:
(WebKit::WebSocketProvider::createSocketStreamHandle):
* WebProcess/Network/WebSocketProvider.h:
* WebProcess/Network/WebSocketStream.cpp:
(WebKit::WebSocketStream::create):
(WebKit::WebSocketStream::WebSocketStream):
* WebProcess/Network/WebSocketStream.h:
* WebProcess/Storage/WebToStorageProcessConnection.cpp:
(WebKit::WebToStorageProcessConnection::idbConnectionToServerForSession):
* WebProcess/Storage/WebToStorageProcessConnection.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::convertMainResourceLoadToDownload):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebCoreSupport/WebPlugInClient.cpp:
(WebKit::WebPlugInClient::didStartFromOrigin):
* WebProcess/WebCoreSupport/WebPlugInClient.h:
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::startDownload):
(WebKit::WebFrame::convertMainResourceLoadToDownload):
* WebProcess/WebPage/WebFrame.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setSessionID):
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::sessionID const):
* WebProcess/WebProcess.cpp:
(WebKit::m_webSQLiteDatabaseTracker):
(WebKit::WebProcess::ensurePrivateBrowsingSession):
(WebKit::WebProcess::destroySession):
(WebKit::WebProcess::isPlugInAutoStartOriginHash):
(WebKit::WebProcess::plugInDidStartFromOrigin):
(WebKit::WebProcess::didAddPlugInAutoStartOriginHash):
(WebKit::WebProcess::resetPlugInAutoStartOriginDefaultHashes):
(WebKit::WebProcess::resetPlugInAutoStartOriginHashes):
(WebKit::WebProcess::plugInDidReceiveUserInteraction):
(WebKit::WebProcess::fetchWebsiteData):
(WebKit::WebProcess::deleteWebsiteData):
(WebKit::WebProcess::deleteWebsiteDataForOrigins):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

Source/WebKitLegacy:

* Storage/WebDatabaseProvider.cpp:
(WebDatabaseProvider::idbConnectionToServerForSession):
* Storage/WebDatabaseProvider.h:

Source/WebKitLegacy/mac:

* Misc/WebCache.mm:
(+[WebCache imageForURL:]):
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::convertMainResourceLoadToDownload):
* WebCoreSupport/WebFrameNetworkingContext.mm:
(WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebFrameNetworkingContext::destroyPrivateBrowsingSession):
(WebFrameNetworkingContext::storageSession const):
* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::cookieRequestHeaderFieldValue):
* WebKitPrefix.h:

Source/WebKitLegacy/win:

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::convertMainResourceLoadToDownload):
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameNetworkingContext.cpp:
(WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
(WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebFrameNetworkingContext::destroyPrivateBrowsingSession):
(WebFrameNetworkingContext::storageSession const):
* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::cookieRequestHeaderFieldValue):
* WebCoreSupport/WebPlatformStrategies.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220857 268f45cc-cd09-0410-ab3c-d52691b4dbfc

200 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/Modules/websockets/WebSocketChannel.cpp
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
Source/WebCore/PAL/pal/CMakeLists.txt
Source/WebCore/PAL/pal/identifier/SessionID.cpp [moved from Source/WebCore/page/SessionID.cpp with 98% similarity]
Source/WebCore/PAL/pal/identifier/SessionID.h [moved from Source/WebCore/page/SessionID.h with 80% similarity]
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/ScriptExecutionContext.h
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/EmptyClients.cpp
Source/WebCore/loader/FrameLoaderClient.h
Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp
Source/WebCore/loader/cache/CachedCSSStyleSheet.h
Source/WebCore/loader/cache/CachedFont.cpp
Source/WebCore/loader/cache/CachedFont.h
Source/WebCore/loader/cache/CachedImage.cpp
Source/WebCore/loader/cache/CachedImage.h
Source/WebCore/loader/cache/CachedRawResource.cpp
Source/WebCore/loader/cache/CachedRawResource.h
Source/WebCore/loader/cache/CachedResource.cpp
Source/WebCore/loader/cache/CachedResource.h
Source/WebCore/loader/cache/CachedResourceLoader.cpp
Source/WebCore/loader/cache/CachedResourceLoader.h
Source/WebCore/loader/cache/CachedSVGDocument.cpp
Source/WebCore/loader/cache/CachedSVGDocument.h
Source/WebCore/loader/cache/CachedSVGFont.cpp
Source/WebCore/loader/cache/CachedSVGFont.h
Source/WebCore/loader/cache/CachedScript.cpp
Source/WebCore/loader/cache/CachedScript.h
Source/WebCore/loader/cache/CachedTextTrack.cpp
Source/WebCore/loader/cache/CachedTextTrack.h
Source/WebCore/loader/cache/CachedXSLStyleSheet.cpp
Source/WebCore/loader/cache/CachedXSLStyleSheet.h
Source/WebCore/loader/cache/MemoryCache.cpp
Source/WebCore/loader/cache/MemoryCache.h
Source/WebCore/loader/cocoa/DiskCacheMonitorCocoa.h
Source/WebCore/loader/cocoa/DiskCacheMonitorCocoa.mm
Source/WebCore/page/CacheStorageProvider.h
Source/WebCore/page/DatabaseProvider.h
Source/WebCore/page/Page.cpp
Source/WebCore/page/Page.h
Source/WebCore/page/PlugInClient.h
Source/WebCore/page/SocketProvider.cpp
Source/WebCore/page/SocketProvider.h
Source/WebCore/platform/CookiesStrategy.h
Source/WebCore/platform/WebCoreCrossThreadCopier.cpp
Source/WebCore/platform/WebCoreCrossThreadCopier.h
Source/WebCore/platform/network/CacheValidation.cpp
Source/WebCore/platform/network/CacheValidation.h
Source/WebCore/platform/network/NetworkStorageSession.cpp
Source/WebCore/platform/network/NetworkStorageSession.h
Source/WebCore/platform/network/NetworkStorageSessionStub.cpp
Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp
Source/WebCore/platform/network/cf/SocketStreamHandleImpl.h
Source/WebCore/platform/network/cf/SocketStreamHandleImplCFNet.cpp
Source/WebCore/platform/network/curl/SocketStreamHandleImpl.h
Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp
Source/WebCore/platform/network/soup/SocketStreamHandleImpl.h
Source/WebCore/platform/network/soup/SocketStreamHandleImplSoup.cpp
Source/WebCore/workers/DedicatedWorkerGlobalScope.cpp
Source/WebCore/workers/DedicatedWorkerGlobalScope.h
Source/WebCore/workers/DedicatedWorkerThread.cpp
Source/WebCore/workers/DedicatedWorkerThread.h
Source/WebCore/workers/Worker.cpp
Source/WebCore/workers/WorkerGlobalScope.cpp
Source/WebCore/workers/WorkerGlobalScope.h
Source/WebCore/workers/WorkerGlobalScopeProxy.h
Source/WebCore/workers/WorkerMessagingProxy.cpp
Source/WebCore/workers/WorkerMessagingProxy.h
Source/WebCore/workers/WorkerThread.cpp
Source/WebCore/workers/WorkerThread.h
Source/WebCore/workers/service/ServiceWorkerContainer.h
Source/WebCore/workers/service/ServiceWorkerRegistrationParameters.h
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/Downloads/Download.cpp
Source/WebKit/NetworkProcess/Downloads/Download.h
Source/WebKit/NetworkProcess/Downloads/DownloadManager.cpp
Source/WebKit/NetworkProcess/Downloads/DownloadManager.h
Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.h
Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
Source/WebKit/NetworkProcess/NetworkLoad.cpp
Source/WebKit/NetworkProcess/NetworkLoadParameters.h
Source/WebKit/NetworkProcess/NetworkProcess.cpp
Source/WebKit/NetworkProcess/NetworkProcess.h
Source/WebKit/NetworkProcess/NetworkProcess.messages.in
Source/WebKit/NetworkProcess/NetworkResourceLoadParameters.h
Source/WebKit/NetworkProcess/NetworkResourceLoader.h
Source/WebKit/NetworkProcess/NetworkSession.cpp
Source/WebKit/NetworkProcess/NetworkSession.h
Source/WebKit/NetworkProcess/NetworkSocketStream.cpp
Source/WebKit/NetworkProcess/NetworkSocketStream.h
Source/WebKit/NetworkProcess/RemoteNetworkingContext.h
Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp
Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h
Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
Source/WebKit/NetworkProcess/soup/NetworkSessionSoup.cpp
Source/WebKit/NetworkProcess/soup/NetworkSessionSoup.h
Source/WebKit/Scripts/webkit/messages.py
Source/WebKit/Shared/ChildProcess.cpp
Source/WebKit/Shared/SessionTracker.cpp
Source/WebKit/Shared/SessionTracker.h
Source/WebKit/Shared/Storage/StorageProcessCreationParameters.h
Source/WebKit/Shared/WebCoreArgumentCoders.cpp
Source/WebKit/Shared/WebCoreArgumentCoders.h
Source/WebKit/Shared/WebPageCreationParameters.h
Source/WebKit/Shared/WebProcessCreationParameters.h
Source/WebKit/Shared/WebsiteDataStoreParameters.h
Source/WebKit/Shared/mac/CookieStorageShim.mm
Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp
Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.h
Source/WebKit/StorageProcess/StorageProcess.cpp
Source/WebKit/StorageProcess/StorageProcess.h
Source/WebKit/StorageProcess/StorageProcess.messages.in
Source/WebKit/StorageProcess/StorageToWebProcessConnection.cpp
Source/WebKit/StorageProcess/StorageToWebProcessConnection.h
Source/WebKit/StorageProcess/StorageToWebProcessConnection.messages.in
Source/WebKit/UIProcess/API/APIPageConfiguration.cpp
Source/WebKit/UIProcess/API/APIPageConfiguration.h
Source/WebKit/UIProcess/API/APIWebsiteDataStore.cpp
Source/WebKit/UIProcess/API/APIWebsiteDataStore.h
Source/WebKit/UIProcess/API/C/WKCookieManager.cpp
Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm
Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
Source/WebKit/UIProcess/API/glib/WebKitCookieManager.cpp
Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp
Source/WebKit/UIProcess/Network/NetworkProcessProxy.h
Source/WebKit/UIProcess/Plugins/PlugInAutoStartProvider.cpp
Source/WebKit/UIProcess/Plugins/PlugInAutoStartProvider.h
Source/WebKit/UIProcess/Storage/StorageProcessProxy.cpp
Source/WebKit/UIProcess/Storage/StorageProcessProxy.h
Source/WebKit/UIProcess/WebCookieManagerProxy.cpp
Source/WebKit/UIProcess/WebCookieManagerProxy.h
Source/WebKit/UIProcess/WebCookieManagerProxy.messages.in
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/UIProcess/WebProcessPool.cpp
Source/WebKit/UIProcess/WebProcessPool.h
Source/WebKit/UIProcess/WebProcessPool.messages.in
Source/WebKit/UIProcess/WebProcessProxy.cpp
Source/WebKit/UIProcess/WebProcessProxy.h
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
Source/WebKit/WebProcess/Cookies/WebCookieManager.cpp
Source/WebKit/WebProcess/Cookies/WebCookieManager.h
Source/WebKit/WebProcess/Cookies/WebCookieManager.messages.in
Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp
Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h
Source/WebKit/WebProcess/Databases/WebDatabaseProvider.cpp
Source/WebKit/WebProcess/Databases/WebDatabaseProvider.h
Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp
Source/WebKit/WebProcess/Network/NetworkProcessConnection.h
Source/WebKit/WebProcess/Network/NetworkProcessConnection.messages.in
Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
Source/WebKit/WebProcess/Network/WebSocketProvider.cpp
Source/WebKit/WebProcess/Network/WebSocketProvider.h
Source/WebKit/WebProcess/Network/WebSocketStream.cpp
Source/WebKit/WebProcess/Network/WebSocketStream.h
Source/WebKit/WebProcess/Storage/WebToStorageProcessConnection.cpp
Source/WebKit/WebProcess/Storage/WebToStorageProcessConnection.h
Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.h
Source/WebKit/WebProcess/WebCoreSupport/WebPlugInClient.cpp
Source/WebKit/WebProcess/WebCoreSupport/WebPlugInClient.h
Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h
Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
Source/WebKit/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
Source/WebKit/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h
Source/WebKit/WebProcess/WebPage/WebFrame.cpp
Source/WebKit/WebProcess/WebPage/WebFrame.h
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKit/WebProcess/WebProcess.cpp
Source/WebKit/WebProcess/WebProcess.h
Source/WebKit/WebProcess/WebProcess.messages.in
Source/WebKitLegacy/ChangeLog
Source/WebKitLegacy/Storage/WebDatabaseProvider.cpp
Source/WebKitLegacy/Storage/WebDatabaseProvider.h
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Misc/WebCache.mm
Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm
Source/WebKitLegacy/mac/WebCoreSupport/WebFrameNetworkingContext.mm
Source/WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.h
Source/WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.mm
Source/WebKitLegacy/mac/WebKitPrefix.h
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKitLegacy/win/WebCoreSupport/WebFrameNetworkingContext.cpp
Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.h

index 5bc9520..35b0b55 100644 (file)
@@ -2158,7 +2158,6 @@ set(WebCore_SOURCES
     page/SecurityOrigin.cpp
     page/SecurityOriginData.cpp
     page/SecurityPolicy.cpp
-    page/SessionID.cpp
     page/Settings.cpp
     page/SocketProvider.cpp
     page/SpatialNavigation.cpp
index 80c465d..c7c9445 100644 (file)
@@ -1,3 +1,212 @@
+2017-08-17  Don Olmstead  <don.olmstead@sony.com>
+
+        [PAL] Move SessionID into PAL
+        https://bugs.webkit.org/show_bug.cgi?id=174192
+
+        Reviewed by Antti Koivisto.
+
+        No new tests. No change in behavior.
+
+        * CMakeLists.txt:
+        * Modules/websockets/WebSocketChannel.cpp:
+        (WebCore::WebSocketChannel::connect):
+        * WebCore.xcodeproj/project.pbxproj:
+        * dom/Document.cpp:
+        (WebCore::Document::sessionID const):
+        * dom/Document.h:
+        * dom/ScriptExecutionContext.h:
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::elementWithID):
+        (WebCore::HTMLMediaElement::finishParsingChildren):
+        (WebCore::HTMLMediaElement::scheduleEvent):
+        (WebCore::HTMLMediaElement::canPlayType const):
+        (WebCore::HTMLMediaElement::load):
+        (WebCore::HTMLMediaElement::loadResource):
+        (WebCore::HTMLMediaElement::textTracksAreReady const):
+        (WebCore::HTMLMediaElement::textTrackModeChanged):
+        (WebCore::HTMLMediaElement::noneSupported):
+        (WebCore::HTMLMediaElement::mediaLoadingFailedFatally):
+        (WebCore::HTMLMediaElement::mediaLoadingFailed):
+        (WebCore::HTMLMediaElement::setReadyState):
+        (WebCore::HTMLMediaElement::addPlayedRange):
+        (WebCore::HTMLMediaElement::seekTask):
+        (WebCore::HTMLMediaElement::refreshCachedTime const):
+        (WebCore::HTMLMediaElement::currentMediaTime const):
+        (WebCore::HTMLMediaElement::setWebkitPreservesPitch):
+        (WebCore::HTMLMediaElement::ended const):
+        (WebCore::HTMLMediaElement::playInternal):
+        (WebCore::HTMLMediaElement::pause):
+        (WebCore::HTMLMediaElement::togglePlayState):
+        (WebCore::HTMLMediaElement::beginScrubbing):
+        (WebCore::HTMLMediaElement::playbackProgressTimerFired):
+        (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack):
+        (WebCore::HTMLMediaElement::didAddTextTrack):
+        (WebCore::HTMLMediaElement::didRemoveTextTrack):
+        (WebCore::controllerJSValue):
+        (WebCore::HTMLMediaElement::configureTextTracks):
+        (WebCore::HTMLMediaElement::selectNextSourceChild):
+        (WebCore::HTMLMediaElement::sourceWasAdded):
+        (WebCore::HTMLMediaElement::sourceWasRemoved):
+        (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
+        (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):
+        (WebCore::HTMLMediaElement::potentiallyPlaying const):
+        (WebCore::HTMLMediaElement::endedPlayback const):
+        (WebCore::HTMLMediaElement::stoppedDueToErrors const):
+        (WebCore::HTMLMediaElement::updatePlayState):
+        (WebCore::HTMLMediaElement::userCancelledLoad):
+        (WebCore::HTMLMediaElement::canSuspendForDocumentSuspension const):
+        (WebCore::HTMLMediaElement::addEventListener):
+        (WebCore::HTMLMediaElement::isFullscreen const):
+        (WebCore::HTMLMediaElement::toggleStandardFullscreenState):
+        (WebCore::HTMLMediaElement::waitForPreparedForInlineThen):
+        (WebCore::HTMLMediaElement::setVideoFullscreenLayer):
+        (WebCore::HTMLMediaElement::updateTextTrackDisplay):
+        (WebCore::HTMLMediaElement::mediaControls const):
+        (WebCore::HTMLMediaElement::configureTextTrackDisplay):
+        (WebCore::HTMLMediaElement::setMediaGroup):
+        (WebCore::HTMLMediaElement::setControllerForBindings):
+        (WebCore::HTMLMediaElement::isBlockedOnMediaController const):
+        (WebCore::HTMLMediaElement::prepareMediaFragmentURI):
+        (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
+        (WebCore::HTMLMediaElement::fileSize const):
+        (WebCore::HTMLMediaElement::mediaSessionTitle const):
+        (WebCore::needsSeekingSupportQuirk):
+        (WebCore::HTMLMediaElement::supportsSeeking const):
+        (WebCore::HTMLMediaElement::doesHaveAttribute const):
+        (WebCore::HTMLMediaElement::isVideoTooSmallForInlinePlayback):
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::continueAfterContentPolicy):
+        * loader/EmptyClients.cpp:
+        * loader/FrameLoaderClient.h:
+        * loader/cache/CachedCSSStyleSheet.cpp:
+        (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
+        * loader/cache/CachedCSSStyleSheet.h:
+        * loader/cache/CachedFont.cpp:
+        (WebCore::CachedFont::CachedFont):
+        * loader/cache/CachedFont.h:
+        * loader/cache/CachedImage.cpp:
+        (WebCore::CachedImage::CachedImage):
+        * loader/cache/CachedImage.h:
+        * loader/cache/CachedRawResource.cpp:
+        (WebCore::CachedRawResource::CachedRawResource):
+        * loader/cache/CachedRawResource.h:
+        * loader/cache/CachedResource.cpp:
+        (WebCore::CachedResource::CachedResource):
+        * loader/cache/CachedResource.h:
+        (WebCore::CachedResource::sessionID const):
+        * loader/cache/CachedResourceLoader.cpp:
+        (WebCore::createResource):
+        (WebCore::CachedResourceLoader::sessionID const):
+        * loader/cache/CachedResourceLoader.h:
+        * loader/cache/CachedSVGDocument.cpp:
+        (WebCore::CachedSVGDocument::CachedSVGDocument):
+        * loader/cache/CachedSVGDocument.h:
+        * loader/cache/CachedSVGFont.cpp:
+        (WebCore::CachedSVGFont::CachedSVGFont):
+        * loader/cache/CachedSVGFont.h:
+        * loader/cache/CachedScript.cpp:
+        (WebCore::CachedScript::CachedScript):
+        * loader/cache/CachedScript.h:
+        * loader/cache/CachedTextTrack.cpp:
+        (WebCore::CachedTextTrack::CachedTextTrack):
+        * loader/cache/CachedTextTrack.h:
+        * loader/cache/CachedXSLStyleSheet.cpp:
+        (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
+        * loader/cache/CachedXSLStyleSheet.h:
+        * loader/cache/MemoryCache.cpp:
+        (WebCore::MemoryCache::sessionResourceMap const):
+        (WebCore::MemoryCache::ensureSessionResourceMap):
+        (WebCore::MemoryCache::resourceForRequest):
+        (WebCore::MemoryCache::addImageToCache):
+        (WebCore::MemoryCache::removeImageFromCache):
+        (WebCore::MemoryCache::forEachSessionResource):
+        (WebCore::MemoryCache::removeResourcesWithOrigins):
+        (WebCore::MemoryCache::originsWithCache const):
+        (WebCore::MemoryCache::evictResources):
+        * loader/cache/MemoryCache.h:
+        * loader/cocoa/DiskCacheMonitorCocoa.h:
+        (WebCore::DiskCacheMonitor::sessionID const):
+        * loader/cocoa/DiskCacheMonitorCocoa.mm:
+        (WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation):
+        (WebCore::DiskCacheMonitor::DiskCacheMonitor):
+        * page/CacheStorageProvider.h:
+        * page/DatabaseProvider.h:
+        * page/Page.cpp:
+        (WebCore::Page::Page):
+        (WebCore::Page::enableLegacyPrivateBrowsing):
+        (WebCore::Page::sessionID const):
+        (WebCore::Page::setSessionID):
+        * page/Page.h:
+        * page/PlugInClient.h:
+        * page/SocketProvider.cpp:
+        (WebCore::SocketProvider::createSocketStreamHandle):
+        * page/SocketProvider.h:
+        * platform/CookiesStrategy.h:
+        * platform/WebCoreCrossThreadCopier.cpp:
+        (WTF::PAL::SessionID>::copy):
+        (WTF::WebCore::SessionID>::copy): Deleted.
+        * platform/WebCoreCrossThreadCopier.h:
+        * platform/network/CacheValidation.cpp:
+        (WebCore::headerValueForVary):
+        (WebCore::collectVaryingRequestHeaders):
+        (WebCore::verifyVaryingRequestHeaders):
+        * platform/network/CacheValidation.h:
+        * platform/network/NetworkStorageSession.cpp:
+        (WebCore::NetworkStorageSession::globalSessionMap):
+        (WebCore::NetworkStorageSession::storageSession):
+        (WebCore::NetworkStorageSession::destroySession):
+        * platform/network/NetworkStorageSession.h:
+        (WebCore::NetworkStorageSession::sessionID const):
+        * platform/network/NetworkStorageSessionStub.cpp:
+        (WebCore::NetworkStorageSession::NetworkStorageSession):
+        (WebCore::NetworkStorageSession::ensurePrivateBrowsingSession):
+        (WebCore::NetworkStorageSession::ensureSession):
+        (WebCore::NetworkStorageSession::defaultStorageSession):
+        * platform/network/cf/NetworkStorageSessionCFNet.cpp:
+        (WebCore::NetworkStorageSession::NetworkStorageSession):
+        (WebCore::NetworkStorageSession::switchToNewTestingSession):
+        (WebCore::NetworkStorageSession::defaultStorageSession):
+        (WebCore::NetworkStorageSession::ensurePrivateBrowsingSession):
+        (WebCore::NetworkStorageSession::ensureSession):
+        * platform/network/cf/SocketStreamHandleImpl.h:
+        (WebCore::SocketStreamHandleImpl::create):
+        * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
+        (WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl):
+        * platform/network/curl/SocketStreamHandleImpl.h:
+        (WebCore::SocketStreamHandleImpl::create):
+        * platform/network/soup/NetworkStorageSessionSoup.cpp:
+        (WebCore::NetworkStorageSession::NetworkStorageSession):
+        (WebCore::NetworkStorageSession::defaultStorageSession):
+        (WebCore::NetworkStorageSession::ensurePrivateBrowsingSession):
+        (WebCore::NetworkStorageSession::ensureSession):
+        (WebCore::NetworkStorageSession::switchToNewTestingSession):
+        * platform/network/soup/SocketStreamHandleImpl.h:
+        * platform/network/soup/SocketStreamHandleImplSoup.cpp:
+        (WebCore::SocketStreamHandleImpl::create):
+        * workers/DedicatedWorkerGlobalScope.cpp:
+        (WebCore::DedicatedWorkerGlobalScope::create):
+        (WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
+        * workers/DedicatedWorkerGlobalScope.h:
+        * workers/DedicatedWorkerThread.cpp:
+        (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
+        (WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
+        * workers/DedicatedWorkerThread.h:
+        * workers/Worker.cpp:
+        (WebCore::Worker::notifyFinished):
+        * workers/WorkerGlobalScope.cpp:
+        (WebCore::WorkerGlobalScope::WorkerGlobalScope):
+        * workers/WorkerGlobalScope.h:
+        * workers/WorkerGlobalScopeProxy.h:
+        * workers/WorkerMessagingProxy.cpp:
+        (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
+        * workers/WorkerMessagingProxy.h:
+        * workers/WorkerThread.cpp:
+        (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
+        (WebCore::WorkerThread::WorkerThread):
+        * workers/WorkerThread.h:
+        * workers/service/ServiceWorkerContainer.h:
+        * workers/service/ServiceWorkerRegistrationParameters.h:
+
 2017-08-17  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK][WPE] Add NTLM authentication enabled API
index f121e25..7b51ec3 100644 (file)
@@ -120,7 +120,7 @@ void WebSocketChannel::connect(const URL& requestedURL, const String& protocol)
     if (Frame* frame = m_document->frame()) {
         ref();
         Page* page = frame->page();
-        SessionID sessionID = page ? page->sessionID() : SessionID::defaultSessionID();
+        PAL::SessionID sessionID = page ? page->sessionID() : PAL::SessionID::defaultSessionID();
         String partition = m_document->topDocument().securityOrigin().domainForCachePartition();
         m_handle = m_socketProvider->createSocketStreamHandle(m_handshake->url(), *this, sessionID, partition);
     }
index 666fa64..aa8272b 100644 (file)
@@ -1,3 +1,20 @@
+2017-08-17  Don Olmstead  <don.olmstead@sony.com>
+
+        [PAL] Move SessionID into PAL
+        https://bugs.webkit.org/show_bug.cgi?id=174192
+
+        Reviewed by Antti Koivisto.
+
+        * PAL.xcodeproj/project.pbxproj:
+        * pal/CMakeLists.txt:
+        * pal/identifier/SessionID.cpp: Renamed from Source/WebCore/page/SessionID.cpp.
+        * pal/identifier/SessionID.h: Renamed from Source/WebCore/page/SessionID.h.
+        (WTF::SessionIDHash::hash):
+        (WTF::SessionIDHash::equal):
+        (WTF::HashTraits<PAL::SessionID>::emptyValue):
+        (WTF::HashTraits<PAL::SessionID>::constructDeletedValue):
+        (WTF::HashTraits<PAL::SessionID>::isDeletedValue):
+
 2017-08-16  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
 
         [PAL] Move spi/ios and spi/win directories into PAL
index 886b770..b5b1a9b 100644 (file)
@@ -74,6 +74,8 @@
                A30D41211F0DD0EA00B71954 /* KillRing.h in Headers */ = {isa = PBXBuildFile; fileRef = A30D411E1F0DD0EA00B71954 /* KillRing.h */; };
                A30D41221F0DD0EA00B71954 /* KillRingNone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A30D411F1F0DD0EA00B71954 /* KillRingNone.cpp */; };
                A30D41251F0DD12D00B71954 /* KillRingMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = A30D41241F0DD12D00B71954 /* KillRingMac.mm */; };
+               A315882E1F44F805006DB16D /* SessionID.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A315882C1F44F805006DB16D /* SessionID.cpp */; };
+               A315882F1F44F805006DB16D /* SessionID.h in Headers */ = {isa = PBXBuildFile; fileRef = A315882D1F44F805006DB16D /* SessionID.h */; };
                A3788E981F05B6CE00679425 /* Sound.h in Headers */ = {isa = PBXBuildFile; fileRef = A3788E971F05B6CE00679425 /* Sound.h */; };
                A3788E9C1F05B78200679425 /* SoundNone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A3788E9B1F05B78200679425 /* SoundNone.cpp */; };
                A3788E9E1F05B78E00679425 /* SoundMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = A3788E9D1F05B78E00679425 /* SoundMac.mm */; };
                A30D411E1F0DD0EA00B71954 /* KillRing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KillRing.h; path = text/KillRing.h; sourceTree = "<group>"; };
                A30D411F1F0DD0EA00B71954 /* KillRingNone.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KillRingNone.cpp; path = text/KillRingNone.cpp; sourceTree = "<group>"; };
                A30D41241F0DD12D00B71954 /* KillRingMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = KillRingMac.mm; path = text/mac/KillRingMac.mm; sourceTree = "<group>"; };
+               A315882C1F44F805006DB16D /* SessionID.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SessionID.cpp; path = identifier/SessionID.cpp; sourceTree = "<group>"; };
+               A315882D1F44F805006DB16D /* SessionID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SessionID.h; path = identifier/SessionID.h; sourceTree = "<group>"; };
                A3788E971F05B6CE00679425 /* Sound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Sound.h; path = system/Sound.h; sourceTree = "<group>"; };
                A3788E9B1F05B78200679425 /* SoundNone.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SoundNone.cpp; path = system/SoundNone.cpp; sourceTree = "<group>"; };
                A3788E9D1F05B78E00679425 /* SoundMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SoundMac.mm; path = system/mac/SoundMac.mm; sourceTree = "<group>"; };
                        isa = PBXGroup;
                        children = (
                                1C09D0511E31C41200725F18 /* crypto */,
+                               A315882B1F44F7F0006DB16D /* identifier */,
                                0C2DA0651F33CA3300DBC317 /* spi */,
                                A3788E9F1F05B7CE00679425 /* system */,
                                A30D411D1F0DD0AC00B71954 /* text */,
                        name = mac;
                        sourceTree = "<group>";
                };
+               A315882B1F44F7F0006DB16D /* identifier */ = {
+                       isa = PBXGroup;
+                       children = (
+                               A315882C1F44F805006DB16D /* SessionID.cpp */,
+                               A315882D1F44F805006DB16D /* SessionID.h */,
+                       );
+                       name = identifier;
+                       sourceTree = "<group>";
+               };
                A3788E9F1F05B7CE00679425 /* system */ = {
                        isa = PBXGroup;
                        children = (
                                0C2DA1571F3BEB4900DBC317 /* QuartzCoreSPI.h in Headers */,
                                0C5AF9201F43A4C7002EAC02 /* QuickLookSPI.h in Headers */,
                                0C2DA1581F3BEB4900DBC317 /* ServersSPI.h in Headers */,
+                               A315882F1F44F805006DB16D /* SessionID.h in Headers */,
                                A3AB6E561F3D1DDB009C14B1 /* SleepDisabler.h in Headers */,
                                A3AB6E611F3D1E39009C14B1 /* SleepDisablerCocoa.h in Headers */,
                                A3788E981F05B6CE00679425 /* Sound.h in Headers */,
                                1C09D0561E31C46500725F18 /* CryptoDigestCommonCrypto.cpp in Sources */,
                                A30D41251F0DD12D00B71954 /* KillRingMac.mm in Sources */,
                                A30D41221F0DD0EA00B71954 /* KillRingNone.cpp in Sources */,
+                               A315882E1F44F805006DB16D /* SessionID.cpp in Sources */,
                                A3AB6E521F3D1DC5009C14B1 /* SleepDisabler.cpp in Sources */,
                                A3AB6E601F3D1E39009C14B1 /* SleepDisablerCocoa.cpp in Sources */,
                                A3788E9E1F05B78E00679425 /* SoundMac.mm in Sources */,
index 6143e94..e9b05c2 100644 (file)
@@ -1,4 +1,5 @@
 set(PAL_SOURCES
+    identifier/SessionID.cpp
     system/SleepDisabler.cpp
     system/SystemSleepListener.cpp
 )
@@ -10,6 +11,7 @@ set(PAL_INCLUDE_DIRECTORIES
 set(PAL_PRIVATE_INCLUDE_DIRECTORIES
     "${PAL_DIR}/pal"
     "${PAL_DIR}/pal/crypto"
+    "${PAL_DIR}/pal/identifier"
     "${PAL_DIR}/pal/system"
     "${PAL_DIR}/pal/text"
 )
similarity index 98%
rename from Source/WebCore/page/SessionID.cpp
rename to Source/WebCore/PAL/pal/identifier/SessionID.cpp
index 2e15950..c4235e4 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <wtf/MainThread.h>
 
-namespace WebCore {
+namespace PAL {
 
 static uint64_t currentPersistentID = SessionID::DefaultSessionID;
 static uint64_t currentEphemeralID = SessionID::LegacyPrivateSessionID;
@@ -60,4 +60,4 @@ SessionID SessionID::isolatedCopy() const
     return SessionID { m_sessionID };
 }
 
-} // namespace WebCore
+} // namespace PAL
similarity index 80%
rename from Source/WebCore/page/SessionID.h
rename to Source/WebCore/PAL/pal/identifier/SessionID.h
index 378f689..def497e 100644 (file)
@@ -28,7 +28,7 @@
 #include <wtf/HashFunctions.h>
 #include <wtf/HashTraits.h>
 
-namespace WebCore {
+namespace PAL {
 
 class SessionID {
 public:
@@ -53,9 +53,9 @@ public:
     bool isValid() const { return m_sessionID != HashTableEmptyValueID && m_sessionID != HashTableDeletedValueID; }
     bool isEphemeral() const { return m_sessionID & EphemeralSessionMask && m_sessionID != HashTableDeletedValueID; }
 
-    WEBCORE_EXPORT static SessionID generateEphemeralSessionID();
-    WEBCORE_EXPORT static SessionID generatePersistentSessionID();
-    WEBCORE_EXPORT static void enableGenerationProtection();
+    PAL_EXPORT static SessionID generateEphemeralSessionID();
+    PAL_EXPORT static SessionID generatePersistentSessionID();
+    PAL_EXPORT static void enableGenerationProtection();
 
     uint64_t sessionID() const { return m_sessionID; }
     bool operator==(SessionID sessionID) const { return m_sessionID == sessionID.m_sessionID; }
@@ -93,22 +93,22 @@ bool SessionID::decode(Decoder& decoder, SessionID& sessionID)
     return true;
 }
 
-} // namespace WebCore
+} // namespace PAL
 
 namespace WTF {
 
 struct SessionIDHash {
-    static unsigned hash(const WebCore::SessionID& p) { return intHash(p.sessionID()); }
-    static bool equal(const WebCore::SessionID& a, const WebCore::SessionID& b) { return a == b; }
+    static unsigned hash(const PAL::SessionID& p) { return intHash(p.sessionID()); }
+    static bool equal(const PAL::SessionID& a, const PAL::SessionID& b) { return a == b; }
     static const bool safeToCompareToEmptyOrDeleted = true;
 };
-template<> struct HashTraits<WebCore::SessionID> : GenericHashTraits<WebCore::SessionID> {
-    static WebCore::SessionID emptyValue() { return WebCore::SessionID::emptySessionID(); }
+template<> struct HashTraits<PAL::SessionID> : GenericHashTraits<PAL::SessionID> {
+    static PAL::SessionID emptyValue() { return PAL::SessionID::emptySessionID(); }
 
-    static void constructDeletedValue(WebCore::SessionID& slot) { slot = WebCore::SessionID::hashTableDeletedValue(); }
-    static bool isDeletedValue(const WebCore::SessionID& slot) { return slot == WebCore::SessionID::hashTableDeletedValue(); }
+    static void constructDeletedValue(PAL::SessionID& slot) { slot = PAL::SessionID::hashTableDeletedValue(); }
+    static bool isDeletedValue(const PAL::SessionID& slot) { return slot == PAL::SessionID::hashTableDeletedValue(); }
 };
-template<> struct DefaultHash<WebCore::SessionID> {
+template<> struct DefaultHash<PAL::SessionID> {
     typedef SessionIDHash Hash;
 };
 
index 853375a..8503e30 100644 (file)
                511EF2CA17F0FD3500E4FA16 /* JSIDBTransaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 511EF2B417F0FC4800E4FA16 /* JSIDBTransaction.cpp */; };
                511EF2CB17F0FD3500E4FA16 /* JSIDBVersionChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 269239911505E1AA009E57FC /* JSIDBVersionChangeEvent.cpp */; };
                511EF2D117F0FDF100E4FA16 /* JSIDBObjectStoreCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 511EF2CE17F0FDF100E4FA16 /* JSIDBObjectStoreCustom.cpp */; };
-               511F7D441EB1C39100E47B83 /* SessionID.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 511F7D431EB1C38900E47B83 /* SessionID.cpp */; };
                5120BBAE1F1CE8CE00EFEBF1 /* CookieStorageObserver.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5120BBAC1F1CE77000EFEBF1 /* CookieStorageObserver.mm */; };
                5120BBAF1F1CECE700EFEBF1 /* CookieStorageObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = 5120BBAD1F1CE77000EFEBF1 /* CookieStorageObserver.h */; settings = {ATTRIBUTES = (Private, ); }; };
                512BDB4A1C456FF5006494DF /* SQLiteIDBBackingStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 512BDB481C456FAB006494DF /* SQLiteIDBBackingStore.cpp */; };
                754133AA102E00F400075D00 /* InspectorTimelineAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 754133A9102E00F400075D00 /* InspectorTimelineAgent.cpp */; };
                7553CFE8108F473F00EA281E /* TimelineRecordFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */; };
                7553CFE9108F473F00EA281E /* TimelineRecordFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7553CFE7108F473F00EA281E /* TimelineRecordFactory.cpp */; };
-               756B2CE118B7101600FECFAA /* SessionID.h in Headers */ = {isa = PBXBuildFile; fileRef = 756B2CE018B7101600FECFAA /* SessionID.h */; settings = {ATTRIBUTES = (Private, ); }; };
                75793E830D0CE0B3007FC0AC /* MessageEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75793E800D0CE0B3007FC0AC /* MessageEvent.cpp */; };
                75793E840D0CE0B3007FC0AC /* MessageEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 75793E810D0CE0B3007FC0AC /* MessageEvent.h */; };
                75793EC80D0CE72D007FC0AC /* JSMessageEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75793EC60D0CE72D007FC0AC /* JSMessageEvent.cpp */; };
                511EF2B317F0FC4800E4FA16 /* JSIDBRequest.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSIDBRequest.cpp; sourceTree = "<group>"; };
                511EF2B417F0FC4800E4FA16 /* JSIDBTransaction.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSIDBTransaction.cpp; sourceTree = "<group>"; };
                511EF2CE17F0FDF100E4FA16 /* JSIDBObjectStoreCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSIDBObjectStoreCustom.cpp; sourceTree = "<group>"; };
-               511F7D431EB1C38900E47B83 /* SessionID.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SessionID.cpp; sourceTree = "<group>"; };
                511FAEA91BDC989A00B4AFE4 /* ThreadSafeDataBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadSafeDataBuffer.h; sourceTree = "<group>"; };
                5120BBAC1F1CE77000EFEBF1 /* CookieStorageObserver.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CookieStorageObserver.mm; sourceTree = "<group>"; };
                5120BBAD1F1CE77000EFEBF1 /* CookieStorageObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CookieStorageObserver.h; sourceTree = "<group>"; };
                754133A9102E00F400075D00 /* InspectorTimelineAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorTimelineAgent.cpp; sourceTree = "<group>"; };
                7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimelineRecordFactory.h; sourceTree = "<group>"; };
                7553CFE7108F473F00EA281E /* TimelineRecordFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TimelineRecordFactory.cpp; sourceTree = "<group>"; };
-               756B2CE018B7101600FECFAA /* SessionID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionID.h; sourceTree = "<group>"; };
                75793E800D0CE0B3007FC0AC /* MessageEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MessageEvent.cpp; sourceTree = "<group>"; };
                75793E810D0CE0B3007FC0AC /* MessageEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MessageEvent.h; sourceTree = "<group>"; };
                75793E820D0CE0B3007FC0AC /* MessageEvent.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = MessageEvent.idl; sourceTree = "<group>"; };
                                BCD0E0F90E972C3500265DEA /* SecurityOriginHash.h */,
                                974D2DA2146A535D00D51F8B /* SecurityPolicy.cpp */,
                                974D2DA3146A535D00D51F8B /* SecurityPolicy.h */,
-                               511F7D431EB1C38900E47B83 /* SessionID.cpp */,
-                               756B2CE018B7101600FECFAA /* SessionID.h */,
                                14C9A5E90B3D105F005A0232 /* Settings.cpp */,
                                F587863A02DE3A1401EA4122 /* Settings.h */,
                                BC59DEF8169DEDC30016AC34 /* Settings.in */,
                                51F175691F3EBC8300C74950 /* ServiceWorkerRegistrationOptions.h in Headers */,
                                51F1756B1F3EBC8300C74950 /* ServiceWorkerRegistrationParameters.h in Headers */,
                                51F1756C1F3EBC8300C74950 /* ServiceWorkerUpdateViaCache.h in Headers */,
-                               756B2CE118B7101600FECFAA /* SessionID.h in Headers */,
                                93309E10099E64920056E581 /* SetNodeAttributeCommand.h in Headers */,
                                B8DBDB4C130B0F8A00F5CDB1 /* SetSelectionCommand.h in Headers */,
                                93F1994F08245E59001E9ABC /* Settings.h in Headers */,
                                51F175651F3EBC8300C74950 /* ServiceWorkerProvider.cpp in Sources */,
                                51F175671F3EBC8300C74950 /* ServiceWorkerRegistration.cpp in Sources */,
                                51F1756A1F3EBC8300C74950 /* ServiceWorkerRegistrationParameters.cpp in Sources */,
-                               511F7D441EB1C39100E47B83 /* SessionID.cpp in Sources */,
                                93309E0F099E64920056E581 /* SetNodeAttributeCommand.cpp in Sources */,
                                B8DBDB4B130B0F8A00F5CDB1 /* SetSelectionCommand.cpp in Sources */,
                                14C9A5EA0B3D105F005A0232 /* Settings.cpp in Sources */,
index fa708ce..f72fee7 100644 (file)
@@ -4671,7 +4671,7 @@ URL Document::completeURL(const String& url) const
     return completeURL(url, m_baseURL);
 }
 
-SessionID Document::sessionID() const
+PAL::SessionID Document::sessionID() const
 {
     if (m_sessionID.isValid())
         return m_sessionID;
index cfb7205..f362069 100644 (file)
@@ -45,7 +45,6 @@
 #include "Region.h"
 #include "RenderPtr.h"
 #include "ScriptExecutionContext.h"
-#include "SessionID.h"
 #include "StringWithDirection.h"
 #include "Supplementable.h"
 #include "TextResourceDecoder.h"
@@ -54,6 +53,7 @@
 #include "UserActionElementSet.h"
 #include "ViewportArguments.h"
 #include <memory>
+#include <pal/identifier/SessionID.h>
 #include <wtf/Deque.h>
 #include <wtf/HashCountedSet.h>
 #include <wtf/HashSet.h>
@@ -642,7 +642,7 @@ public:
 
     WEBCORE_EXPORT URL completeURL(const String&) const final;
     URL completeURL(const String&, const URL& baseURLOverride) const;
-    SessionID sessionID() const final;
+    PAL::SessionID sessionID() const final;
 
     String userAgent(const URL&) const final;
 
@@ -1810,7 +1810,7 @@ private:
 #endif
 
     OrientationNotifier m_orientationNotifier;
-    mutable SessionID m_sessionID;
+    mutable PAL::SessionID m_sessionID;
 
     static bool hasEverCreatedAnAXObjectCache;
 };
index f071337..32f19c3 100644 (file)
@@ -50,6 +50,10 @@ class ConsoleMessage;
 class ScriptCallStack;
 }
 
+namespace PAL {
+class SessionID;
+}
+
 namespace WebCore {
 
 class CachedScript;
@@ -61,7 +65,6 @@ class PublicURLManager;
 class RejectedPromiseTracker;
 class ResourceRequest;
 class SecurityOrigin;
-class SessionID;
 class SocketProvider;
 class URL;
 
@@ -82,7 +85,7 @@ public:
 
     virtual const URL& url() const = 0;
     virtual URL completeURL(const String& url) const = 0;
-    virtual SessionID sessionID() const = 0;
+    virtual PAL::SessionID sessionID() const = 0;
 
     virtual String userAgent(const URL&) const = 0;
 
index daf21f7..7d6c2eb 100644 (file)
 #include "ScriptSourceCode.h"
 #include "SecurityOriginData.h"
 #include "SecurityPolicy.h"
-#include "SessionID.h"
 #include "Settings.h"
 #include "ShadowRoot.h"
 #include "TimeRanges.h"
 #include "UserContentController.h"
 #include "UserGestureIndicator.h"
 #include <limits>
+#include <pal/identifier/SessionID.h>
 #include <pal/system/SleepDisabler.h>
 #include <runtime/Uint8Array.h>
 #include <wtf/Algorithms.h>
@@ -180,7 +180,7 @@ static void clearFlags(unsigned& value, unsigned flags)
 {
     value &= ~flags;
 }
-    
+
 #if !LOG_DISABLED
 static String urlForLoggingMedia(const URL& url)
 {
@@ -222,7 +222,7 @@ static String actionName(HTMLMediaElementEnums::DelayedActionType action)
 #endif
 
 #ifndef LOG_MEDIA_EVENTS
-// Default to not logging events because so many are generated they can overwhelm the rest of 
+// Default to not logging events because so many are generated they can overwhelm the rest of
 // the logging.
 #define LOG_MEDIA_EVENTS 0
 #endif
@@ -282,7 +282,7 @@ public:
     {
         m_element.endIgnoringTrackDisplayUpdateRequests();
     }
-    
+
 private:
     HTMLMediaElement& m_element;
 };
@@ -323,7 +323,7 @@ HTMLMediaElement* HTMLMediaElement::elementWithID(uint64_t id)
 {
     if (id == HTMLMediaElementInvalidID)
         return nullptr;
-    
+
     return elementIDsToElements().get(id);
 }
 
@@ -803,7 +803,7 @@ void HTMLMediaElement::finishParsingChildren()
 {
     HTMLElement::finishParsingChildren();
     m_parsingInProgress = false;
-    
+
 #if ENABLE(VIDEO_TRACK)
     if (descendantsOfType<HTMLTrackElement>(*this).first())
         scheduleDelayedAction(ConfigureTextTracks);
@@ -992,7 +992,7 @@ void HTMLMediaElement::scheduleEvent(const AtomicString& eventName)
     LOG(Media, "HTMLMediaElement::scheduleEvent(%p) - scheduling '%s'", this, eventName.string().ascii().data());
 #endif
     RefPtr<Event> event = Event::create(eventName, false, true);
-    
+
     // Don't set the event target, the event queue will set it in GenericEventQueue::timerFired and setting it here
     // will trigger an ASSERT if this element has been marked for deletion.
 
@@ -1130,7 +1130,7 @@ String HTMLMediaElement::canPlayType(const String& mimeType) const
             canPlay = ASCIILiteral("probably");
             break;
     }
-    
+
     LOG(Media, "HTMLMediaElement::canPlayType(%p) - [%s] -> %s", this, mimeType.utf8().data(), canPlay.utf8().data());
 
     return canPlay;
@@ -1146,9 +1146,9 @@ double HTMLMediaElement::getStartDate() const
 void HTMLMediaElement::load()
 {
     Ref<HTMLMediaElement> protectedThis(*this); // prepareForLoad may result in a 'beforeload' event, which can make arbitrary DOM mutations.
-    
+
     LOG(Media, "HTMLMediaElement::load(%p)", this);
-    
+
     if (!m_mediaSession->dataLoadingPermitted(*this))
         return;
     if (processingUserGestureForMedia())
@@ -1486,7 +1486,7 @@ void HTMLMediaElement::loadResource(const URL& initialURL, ContentType& contentT
     }
 #endif
 
-    // The resource fetch algorithm 
+    // The resource fetch algorithm
     m_networkState = NETWORK_LOADING;
 
     // If the URL should be loaded from the application cache, pass the URL of the cached file to the media engine.
@@ -1841,7 +1841,7 @@ bool HTMLMediaElement::textTracksAreReady() const
 {
     // 4.8.10.12.1 Text track model
     // ...
-    // The text tracks of a media element are ready if all the text tracks whose mode was not 
+    // The text tracks of a media element are ready if all the text tracks whose mode was not
     // in the disabled state when the element's resource selection algorithm last started now
     // have a text track readiness state of loaded or failed to load.
     for (unsigned i = 0; i < m_textTracksWhenResourceSelectionBegan.size(); ++i) {
@@ -1901,10 +1901,10 @@ void HTMLMediaElement::textTrackModeChanged(TextTrack& track)
     // If this is the first added track, create the list of text tracks.
     if (!m_textTracks)
         m_textTracks = TextTrackList::create(this, ActiveDOMObject::scriptExecutionContext());
-    
+
     // Mark this track as "configured" so configureTextTracks won't change the mode again.
     track.setHasBeenConfigured(true);
-    
+
     if (track.mode() != TextTrack::Mode::Disabled && trackIsLoaded)
         textTrackAddCues(track, *track.cues());
 
@@ -2077,8 +2077,8 @@ void HTMLMediaElement::noneSupported()
     m_loadState = WaitingForSource;
     m_currentSourceNode = nullptr;
 
-    // 4.8.10.5 
-    // 6 - Reaching this step indicates that the media resource failed to load or that the given 
+    // 4.8.10.5
+    // 6 - Reaching this step indicates that the media resource failed to load or that the given
     // URL could not be resolved. In one atomic operation, run the following steps:
 
     // 6.1 - Set the error attribute to a new MediaError object whose code attribute is set to
@@ -2103,7 +2103,7 @@ void HTMLMediaElement::noneSupported()
     // 8 - Set the element's delaying-the-load-event flag to false. This stops delaying the load event.
     setShouldDelayLoadEvent(false);
 
-    // 9 - Abort these steps. Until the load() method is invoked or the src attribute is changed, 
+    // 9 - Abort these steps. Until the load() method is invoked or the src attribute is changed,
     // the element won't attempt to load another resource.
 
     updateDisplayState();
@@ -2118,7 +2118,7 @@ void HTMLMediaElement::mediaLoadingFailedFatally(MediaPlayer::NetworkState error
     stopPeriodicTimers();
     m_loadState = WaitingForSource;
 
-    // 2 - Set the error attribute to a new MediaError object whose code attribute is 
+    // 2 - Set the error attribute to a new MediaError object whose code attribute is
     // set to MEDIA_ERR_NETWORK/MEDIA_ERR_DECODE.
     if (error == MediaPlayer::NetworkError)
         m_error = MediaError::create(MediaError::MEDIA_ERR_NETWORK);
@@ -2208,20 +2208,20 @@ static String stringForNetworkState(MediaPlayer::NetworkState state)
 void HTMLMediaElement::mediaLoadingFailed(MediaPlayer::NetworkState error)
 {
     stopPeriodicTimers();
-    
+
     // If we failed while trying to load a <source> element, the movie was never parsed, and there are more
     // <source> children, schedule the next one
     if (m_readyState < HAVE_METADATA && m_loadState == LoadingFromSourceElement) {
-        
+
         // resource selection algorithm
         // Step 9.Otherwise.9 - Failed with elements: Queue a task, using the DOM manipulation task source, to fire a simple event named error at the candidate element.
         if (m_currentSourceNode)
             m_currentSourceNode->scheduleErrorEvent();
         else
             LOG(Media, "HTMLMediaElement::setNetworkState(%p) - error event not sent, <source> was removed", this);
-        
+
         // 9.Otherwise.10 - Asynchronously await a stable state. The synchronous section consists of all the remaining steps of this algorithm until the algorithm says the synchronous section has ended.
-        
+
         // 9.Otherwise.11 - Forget the media element's media-resource-specific tracks.
         forgetResourceSpecificTracks();
 
@@ -2232,15 +2232,15 @@ void HTMLMediaElement::mediaLoadingFailed(MediaPlayer::NetworkState error)
             LOG(Media, "HTMLMediaElement::setNetworkState(%p) - no more <source> elements, waiting", this);
             waitForSourceChange();
         }
-        
+
         return;
     }
-    
+
     if ((error == MediaPlayer::NetworkError && m_readyState >= HAVE_METADATA) || error == MediaPlayer::DecodeError)
         mediaLoadingFailedFatally(error);
     else if ((error == MediaPlayer::FormatError || error == MediaPlayer::NetworkError) && m_loadState == LoadingFromSrcAttr)
         noneSupported();
-    
+
     updateDisplayState();
     if (hasMediaControls()) {
         mediaControls()->reset();
@@ -2360,7 +2360,7 @@ void HTMLMediaElement::setReadyState(MediaPlayer::ReadyState state)
         return;
     bool tracksAreReady = true;
 #endif
-    
+
     if (tracksAreReady)
         m_readyState = newState;
     else {
@@ -2371,7 +2371,7 @@ void HTMLMediaElement::setReadyState(MediaPlayer::ReadyState state)
         else
             m_readyState = HAVE_CURRENT_DATA;
     }
-    
+
     if (oldState > m_readyStateMaximum)
         m_readyStateMaximum = oldState;
 
@@ -2608,7 +2608,7 @@ void HTMLMediaElement::addPlayedRange(const MediaTime& start, const MediaTime& e
     if (!m_playedTimeRanges)
         m_playedTimeRanges = TimeRanges::create();
     m_playedTimeRanges->ranges().add(start, end);
-}  
+}
 
 bool HTMLMediaElement::supportsScanning() const
 {
@@ -2730,8 +2730,8 @@ void HTMLMediaElement::seekTask()
     m_pendingSeek = nullptr;
 
     ASSERT(negativeTolerance >= MediaTime::zeroTime());
-    
-    // 6 - If the new playback position is later than the end of the media resource, then let it be the end 
+
+    // 6 - If the new playback position is later than the end of the media resource, then let it be the end
     // of the media resource instead.
     time = std::min(time, durationMediaTime());
 
@@ -2742,7 +2742,7 @@ void HTMLMediaElement::seekTask()
     // Ask the media engine for the time value in the movie's time scale before comparing with current time. This
     // is necessary because if the seek time is not equal to currentTime but the delta is less than the movie's
     // time scale, we will ask the media engine to "seek" to the current movie time, which may be a noop and
-    // not generate a timechanged callback. This means m_seeking will never be cleared and we will never 
+    // not generate a timechanged callback. This means m_seeking will never be cleared and we will never
     // fire a 'seeked' event.
 #if !LOG_DISABLED
     MediaTime mediaTime = m_player->mediaTimeForTimeValue(time);
@@ -2752,7 +2752,7 @@ void HTMLMediaElement::seekTask()
     time = m_player->mediaTimeForTimeValue(time);
 
     // 8 - If the (possibly now changed) new playback position is not in one of the ranges given in the
-    // seekable attribute, then let it be the position in one of the ranges given in the seekable attribute 
+    // seekable attribute, then let it be the position in one of the ranges given in the seekable attribute
     // that is the nearest to the new playback position. ... If there are no ranges given in the seekable
     // attribute then set the seeking IDL attribute to false and abort these steps.
     RefPtr<TimeRanges> seekableRanges = seekable();
@@ -2859,11 +2859,11 @@ void HTMLMediaElement::refreshCachedTime() const
 
     m_cachedTime = m_player->currentTime();
     if (!m_cachedTime) {
-        // Do not use m_cachedTime until the media engine returns a non-zero value because we can't 
-        // estimate current time until playback actually begins. 
-        invalidateCachedTime(); 
-        return; 
-    } 
+        // Do not use m_cachedTime until the media engine returns a non-zero value because we can't
+        // estimate current time until playback actually begins.
+        invalidateCachedTime();
+        return;
+    }
 
     m_clockTimeAtLastCachedTimeUpdate = monotonicallyIncreasingTime();
 }
@@ -2948,7 +2948,7 @@ MediaTime HTMLMediaElement::currentMediaTime() const
 
     if (m_cachedTime.isInvalid())
         return MediaTime::zeroTime();
-    
+
     return m_cachedTime;
 }
 
@@ -3096,7 +3096,7 @@ void HTMLMediaElement::setWebkitPreservesPitch(bool preservesPitch)
     LOG(Media, "HTMLMediaElement::setWebkitPreservesPitch(%p) - %s", this, boolString(preservesPitch));
 
     m_webkitPreservesPitch = preservesPitch;
-    
+
     if (!m_player)
         return;
 
@@ -3114,7 +3114,7 @@ bool HTMLMediaElement::ended() const
 #endif
 
     // 4.8.10.8 Playing the media resource
-    // The ended attribute must return true if the media element has ended 
+    // The ended attribute must return true if the media element has ended
     // playback and the direction of playback is forwards, and false otherwise.
     return endedPlayback() && requestedPlaybackRate() > 0;
 }
@@ -3206,7 +3206,7 @@ void HTMLMediaElement::play()
 bool HTMLMediaElement::playInternal()
 {
     LOG(Media, "HTMLMediaElement::playInternal(%p)", this);
-    
+
     if (!m_mediaSession->clientWillBeginPlayback()) {
         LOG(Media, "  returning because of interruption");
         return true; // Treat as success because we will begin playback on cessation of the interruption.
@@ -3278,9 +3278,9 @@ bool HTMLMediaElement::playInternal()
 void HTMLMediaElement::pause()
 {
     LOG(Media, "HTMLMediaElement::pause(%p)", this);
-    
+
     m_temporarilyAllowingInlinePlaybackAfterFullscreen = false;
-    
+
     if (!m_mediaSession->playbackPermitted(*this))
         return;
 
@@ -3470,7 +3470,7 @@ void HTMLMediaElement::togglePlayState()
     if (canPlay()) {
         updatePlaybackRate();
         playInternal();
-    } else 
+    } else
         pauseInternal();
 }
 
@@ -3480,13 +3480,13 @@ void HTMLMediaElement::beginScrubbing()
 
     if (!paused()) {
         if (ended()) {
-            // Because a media element stays in non-paused state when it reaches end, playback resumes 
-            // when the slider is dragged from the end to another position unless we pause first. Do 
+            // Because a media element stays in non-paused state when it reaches end, playback resumes
+            // when the slider is dragged from the end to another position unless we pause first. Do
             // a "hard pause" so an event is generated, since we want to stay paused after scrubbing finishes.
             pause();
         } else {
             // Not at the end but we still want to pause playback so the media engine doesn't try to
-            // continue playing during scrubbing. Pause without generating an event as we will 
+            // continue playing during scrubbing. Pause without generating an event as we will
             // unpause after scrubbing finishes.
             setPausedInternal(true);
         }
@@ -3580,7 +3580,7 @@ void HTMLMediaElement::playbackProgressTimerFired()
             pauseInternal();
         }
     }
-    
+
     scheduleTimeupdateEvent(true);
 
     if (!requestedPlaybackRate())
@@ -3666,7 +3666,7 @@ void HTMLMediaElement::mediaPlayerDidAddTextTrack(InbandTextTrackPrivate& track)
     // 1. Associate the relevant data with a new text track and its corresponding new TextTrack object.
     auto textTrack = InbandTextTrack::create(*ActiveDOMObject::scriptExecutionContext(), *this, track);
     textTrack->setMediaElement(this);
-    
+
     // 2. Set the new text track's kind, label, and language based on the semantics of the relevant data,
     // as defined by the relevant specification. If there is no label in that data, then the label must
     // be set to the empty string.
@@ -3677,15 +3677,15 @@ void HTMLMediaElement::mediaPlayerDidAddTextTrack(InbandTextTrackPrivate& track)
     // 5. Populate the new text track's list of cues with the cues parsed so far, folllowing the guidelines for exposing
     // cues, and begin updating it dynamically as necessary.
     //   - Thess are all done by the media engine.
-    
+
     // 6. Set the new text track's readiness state to loaded.
     textTrack->setReadinessState(TextTrack::Loaded);
-    
+
     // 7. Set the new text track's mode to the mode consistent with the user's preferences and the requirements of
     // the relevant specification for the data.
     //  - This will happen in configureTextTracks()
     scheduleDelayedAction(ConfigureTextTracks);
-    
+
     // 8. Add the new text track to the media element's list of text tracks.
     // 9. Fire an event with the name addtrack, that does not bubble and is not cancelable, and that uses the TrackEvent
     // interface, with the track attribute initialized to the text track's TextTrack object, at the media element's
@@ -3799,7 +3799,7 @@ ExceptionOr<TextTrack&> HTMLMediaElement::addTextTrack(const String& kind, const
     // 3. If the language argument was omitted, let language be the empty string.
     // 4. Create a new TextTrack object.
 
-    // 5. Create a new text track corresponding to the new object, and set its text track kind to kind, its text 
+    // 5. Create a new text track corresponding to the new object, and set its text track kind to kind, its text
     // track label to label, its text track language to language...
     auto track = TextTrack::create(ActiveDOMObject::scriptExecutionContext(), this, kind, emptyString(), label, language);
     auto& trackReference = track.get();
@@ -3848,8 +3848,8 @@ void HTMLMediaElement::didAddTextTrack(HTMLTrackElement& trackElement)
     ASSERT(trackElement.hasTagName(trackTag));
 
     // 4.8.10.12.3 Sourcing out-of-band text tracks
-    // When a track element's parent element changes and the new parent is a media element, 
-    // then the user agent must add the track element's corresponding text track to the 
+    // When a track element's parent element changes and the new parent is a media element,
+    // then the user agent must add the track element's corresponding text track to the
     // media element's list of text tracks ... [continues in TextTrackList::append]
     addTextTrack(trackElement.track());
 
@@ -3879,10 +3879,10 @@ void HTMLMediaElement::didRemoveTextTrack(HTMLTrackElement& trackElement)
 
     if (!m_textTracks)
         return;
-    
+
     // 4.8.10.12.3 Sourcing out-of-band text tracks
-    // When a track element's parent element changes and the old parent was a media element, 
-    // then the user agent must remove the track element's corresponding text track from the 
+    // When a track element's parent element changes and the old parent was a media element,
+    // then the user agent must remove the track element's corresponding text track from the
     // media element's list of text tracks.
     removeTextTrack(textTrack);
 
@@ -4009,12 +4009,12 @@ static JSC::JSValue controllerJSValue(JSC::ExecState& exec, JSDOMGlobalObject& g
     JSC::VM& vm = globalObject.vm();
     auto scope = DECLARE_THROW_SCOPE(vm);
     auto mediaJSWrapper = toJS(&exec, &globalObject, media);
-    
+
     // Retrieve the controller through the JS object graph
     JSC::JSObject* mediaJSWrapperObject = jsDynamicDowncast<JSC::JSObject*>(vm, mediaJSWrapper);
     if (!mediaJSWrapperObject)
         return JSC::jsNull();
-    
+
     JSC::Identifier controlsHost = JSC::Identifier::fromString(&vm, "controlsHost");
     JSC::JSValue controlsHostJSWrapper = mediaJSWrapperObject->get(&exec, controlsHost);
     RETURN_IF_EXCEPTION(scope, JSC::jsNull());
@@ -4204,19 +4204,19 @@ void HTMLMediaElement::configureTextTracks()
             currentGroup->defaultTrack = textTrack;
 
         // Do not add this track to the group if it has already been automatically configured
-        // as we only want to call configureTextTrack once per track so that adding another 
-        // track after the initial configuration doesn't reconfigure every track - only those 
-        // that should be changed by the new addition. For example all metadata tracks are 
-        // disabled by default, and we don't want a track that has been enabled by script 
+        // as we only want to call configureTextTrack once per track so that adding another
+        // track after the initial configuration doesn't reconfigure every track - only those
+        // that should be changed by the new addition. For example all metadata tracks are
+        // disabled by default, and we don't want a track that has been enabled by script
         // to be disabled automatically when a new metadata track is added later.
         if (textTrack->hasBeenConfigured())
             continue;
-        
+
         if (textTrack->language().length())
             currentGroup->hasSrcLang = true;
         currentGroup->tracks.append(textTrack);
     }
-    
+
     if (captionAndSubtitleTracks.tracks.size())
         configureTextTrackGroup(captionAndSubtitleTracks);
     if (descriptionTracks.tracks.size())
@@ -4289,7 +4289,7 @@ URL HTMLMediaElement::selectNextSourceChild(ContentType* contentType, String* ke
 #endif
         if (mediaURL.isEmpty())
             goto CheckAgain;
-        
+
         if (auto* media = source->parsedMediaAttribute()) {
 #if !LOG_DISABLED
             if (shouldLog)
@@ -4373,13 +4373,13 @@ void HTMLMediaElement::sourceWasAdded(HTMLSourceElement& source)
         LOG(Media, "HTMLMediaElement::sourceWasAdded(%p) - 'src' is %s", this, urlForLoggingMedia(url).utf8().data());
     }
 #endif
-    
+
     // We should only consider a <source> element when there is not src attribute at all.
     if (hasAttributeWithoutSynchronization(srcAttr))
         return;
 
-    // 4.8.8 - If a source element is inserted as a child of a media element that has no src 
-    // attribute and whose networkState has the value NETWORK_EMPTY, the user agent must invoke 
+    // 4.8.8 - If a source element is inserted as a child of a media element that has no src
+    // attribute and whose networkState has the value NETWORK_EMPTY, the user agent must invoke
     // the media element's resource selection algorithm.
     if (m_networkState == NETWORK_EMPTY) {
         m_nextChildNodeToConsider = &source;
@@ -4398,17 +4398,17 @@ void HTMLMediaElement::sourceWasAdded(HTMLSourceElement& source)
 
     if (m_nextChildNodeToConsider)
         return;
-    
+
     // 4.8.9.5, resource selection algorithm, source elements section:
     // 21. Wait until the node after pointer is a node other than the end of the list. (This step might wait forever.)
     // 22. Asynchronously await a stable state...
-    // 23. Set the element's delaying-the-load-event flag back to true (this delays the load event again, in case 
+    // 23. Set the element's delaying-the-load-event flag back to true (this delays the load event again, in case
     // it hasn't been fired yet).
     setShouldDelayLoadEvent(true);
 
     // 24. Set the networkState back to NETWORK_LOADING.
     m_networkState = NETWORK_LOADING;
-    
+
     // 25. Jump back to the find next candidate step above.
     m_nextChildNodeToConsider = &source;
     scheduleNextSourceChild();
@@ -4433,7 +4433,7 @@ void HTMLMediaElement::sourceWasRemoved(HTMLSourceElement& source)
         LOG(Media, "HTMLMediaElement::sourceRemoved(%p) - m_nextChildNodeToConsider set to %p", this, m_nextChildNodeToConsider.get());
     } else if (&source == m_currentSourceNode) {
         // Clear the current source node pointer, but don't change the movie as the spec says:
-        // 4.8.8 - Dynamically modifying a source element and its attribute when the element is already 
+        // 4.8.8 - Dynamically modifying a source element and its attribute when the element is already
         // inserted in a video or audio element will have no effect.
         m_currentSourceNode = nullptr;
         LOG(Media, "HTMLMediaElement::sourceRemoved(%p) - m_currentSourceNode set to 0", this);
@@ -4456,8 +4456,8 @@ void HTMLMediaElement::mediaPlayerTimeChanged(MediaPlayer*)
     // 4.8.10.9 step 14 & 15.  Needed if no ReadyState change is associated with the seek.
     if (m_seekRequested && m_readyState >= HAVE_CURRENT_DATA && !m_player->seeking())
         finishSeek();
-    
-    // Always call scheduleTimeupdateEvent when the media engine reports a time discontinuity, 
+
+    // Always call scheduleTimeupdateEvent when the media engine reports a time discontinuity,
     // it will only queue a 'timeupdate' event if we haven't already posted one at the current
     // movie time.
     else
@@ -4777,7 +4777,7 @@ void HTMLMediaElement::mediaPlayerFirstVideoFrameAvailable(MediaPlayer*)
 void HTMLMediaElement::mediaPlayerCharacteristicChanged(MediaPlayer*)
 {
     LOG(Media, "HTMLMediaElement::mediaPlayerCharacteristicChanged(%p)", this);
-    
+
     beginProcessingMediaPlayerCallback();
 
 #if ENABLE(VIDEO_TRACK)
@@ -4876,7 +4876,7 @@ bool HTMLMediaElement::potentiallyPlaying() const
 {
     if (isBlockedOnMediaController())
         return false;
-    
+
     if (!couldPlayIfEnoughData())
         return false;
 
@@ -4911,8 +4911,8 @@ bool HTMLMediaElement::endedPlayback() const
 
     // 4.8.10.8 Playing the media resource
 
-    // A media element is said to have ended playback when the element's 
-    // readyState attribute is HAVE_METADATA or greater, 
+    // A media element is said to have ended playback when the element's
+    // readyState attribute is HAVE_METADATA or greater,
     if (m_readyState < HAVE_METADATA)
         return false;
 
@@ -4923,7 +4923,7 @@ bool HTMLMediaElement::endedPlayback() const
     if (requestedPlaybackRate() > 0)
         return dur > MediaTime::zeroTime() && now >= dur && (!loop() || m_mediaController);
 
-    // or the current playback position is the earliest possible position and the direction 
+    // or the current playback position is the earliest possible position and the direction
     // of playback is backwards
     if (requestedPlaybackRate() < 0)
         return now <= MediaTime::zeroTime();
@@ -4938,7 +4938,7 @@ bool HTMLMediaElement::stoppedDueToErrors() const
         if (!seekableRanges->contain(currentTime()))
             return true;
     }
-    
+
     return false;
 }
 
@@ -4959,7 +4959,7 @@ MediaTime HTMLMediaElement::maxTimeSeekable() const
 {
     return m_player ? m_player->maxTimeSeekable() : MediaTime::zeroTime();
 }
-    
+
 void HTMLMediaElement::updateVolume()
 {
     if (!m_player)
@@ -5022,7 +5022,7 @@ void HTMLMediaElement::updatePlayState(UpdateState updateState)
             mediaControls()->playbackStopped();
         return;
     }
-    
+
     bool shouldBePlaying = potentiallyPlaying();
     bool playerPaused = m_player->paused();
 
@@ -5079,7 +5079,7 @@ void HTMLMediaElement::updatePlayState(UpdateState updateState)
         if (hasMediaControls())
             mediaControls()->playbackStopped();
     }
-    
+
     updateMediaController();
     updateRenderer();
 
@@ -5148,9 +5148,9 @@ void HTMLMediaElement::userCancelledLoad()
     detachMediaSource();
 #endif
 
-    // 4 - If the media element's readyState attribute has a value equal to HAVE_NOTHING, set the 
-    // element's networkState attribute to the NETWORK_EMPTY value and queue a task to fire a 
-    // simple event named emptied at the element. Otherwise, set the element's networkState 
+    // 4 - If the media element's readyState attribute has a value equal to HAVE_NOTHING, set the
+    // element's networkState attribute to the NETWORK_EMPTY value and queue a task to fire a
+    // simple event named emptied at the element. Otherwise, set the element's networkState
     // attribute to the NETWORK_IDLE value.
     if (m_readyState == HAVE_NOTHING) {
         m_networkState = NETWORK_EMPTY;
@@ -5240,7 +5240,7 @@ void HTMLMediaElement::clearMediaPlayer(DelayedActionType flags)
 
 bool HTMLMediaElement::canSuspendForDocumentSuspension() const
 {
-    return true; 
+    return true;
 }
 
 const char* HTMLMediaElement::activeDOMObjectName() const
@@ -5467,7 +5467,7 @@ bool HTMLMediaElement::addEventListener(const AtomicString& eventType, Ref<Event
     }
 
     LOG(Media, "HTMLMediaElement::addEventListener(%p) - 'webkitplaybacktargetavailabilitychanged'", this);
-    
+
     enqueuePlaybackTargetAvailabilityChangedEvent(); // Ensure the event listener gets at least one event.
     return true;
 }
@@ -5547,17 +5547,17 @@ double HTMLMediaElement::maxFastForwardRate() const
 {
     return m_player ? m_player->maxFastForwardRate() : 0;
 }
-    
+
 bool HTMLMediaElement::isFullscreen() const
 {
     if (m_videoFullscreenMode != VideoFullscreenModeNone)
         return true;
-    
+
 #if ENABLE(FULLSCREEN_API)
     if (document().webkitIsFullScreen() && document().webkitCurrentFullScreenElement() == this)
         return true;
 #endif
-    
+
     return false;
 }
 
@@ -5574,7 +5574,7 @@ bool HTMLMediaElement::isStandardFullscreen() const
 void HTMLMediaElement::toggleStandardFullscreenState()
 {
     LOG(Media, "HTMLMediaElement::toggleStandardFullscreenState(%p) - isStandardFullscreen() is %s", this, boolString(isStandardFullscreen()));
-    
+
     if (isStandardFullscreen())
         exitFullscreen();
     else
@@ -5738,7 +5738,7 @@ void HTMLMediaElement::waitForPreparedForInlineThen(WTF::Function<void()>&& comp
         completionHandler();
         return;
     }
-    
+
     m_preparedForInlineCompletionHandler = WTFMove(completionHandler);
 }
 
@@ -5748,7 +5748,7 @@ bool HTMLMediaElement::isVideoLayerInline()
 {
     return !m_videoFullscreenLayer;
 };
-    
+
 void HTMLMediaElement::setVideoFullscreenLayer(PlatformLayer* platformLayer, WTF::Function<void()>&& completionHandler)
 {
     m_videoFullscreenLayer = platformLayer;
@@ -5756,14 +5756,14 @@ void HTMLMediaElement::setVideoFullscreenLayer(PlatformLayer* platformLayer, WTF
         completionHandler();
         return;
     }
-    
+
     m_player->setVideoFullscreenLayer(platformLayer, WTFMove(completionHandler));
     invalidateStyleAndLayerComposition();
 #if ENABLE(VIDEO_TRACK)
     updateTextTrackDisplay();
 #endif
 }
-    
+
 void HTMLMediaElement::setVideoFullscreenFrame(FloatRect frame)
 {
     m_videoFullscreenFrame = frame;
@@ -5777,9 +5777,9 @@ void HTMLMediaElement::setVideoFullscreenGravity(MediaPlayer::VideoGravity gravi
     if (m_player)
         m_player->setVideoFullscreenGravity(gravity);
 }
-    
+
 #else
-    
+
 bool HTMLMediaElement::isVideoLayerInline()
 {
     return true;
@@ -5824,7 +5824,7 @@ void HTMLMediaElement::updateTextTrackDisplay()
 #else
     if (!hasMediaControls() && !createMediaControls())
         return;
-    
+
     mediaControls()->updateTextTrackDisplay();
 #endif
 }
@@ -5973,7 +5973,7 @@ MediaControls* HTMLMediaElement::mediaControls() const
     ShadowRoot* root = userAgentShadowRoot();
     if (!root)
         return nullptr;
-    
+
     return childrenOfType<MediaControls>(*root).first();
 #endif
 }
@@ -6105,7 +6105,7 @@ void HTMLMediaElement::configureTextTrackDisplay(TextTrackVisibilityCheckType ch
         return;
 
     mediaControls()->changedClosedCaptionsVisibility();
-    
+
     updateTextTrackDisplay();
     updateActiveTextTrackCues(currentMediaTime());
 #endif
@@ -6236,7 +6236,7 @@ void HTMLMediaElement::setMediaGroup(const String& group)
         return;
     m_mediaGroup = group;
 
-    // When a media element is created with a mediagroup attribute, and when a media element's mediagroup 
+    // When a media element is created with a mediagroup attribute, and when a media element's mediagroup
     // attribute is set, changed, or removed, the user agent must run the following steps:
     // 1. Let m [this] be the media element in question.
     // 2. Let m have no current media controller, if it currently has one.
@@ -6247,14 +6247,14 @@ void HTMLMediaElement::setMediaGroup(const String& group)
         return;
 
     // 4. If there is another media element whose Document is the same as m's Document (even if one or both
-    // of these elements are not actually in the Document), 
+    // of these elements are not actually in the Document),
     HashSet<HTMLMediaElement*> elements = documentToElementSetMap().get(&document());
     for (auto& element : elements) {
         if (element == this)
             continue;
 
         // and which also has a mediagroup attribute, and whose mediagroup attribute has the same value as
-        // the new value of m's mediagroup attribute,        
+        // the new value of m's mediagroup attribute,
         if (element->mediaGroup() == group) {
             //  then let controller be that media element's current media controller.
             setController(element->controller());
@@ -6288,7 +6288,7 @@ void HTMLMediaElement::setController(RefPtr<MediaController>&& controller)
 void HTMLMediaElement::setControllerForBindings(MediaController* controller)
 {
     // 4.8.10.11.2 Media controllers: controller attribute.
-    // On setting, it must first remove the element's mediagroup attribute, if any, 
+    // On setting, it must first remove the element's mediagroup attribute, if any,
     setMediaGroup({ });
     // and then set the current media controller to the given value.
     setController(controller);
@@ -6316,13 +6316,13 @@ bool HTMLMediaElement::isBlockedOnMediaController() const
     if (!m_mediaController)
         return false;
 
-    // A media element is blocked on its media controller if the MediaController is a blocked 
+    // A media element is blocked on its media controller if the MediaController is a blocked
     // media controller,
     if (m_mediaController->isBlocked())
         return true;
 
-    // or if its media controller position is either before the media resource's earliest possible 
-    // position relative to the MediaController's timeline or after the end of the media resource 
+    // or if its media controller position is either before the media resource's earliest possible
+    // position relative to the MediaController's timeline or after the end of the media resource
     // relative to the MediaController's timeline.
     double mediaControllerPosition = m_mediaController->currentTime();
     if (mediaControllerPosition < 0 || mediaControllerPosition > duration())
@@ -6335,7 +6335,7 @@ void HTMLMediaElement::prepareMediaFragmentURI()
 {
     MediaFragmentURIParser fragmentParser(m_currentSrc);
     MediaTime dur = durationMediaTime();
-    
+
     MediaTime start = fragmentParser.startTime();
     if (start.isValid() && start > MediaTime::zeroTime()) {
         m_fragmentStartTime = start;
@@ -6343,7 +6343,7 @@ void HTMLMediaElement::prepareMediaFragmentURI()
             m_fragmentStartTime = dur;
     } else
         m_fragmentStartTime = MediaTime::invalidTime();
-    
+
     MediaTime end = fragmentParser.endTime();
     if (end.isValid() && end > MediaTime::zeroTime() && (!m_fragmentStartTime.isValid() || end > m_fragmentStartTime)) {
         m_fragmentEndTime = end;
@@ -6351,7 +6351,7 @@ void HTMLMediaElement::prepareMediaFragmentURI()
             m_fragmentEndTime = dur;
     } else
         m_fragmentEndTime = MediaTime::invalidTime();
-    
+
     if (m_fragmentStartTime.isValid() && m_readyState < HAVE_FUTURE_DATA)
         prepareToPlay();
 }
@@ -6887,7 +6887,7 @@ void HTMLMediaElement::didAddUserAgentShadowRoot(ShadowRoot* root)
 
     auto mediaJSWrapper = toJS(exec, globalObject, *this);
     auto mediaControlsHostJSWrapper = toJS(exec, globalObject, *m_mediaControlsHost);
-    
+
     JSC::MarkedArgumentBuffer argList;
     argList.append(toJS(exec, globalObject, root));
     argList.append(mediaJSWrapper);
@@ -6910,7 +6910,7 @@ void HTMLMediaElement::didAddUserAgentShadowRoot(ShadowRoot* root)
     JSC::JSObject* mediaJSWrapperObject = mediaJSWrapper.toObject(exec);
     scope.assertNoException();
     JSC::Identifier controlsHost = JSC::Identifier::fromString(&exec->vm(), "controlsHost");
-    
+
     ASSERT(!mediaJSWrapperObject->hasProperty(exec, controlsHost));
 
     mediaJSWrapperObject->putDirect(exec->vm(), controlsHost, mediaControlsHostJSWrapper, JSC::DontDelete | JSC::DontEnum | JSC::ReadOnly);
@@ -6918,7 +6918,7 @@ void HTMLMediaElement::didAddUserAgentShadowRoot(ShadowRoot* root)
     JSC::JSObject* mediaControlsHostJSWrapperObject = jsDynamicDowncast<JSC::JSObject*>(vm, mediaControlsHostJSWrapper);
     if (!mediaControlsHostJSWrapperObject)
         return;
-    
+
     JSC::Identifier controller = JSC::Identifier::fromString(&exec->vm(), "controller");
 
     ASSERT(!controllerObject->hasProperty(exec, controller));
@@ -7039,7 +7039,7 @@ unsigned long long HTMLMediaElement::fileSize() const
 {
     if (m_player)
         return m_player->fileSize();
-    
+
     return 0;
 }
 
@@ -7138,12 +7138,12 @@ void HTMLMediaElement::mayResumePlayback(bool shouldResume)
     if (paused() && shouldResume)
         play();
 }
-    
+
 String HTMLMediaElement::mediaSessionTitle() const
 {
     if (hasAttributeWithoutSynchronization(titleAttr))
         return attributeWithoutSynchronization(titleAttr);
-    
+
     return m_currentSrc;
 }
 
@@ -7187,12 +7187,12 @@ static bool needsSeekingSupportQuirk(Document& document)
 {
     if (!document.settings().needsSiteSpecificQuirks())
         return false;
-            
+
     String host = document.topDocument().url().host();
     return equalLettersIgnoringASCIICase(host, "netflix.com") || host.endsWithIgnoringASCIICase(".netflix.com");
 }
 
-bool HTMLMediaElement::supportsSeeking() const 
+bool HTMLMediaElement::supportsSeeking() const
 {
     return !needsSeekingSupportQuirk(document()) && !isLiveStream();
 }
@@ -7353,13 +7353,13 @@ bool HTMLMediaElement::doesHaveAttribute(const AtomicString& attribute, AtomicSt
     auto& elementValue = attributeWithoutSynchronization(attributeName);
     if (elementValue.isNull())
         return false;
-    
+
     if (attributeName == HTMLNames::x_itunes_inherit_uri_query_componentAttr && !document().settings().enableInheritURIQueryComponent())
         return false;
 
     if (value)
         *value = elementValue;
-    
+
     return true;
 }
 
@@ -7464,14 +7464,14 @@ void HTMLMediaElement::allowsMediaDocumentInlinePlaybackChanged()
     if (potentiallyPlaying() && m_mediaSession->requiresFullscreenForVideoPlayback(*this) && !isFullscreen())
         enterFullscreen();
 }
-    
+
 bool HTMLMediaElement::isVideoTooSmallForInlinePlayback()
 {
     auto* renderer = this->renderer();
-    
+
     if (!renderer || !is<RenderVideo>(*renderer))
         return true;
-    
+
     IntRect videoBox = downcast<RenderVideo>(*renderer).videoBox();
     return (videoBox.width() <= 1 || videoBox.height() <= 1);
 }
index f3c3d68..7412780 100644 (file)
@@ -769,7 +769,7 @@ void DocumentLoader::continueAfterContentPolicy(PolicyAction policy)
         // Download may use this knowledge for purposes unrelated to cookies, notably for setting file quarantine data.
         frameLoader()->setOriginalURLForDownloadRequest(m_request);
 
-        SessionID sessionID = SessionID::defaultSessionID();
+        PAL::SessionID sessionID = PAL::SessionID::defaultSessionID();
         if (frame() && frame()->page())
             sessionID = frame()->page()->sessionID();
 
index fc3b20b..7539e6b 100644 (file)
@@ -110,7 +110,7 @@ class EmptyContextMenuClient final : public ContextMenuClient {
 
 class EmptyDatabaseProvider final : public DatabaseProvider {
 #if ENABLE(INDEXED_DATABASE)
-    IDBClient::IDBConnectionToServer& idbConnectionToServerForSession(const SessionID&) final
+    IDBClient::IDBConnectionToServer& idbConnectionToServerForSession(const PAL::SessionID&) final
     {
         static auto& sharedConnection = InProcessIDBServer::create().leakRef();
         return sharedConnection.connectionToServer();
@@ -293,7 +293,7 @@ class EmptyFrameLoaderClient final : public FrameLoaderClient {
     void detachedFromParent2() final { }
     void detachedFromParent3() final { }
 
-    void convertMainResourceLoadToDownload(DocumentLoader*, SessionID, const ResourceRequest&, const ResourceResponse&) final { }
+    void convertMainResourceLoadToDownload(DocumentLoader*, PAL::SessionID, const ResourceRequest&, const ResourceResponse&) final { }
 
     void assignIdentifierToInitialRequest(unsigned long, DocumentLoader*, const ResourceRequest&) final { }
     bool shouldUseCredentialStorage(DocumentLoader*, unsigned long) final { return false; }
index 0487265..cfa44e4 100644 (file)
@@ -57,6 +57,10 @@ OBJC_CLASS NSDictionary;
 OBJC_CLASS NSView;
 #endif
 
+namespace PAL {
+class SessionID;
+}
+
 namespace WebCore {
 
 class AuthenticationChallenge;
@@ -90,7 +94,6 @@ class ResourceHandle;
 class ResourceRequest;
 class ResourceResponse;
 class SecurityOrigin;
-class SessionID;
 class SharedBuffer;
 class SubstituteData;
 class URL;
@@ -273,7 +276,7 @@ public:
     virtual void dispatchDidBecomeFrameset(bool) = 0; // Can change due to navigation or DOM modification.
 
     virtual bool canCachePage() const = 0;
-    virtual void convertMainResourceLoadToDownload(DocumentLoader*, SessionID, const ResourceRequest&, const ResourceResponse&) = 0;
+    virtual void convertMainResourceLoadToDownload(DocumentLoader*, PAL::SessionID, const ResourceRequest&, const ResourceResponse&) = 0;
 
     virtual RefPtr<Frame> createFrame(const URL&, const String& name, HTMLFrameOwnerElement&, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) = 0;
     virtual RefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement&, const URL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually) = 0;
index 7592b23..9ed2b31 100644 (file)
@@ -38,7 +38,7 @@
 
 namespace WebCore {
 
-CachedCSSStyleSheet::CachedCSSStyleSheet(CachedResourceRequest&& request, SessionID sessionID)
+CachedCSSStyleSheet::CachedCSSStyleSheet(CachedResourceRequest&& request, PAL::SessionID sessionID)
     : CachedResource(WTFMove(request), CSSStyleSheet, sessionID)
     , m_decoder(TextResourceDecoder::create("text/css", request.charset()))
 {
index 83c67db..fb34d1c 100644 (file)
@@ -34,7 +34,7 @@ struct CSSParserContext;
 
 class CachedCSSStyleSheet final : public CachedResource {
 public:
-    CachedCSSStyleSheet(CachedResourceRequest&&, SessionID);
+    CachedCSSStyleSheet(CachedResourceRequest&&, PAL::SessionID);
     virtual ~CachedCSSStyleSheet();
 
     enum class MIMETypeCheckHint { Strict, Lax };
index d90567c..88c5083 100644 (file)
@@ -45,7 +45,7 @@
 
 namespace WebCore {
 
-CachedFont::CachedFont(CachedResourceRequest&& request, SessionID sessionID, Type type)
+CachedFont::CachedFont(CachedResourceRequest&& request, PAL::SessionID sessionID, Type type)
     : CachedResource(WTFMove(request), type, sessionID)
     , m_loadInitiated(false)
     , m_hasCreatedFontDataWrappingResource(false)
index 7e9ea8b..015c650 100644 (file)
@@ -45,7 +45,7 @@ typedef FontTaggedSettings<int> FontFeatureSettings;
 
 class CachedFont : public CachedResource {
 public:
-    CachedFont(CachedResourceRequest&&, SessionID, Type = FontResource);
+    CachedFont(CachedResourceRequest&&, PAL::SessionID, Type = FontResource);
     virtual ~CachedFont();
 
     void beginLoadIfNeeded(CachedResourceLoader&);
index 17d6ffb..8cae724 100644 (file)
 
 namespace WebCore {
 
-CachedImage::CachedImage(CachedResourceRequest&& request, SessionID sessionID)
+CachedImage::CachedImage(CachedResourceRequest&& request, PAL::SessionID sessionID)
     : CachedResource(WTFMove(request), ImageResource, sessionID)
 {
     setStatus(Unknown);
 }
 
-CachedImage::CachedImage(Image* image, SessionID sessionID)
+CachedImage::CachedImage(Image* image, PAL::SessionID sessionID)
     : CachedResource(URL(), ImageResource, sessionID)
     , m_image(image)
 {
 }
 
-CachedImage::CachedImage(const URL& url, Image* image, SessionID sessionID, const String& domainForCachePartition)
+CachedImage::CachedImage(const URL& url, Image* image, PAL::SessionID sessionID, const String& domainForCachePartition)
     : CachedResource(url, ImageResource, sessionID)
     , m_image(image)
     , m_isManuallyCached(true)
index 52c476c..a7e8986 100644 (file)
@@ -47,10 +47,10 @@ class CachedImage final : public CachedResource {
     friend class MemoryCache;
 
 public:
-    CachedImage(CachedResourceRequest&&, SessionID);
-    CachedImage(Image*, SessionID);
+    CachedImage(CachedResourceRequest&&, PAL::SessionID);
+    CachedImage(Image*, PAL::SessionID);
     // Constructor to use for manually cached images.
-    CachedImage(const URL&, Image*, SessionID, const String& domainForCachePartition);
+    CachedImage(const URL&, Image*, PAL::SessionID, const String& domainForCachePartition);
     virtual ~CachedImage();
 
     WEBCORE_EXPORT Image* image(); // Returns the nullImage() if the image is not available yet.
@@ -90,7 +90,7 @@ public:
 private:
     void clear();
 
-    CachedImage(CachedImage&, const ResourceRequest&, SessionID);
+    CachedImage(CachedImage&, const ResourceRequest&, PAL::SessionID);
 
     void setBodyDataFrom(const CachedResource&) final;
 
index d2d316d..d83509b 100644 (file)
@@ -36,7 +36,7 @@
 
 namespace WebCore {
 
-CachedRawResource::CachedRawResource(CachedResourceRequest&& request, Type type, SessionID sessionID)
+CachedRawResource::CachedRawResource(CachedResourceRequest&& request, Type type, PAL::SessionID sessionID)
     : CachedResource(WTFMove(request), type, sessionID)
     , m_identifier(0)
     , m_allowEncodedDataReplacement(true)
index bb5a5b8..15a8a86 100644 (file)
@@ -33,7 +33,7 @@ class SubresourceLoader;
 
 class CachedRawResource final : public CachedResource {
 public:
-    CachedRawResource(CachedResourceRequest&&, Type, SessionID);
+    CachedRawResource(CachedResourceRequest&&, Type, PAL::SessionID);
 
     // FIXME: AssociatedURLLoader shouldn't be a DocumentThreadableLoader and therefore shouldn't
     // use CachedRawResource. However, it is, and it needs to be able to defer loading.
index 12847d6..c32c429 100644 (file)
@@ -115,7 +115,7 @@ static Seconds deadDecodedDataDeletionIntervalForResourceType(CachedResource::Ty
 
 DEFINE_DEBUG_ONLY_GLOBAL(RefCountedLeakCounter, cachedResourceLeakCounter, ("CachedResource"));
 
-CachedResource::CachedResource(CachedResourceRequest&& request, Type type, SessionID sessionID)
+CachedResource::CachedResource(CachedResourceRequest&& request, Type type, PAL::SessionID sessionID)
     : m_resourceRequest(request.releaseResourceRequest())
     , m_originalRequestHeaders(request.releaseOriginalRequestHeaders())
     , m_options(request.options())
@@ -146,7 +146,7 @@ CachedResource::CachedResource(CachedResourceRequest&& request, Type type, Sessi
 }
 
 // FIXME: For this constructor, we should probably mandate that the URL has no fragment identifier.
-CachedResource::CachedResource(const URL& url, Type type, SessionID sessionID)
+CachedResource::CachedResource(const URL& url, Type type, PAL::SessionID sessionID)
     : m_resourceRequest(url)
     , m_decodedDataDeletionTimer(*this, &CachedResource::destroyDecodedData, deadDecodedDataDeletionIntervalForResourceType(type))
     , m_sessionID(sessionID)
index a613341..5435813 100644 (file)
@@ -30,8 +30,8 @@
 #include "ResourceLoaderOptions.h"
 #include "ResourceRequest.h"
 #include "ResourceResponse.h"
-#include "SessionID.h"
 #include "Timer.h"
+#include <pal/identifier/SessionID.h>
 #include <time.h>
 #include <wtf/HashCountedSet.h>
 #include <wtf/HashSet.h>
@@ -94,7 +94,7 @@ public:
         DecodeError
     };
 
-    CachedResource(CachedResourceRequest&&, Type, SessionID);
+    CachedResource(CachedResourceRequest&&, Type, PAL::SessionID);
     virtual ~CachedResource();
 
     virtual void load(CachedResourceLoader&);
@@ -115,7 +115,7 @@ public:
     const ResourceRequest& resourceRequest() const { return m_resourceRequest; }
     const URL& url() const { return m_resourceRequest.url();}
     const String& cachePartition() const { return m_resourceRequest.cachePartition(); }
-    SessionID sessionID() const { return m_sessionID; }
+    PAL::SessionID sessionID() const { return m_sessionID; }
     Type type() const { return m_type; }
 
     ResourceLoadPriority loadPriority() const { return m_loadPriority; }
@@ -281,7 +281,7 @@ public:
 
 protected:
     // CachedResource constructor that may be used when the CachedResource can already be filled with response data.
-    CachedResource(const URL&, Type, SessionID);
+    CachedResource(const URL&, Type, PAL::SessionID);
 
     void setEncodedSize(unsigned);
     void setDecodedSize(unsigned);
@@ -318,7 +318,7 @@ private:
     void failBeforeStarting();
 
     HashMap<CachedResourceClient*, std::unique_ptr<Callback>> m_clientsAwaitingCallback;
-    SessionID m_sessionID;
+    PAL::SessionID m_sessionID;
     ResourceLoadPriority m_loadPriority;
     std::chrono::system_clock::time_point m_responseTimestamp;
 
index 3c4c891..a1c3345 100644 (file)
 #include "ScriptController.h"
 #include "SecurityOrigin.h"
 #include "SecurityPolicy.h"
-#include "SessionID.h"
 #include "Settings.h"
 #include "StyleSheetContents.h"
 #include "SubresourceLoader.h"
 #include "UserContentController.h"
 #include "UserStyleSheet.h"
+#include <pal/identifier/SessionID.h>
 #include <wtf/text/CString.h>
 #include <wtf/text/WTFString.h>
 
@@ -94,7 +94,7 @@ static inline ResourceErrorOr<CachedResourceHandle<T>> castCachedResourceTo(Reso
     return makeUnexpected(cachedResource.error());
 }
 
-static CachedResource* createResource(CachedResource::Type type, CachedResourceRequest&& request, SessionID sessionID)
+static CachedResource* createResource(CachedResource::Type type, CachedResourceRequest&& request, PAL::SessionID sessionID)
 {
     switch (type) {
     case CachedResource::ImageResource:
@@ -179,9 +179,9 @@ Frame* CachedResourceLoader::frame() const
     return m_documentLoader ? m_documentLoader->frame() : nullptr;
 }
 
-SessionID CachedResourceLoader::sessionID() const
+PAL::SessionID CachedResourceLoader::sessionID() const
 {
-    SessionID sessionID = SessionID::defaultSessionID();
+    PAL::SessionID sessionID = PAL::SessionID::defaultSessionID();
 
     if (Frame* f = frame())
         sessionID = f->page()->sessionID();
index 496b161..4ccc886 100644 (file)
@@ -121,7 +121,7 @@ public:
     Document* document() const { return m_document; } // Can be null
     void setDocument(Document* document) { m_document = document; }
     void clearDocumentLoader() { m_documentLoader = nullptr; }
-    SessionID sessionID() const;
+    PAL::SessionID sessionID() const;
 
     void removeCachedResource(CachedResource&);
 
index 08b4016..6b66304 100644 (file)
@@ -27,7 +27,7 @@
 
 namespace WebCore {
 
-CachedSVGDocument::CachedSVGDocument(CachedResourceRequest&& request, SessionID sessionID)
+CachedSVGDocument::CachedSVGDocument(CachedResourceRequest&& request, PAL::SessionID sessionID)
     : CachedResource(WTFMove(request), SVGDocumentResource, sessionID)
     , m_decoder(TextResourceDecoder::create("application/xml"))
 {
index b3566fe..72e5d73 100644 (file)
@@ -30,7 +30,7 @@ namespace WebCore {
 
 class CachedSVGDocument final : public CachedResource {
 public:
-    explicit CachedSVGDocument(CachedResourceRequest&&, SessionID);
+    explicit CachedSVGDocument(CachedResourceRequest&&, PAL::SessionID);
     virtual ~CachedSVGDocument();
 
     SVGDocument* document() const { return m_document.get(); }
index a54761f..a0ca86e 100644 (file)
@@ -46,7 +46,7 @@
 
 namespace WebCore {
 
-CachedSVGFont::CachedSVGFont(CachedResourceRequest&& request, SessionID sessionID)
+CachedSVGFont::CachedSVGFont(CachedResourceRequest&& request, PAL::SessionID sessionID)
     : CachedFont(WTFMove(request), sessionID, SVGFontResource)
     , m_externalSVGFontElement(nullptr)
 {
index e8808c6..b1b0d55 100644 (file)
@@ -35,7 +35,7 @@ class SVGFontFaceElement;
 
 class CachedSVGFont final : public CachedFont {
 public:
-    CachedSVGFont(CachedResourceRequest&&, SessionID);
+    CachedSVGFont(CachedResourceRequest&&, PAL::SessionID);
 
     bool ensureCustomFontData(const AtomicString& remoteURI) override;
 
index b2bfcc1..51d60ff 100644 (file)
@@ -36,7 +36,7 @@
 
 namespace WebCore {
 
-CachedScript::CachedScript(CachedResourceRequest&& request, SessionID sessionID)
+CachedScript::CachedScript(CachedResourceRequest&& request, PAL::SessionID sessionID)
     : CachedResource(WTFMove(request), Script, sessionID)
     , m_decoder(TextResourceDecoder::create(ASCIILiteral("application/javascript"), request.charset()))
 {
index 6bb0f31..c0816ae 100644 (file)
@@ -33,7 +33,7 @@ class TextResourceDecoder;
 
 class CachedScript final : public CachedResource {
 public:
-    CachedScript(CachedResourceRequest&&, SessionID);
+    CachedScript(CachedResourceRequest&&, PAL::SessionID);
     virtual ~CachedScript();
 
     StringView script();
index 1d82bd7..fd3d0b8 100644 (file)
@@ -37,7 +37,7 @@
 
 namespace WebCore {
 
-CachedTextTrack::CachedTextTrack(CachedResourceRequest&& request, SessionID sessionID)
+CachedTextTrack::CachedTextTrack(CachedResourceRequest&& request, PAL::SessionID sessionID)
     : CachedResource(WTFMove(request), TextTrackResource, sessionID)
 {
 }
index 8d4a0e1..21ebc3f 100644 (file)
@@ -33,7 +33,7 @@ namespace WebCore {
 
 class CachedTextTrack final : public CachedResource {
 public:
-    CachedTextTrack(CachedResourceRequest&&, SessionID);
+    CachedTextTrack(CachedResourceRequest&&, PAL::SessionID);
 
 private:
     bool mayTryReplaceEncodedData() const override { return true; }
index c9f0dc8..94f1d10 100644 (file)
@@ -36,7 +36,7 @@ namespace WebCore {
 
 #if ENABLE(XSLT)
 
-CachedXSLStyleSheet::CachedXSLStyleSheet(CachedResourceRequest&& request, SessionID sessionID)
+CachedXSLStyleSheet::CachedXSLStyleSheet(CachedResourceRequest&& request, PAL::SessionID sessionID)
     : CachedResource(WTFMove(request), XSLStyleSheet, sessionID)
     , m_decoder(TextResourceDecoder::create("text/xsl"))
 {
index 3ef0f60..2d17a02 100644 (file)
@@ -35,7 +35,7 @@ class TextResourceDecoder;
 
 class CachedXSLStyleSheet final : public CachedResource {
 public:
-    CachedXSLStyleSheet(CachedResourceRequest&&, SessionID);
+    CachedXSLStyleSheet(CachedResourceRequest&&, PAL::SessionID);
     virtual ~CachedXSLStyleSheet();
 
     const String& sheet() const { return m_sheet; }
index 5186a1b..2a09b60 100644 (file)
@@ -72,13 +72,13 @@ MemoryCache::MemoryCache()
     static_assert(sizeof(long long) > sizeof(unsigned), "Numerical overflow can happen when adjusting the size of the cached memory.");
 }
 
-auto MemoryCache::sessionResourceMap(SessionID sessionID) const -> CachedResourceMap*
+auto MemoryCache::sessionResourceMap(PAL::SessionID sessionID) const -> CachedResourceMap*
 {
     ASSERT(sessionID.isValid());
     return m_sessionResources.get(sessionID);
 }
 
-auto MemoryCache::ensureSessionResourceMap(SessionID sessionID) -> CachedResourceMap&
+auto MemoryCache::ensureSessionResourceMap(PAL::SessionID sessionID) -> CachedResourceMap&
 {
     ASSERT(sessionID.isValid());
     auto& map = m_sessionResources.add(sessionID, nullptr).iterator->value;
@@ -167,7 +167,7 @@ void MemoryCache::revalidationFailed(CachedResource& revalidatingResource)
     revalidatingResource.clearResourceToRevalidate();
 }
 
-CachedResource* MemoryCache::resourceForRequest(const ResourceRequest& request, SessionID sessionID)
+CachedResource* MemoryCache::resourceForRequest(const ResourceRequest& request, PAL::SessionID sessionID)
 {
     // FIXME: Change all clients to make sure HTTP(s) URLs have no fragment identifiers before calling here.
     // CachedResourceLoader is now doing this. Add an assertion once all other clients are doing it too.
@@ -210,7 +210,7 @@ static CachedImageClient& dummyCachedImageClient()
 bool MemoryCache::addImageToCache(NativeImagePtr&& image, const URL& url, const String& domainForCachePartition)
 {
     ASSERT(image);
-    SessionID sessionID = SessionID::defaultSessionID();
+    PAL::SessionID sessionID = PAL::SessionID::defaultSessionID();
     removeImageFromCache(url, domainForCachePartition); // Remove cache entry if it already exists.
 
     RefPtr<BitmapImage> bitmapImage = BitmapImage::create(WTFMove(image), nullptr);
@@ -227,7 +227,7 @@ bool MemoryCache::addImageToCache(NativeImagePtr&& image, const URL& url, const
 
 void MemoryCache::removeImageFromCache(const URL& url, const String& domainForCachePartition)
 {
-    auto* resources = sessionResourceMap(SessionID::defaultSessionID());
+    auto* resources = sessionResourceMap(PAL::SessionID::defaultSessionID());
     if (!resources)
         return;
 
@@ -272,7 +272,7 @@ void MemoryCache::forEachResource(const WTF::Function<void(CachedResource&)>& fu
     }
 }
 
-void MemoryCache::forEachSessionResource(SessionID sessionID, const WTF::Function<void (CachedResource&)>& function)
+void MemoryCache::forEachSessionResource(PAL::SessionID sessionID, const WTF::Function<void (CachedResource&)>& function)
 {
     auto it = m_sessionResources.find(sessionID);
     if (it == m_sessionResources.end())
@@ -531,7 +531,7 @@ void MemoryCache::removeResourcesWithOrigin(SecurityOrigin& origin)
         remove(*resource);
 }
 
-void MemoryCache::removeResourcesWithOrigins(SessionID sessionID, const HashSet<RefPtr<SecurityOrigin>>& origins)
+void MemoryCache::removeResourcesWithOrigins(PAL::SessionID sessionID, const HashSet<RefPtr<SecurityOrigin>>& origins)
 {
     auto* resourceMap = sessionResourceMap(sessionID);
     if (!resourceMap)
@@ -572,7 +572,7 @@ void MemoryCache::getOriginsWithCache(SecurityOriginSet& origins)
     }
 }
 
-HashSet<RefPtr<SecurityOrigin>> MemoryCache::originsWithCache(SessionID sessionID) const
+HashSet<RefPtr<SecurityOrigin>> MemoryCache::originsWithCache(PAL::SessionID sessionID) const
 {
     HashSet<RefPtr<SecurityOrigin>> origins;
 
@@ -707,7 +707,7 @@ void MemoryCache::evictResources()
     setDisabled(false);
 }
 
-void MemoryCache::evictResources(SessionID sessionID)
+void MemoryCache::evictResources(PAL::SessionID sessionID)
 {
     if (disabled())
         return;
index 2c4dd10..f67c81c 100644 (file)
@@ -26,8 +26,8 @@
 
 #include "NativeImage.h"
 #include "SecurityOriginHash.h"
-#include "SessionID.h"
 #include "Timer.h"
+#include <pal/identifier/SessionID.h>
 #include <wtf/Forward.h>
 #include <wtf/Function.h>
 #include <wtf/HashMap.h>
@@ -92,7 +92,7 @@ public:
 
     WEBCORE_EXPORT static MemoryCache& singleton();
 
-    WEBCORE_EXPORT CachedResource* resourceForRequest(const ResourceRequest&, SessionID);
+    WEBCORE_EXPORT CachedResource* resourceForRequest(const ResourceRequest&, PAL::SessionID);
 
     bool add(CachedResource&);
     void remove(CachedResource&);
@@ -104,7 +104,7 @@ public:
     void revalidationFailed(CachedResource& revalidatingResource);
 
     void forEachResource(const WTF::Function<void(CachedResource&)>&);
-    void forEachSessionResource(SessionID, const WTF::Function<void(CachedResource&)>&);
+    void forEachSessionResource(PAL::SessionID, const WTF::Function<void(CachedResource&)>&);
     WEBCORE_EXPORT void destroyDecodedDataForAllImages();
 
     // Sets the cache's memory capacities, in bytes. These will hold only approximately,
@@ -120,7 +120,7 @@ public:
     bool disabled() const { return m_disabled; }
 
     WEBCORE_EXPORT void evictResources();
-    WEBCORE_EXPORT void evictResources(SessionID);
+    WEBCORE_EXPORT void evictResources(PAL::SessionID);
 
     void prune();
     void pruneSoon();
@@ -153,9 +153,9 @@ public:
 
     typedef HashSet<RefPtr<SecurityOrigin>> SecurityOriginSet;
     WEBCORE_EXPORT void removeResourcesWithOrigin(SecurityOrigin&);
-    WEBCORE_EXPORT void removeResourcesWithOrigins(SessionID, const HashSet<RefPtr<SecurityOrigin>>&);
+    WEBCORE_EXPORT void removeResourcesWithOrigins(PAL::SessionID, const HashSet<RefPtr<SecurityOrigin>>&);
     WEBCORE_EXPORT void getOriginsWithCache(SecurityOriginSet& origins);
-    WEBCORE_EXPORT HashSet<RefPtr<SecurityOrigin>> originsWithCache(SessionID) const;
+    WEBCORE_EXPORT HashSet<RefPtr<SecurityOrigin>> originsWithCache(PAL::SessionID) const;
 
     WEBCORE_EXPORT bool addImageToCache(NativeImagePtr&&, const URL&, const String& domainForCachePartition);
     WEBCORE_EXPORT void removeImageFromCache(const URL&, const String& domainForCachePartition);
@@ -187,8 +187,8 @@ private:
 
     CachedResource* resourceForRequestImpl(const ResourceRequest&, CachedResourceMap&);
 
-    CachedResourceMap& ensureSessionResourceMap(SessionID);
-    CachedResourceMap* sessionResourceMap(SessionID) const;
+    CachedResourceMap& ensureSessionResourceMap(PAL::SessionID);
+    CachedResourceMap* sessionResourceMap(PAL::SessionID) const;
 
     bool m_disabled;  // Whether or not the cache is enabled.
     bool m_inPruneResources;
@@ -211,7 +211,7 @@ private:
     
     // A URL-based map of all resources that are in the cache (including the freshest version of objects that are currently being 
     // referenced by a Web page).
-    typedef HashMap<SessionID, std::unique_ptr<CachedResourceMap>> SessionCachedResourceMap;
+    typedef HashMap<PAL::SessionID, std::unique_ptr<CachedResourceMap>> SessionCachedResourceMap;
     SessionCachedResourceMap m_sessionResources;
 
     Timer m_pruneTimer;
index 6304f1f..bdba1c9 100644 (file)
@@ -26,7 +26,7 @@
 #pragma once
 
 #include "ResourceRequest.h"
-#include "SessionID.h"
+#include <pal/identifier/SessionID.h>
 
 typedef const struct _CFCachedURLResponse* CFCachedURLResponseRef;
 
@@ -36,19 +36,19 @@ class SharedBuffer;
 
 class DiskCacheMonitor {
 public:
-    static void monitorFileBackingStoreCreation(const ResourceRequest&, SessionID, CFCachedURLResponseRef);
+    static void monitorFileBackingStoreCreation(const ResourceRequest&, PAL::SessionID, CFCachedURLResponseRef);
     static RefPtr<SharedBuffer> tryGetFileBackedSharedBufferFromCFURLCachedResponse(CFCachedURLResponseRef);
 
 private:
-    DiskCacheMonitor(const ResourceRequest&, SessionID, CFCachedURLResponseRef);
+    DiskCacheMonitor(const ResourceRequest&, PAL::SessionID, CFCachedURLResponseRef);
 
     void resourceBecameFileBacked(SharedBuffer&);
 
     const ResourceRequest& resourceRequest() const { return m_resourceRequest; }
-    SessionID sessionID() const { return m_sessionID; }
+    PAL::SessionID sessionID() const { return m_sessionID; }
 
     ResourceRequest m_resourceRequest;
-    SessionID m_sessionID;
+    PAL::SessionID m_sessionID;
 };
 
 } // namespace WebKit
index 3f18d26..a0fbb1a 100644 (file)
@@ -51,7 +51,7 @@ RefPtr<SharedBuffer> DiskCacheMonitor::tryGetFileBackedSharedBufferFromCFURLCach
     return SharedBuffer::create(data);
 }
 
-void DiskCacheMonitor::monitorFileBackingStoreCreation(const ResourceRequest& request, SessionID sessionID, CFCachedURLResponseRef cachedResponse)
+void DiskCacheMonitor::monitorFileBackingStoreCreation(const ResourceRequest& request, PAL::SessionID sessionID, CFCachedURLResponseRef cachedResponse)
 {
     if (!cachedResponse)
         return;
@@ -60,7 +60,7 @@ void DiskCacheMonitor::monitorFileBackingStoreCreation(const ResourceRequest& re
     new DiskCacheMonitor(request, sessionID, cachedResponse); // Balanced by delete and unique_ptr in the blocks set up in the constructor, one of which is guaranteed to run.
 }
 
-DiskCacheMonitor::DiskCacheMonitor(const ResourceRequest& request, SessionID sessionID, CFCachedURLResponseRef cachedResponse)
+DiskCacheMonitor::DiskCacheMonitor(const ResourceRequest& request, PAL::SessionID sessionID, CFCachedURLResponseRef cachedResponse)
     : m_resourceRequest(request)
     , m_sessionID(sessionID)
 {
index 5aec9f4..3f6c884 100644 (file)
@@ -26,7 +26,7 @@
 #pragma once
 
 #include "CacheStorageConnection.h"
-#include "SessionID.h"
+#include <pal/identifier/SessionID.h>
 #include <wtf/RefCounted.h>
 
 namespace WebCore {
@@ -34,7 +34,7 @@ namespace WebCore {
 class WEBCORE_EXPORT CacheStorageProvider : public RefCounted<CacheStorageProvider> {
 public:
     static Ref<CacheStorageProvider> create() { return adoptRef(*new CacheStorageProvider); }
-    virtual Ref<CacheStorageConnection> createCacheStorageConnection(SessionID) { return CacheStorageConnection::create(); }
+    virtual Ref<CacheStorageConnection> createCacheStorageConnection(PAL::SessionID) { return CacheStorageConnection::create(); }
     virtual ~CacheStorageProvider() { };
 
 protected:
index a76c791..f08e959 100644 (file)
 
 #include <wtf/RefCounted.h>
 
-namespace WebCore {
-
+namespace PAL {
 class SessionID;
+}
+
+namespace WebCore {
 
 namespace IDBClient {
 class IDBConnectionToServer;
@@ -40,7 +42,7 @@ public:
     virtual ~DatabaseProvider();
 
 #if ENABLE(INDEXED_DATABASE)
-    virtual IDBClient::IDBConnectionToServer& idbConnectionToServerForSession(const SessionID&) = 0;
+    virtual IDBClient::IDBConnectionToServer& idbConnectionToServerForSession(const PAL::SessionID&) = 0;
 #endif
 };
 
index 8df7a00..9182bc9 100644 (file)
@@ -229,7 +229,7 @@ Page::Page(PageConfiguration&& pageConfiguration)
     , m_storageNamespaceProvider(*WTFMove(pageConfiguration.storageNamespaceProvider))
     , m_userContentProvider(*WTFMove(pageConfiguration.userContentProvider))
     , m_visitedLinkStore(*WTFMove(pageConfiguration.visitedLinkStore))
-    , m_sessionID(SessionID::defaultSessionID())
+    , m_sessionID(PAL::SessionID::defaultSessionID())
     , m_isUtilityPage(isUtilityPageChromeClient(chrome().client()))
     , m_performanceMonitor(isUtilityPage() ? nullptr : std::make_unique<PerformanceMonitor>(*this))
     , m_lowPowerModeNotifier(std::make_unique<LowPowerModeNotifier>([this](bool isLowPowerModeEnabled) { handleLowModePowerChange(isLowPowerModeEnabled); }))
@@ -1428,9 +1428,9 @@ void Page::storageBlockingStateChanged()
 void Page::enableLegacyPrivateBrowsing(bool privateBrowsingEnabled)
 {
     // Don't allow changing the legacy private browsing state if we have set a session ID.
-    ASSERT(m_sessionID == SessionID::defaultSessionID() || m_sessionID == SessionID::legacyPrivateSessionID());
+    ASSERT(m_sessionID == PAL::SessionID::defaultSessionID() || m_sessionID == PAL::SessionID::legacyPrivateSessionID());
 
-    setSessionID(privateBrowsingEnabled ? SessionID::legacyPrivateSessionID() : SessionID::defaultSessionID());
+    setSessionID(privateBrowsingEnabled ? PAL::SessionID::legacyPrivateSessionID() : PAL::SessionID::defaultSessionID());
 }
 
 void Page::updateIsPlayingMedia(uint64_t sourceElementID)
@@ -2105,12 +2105,12 @@ void Page::setVisitedLinkStore(Ref<VisitedLinkStore>&& visitedLinkStore)
     invalidateStylesForAllLinks();
 }
 
-SessionID Page::sessionID() const
+PAL::SessionID Page::sessionID() const
 {
     return m_sessionID;
 }
 
-void Page::setSessionID(SessionID sessionID)
+void Page::setSessionID(PAL::SessionID sessionID)
 {
     ASSERT(sessionID.isValid());
 
index b54d762..23e94e7 100644 (file)
 #include "RTCController.h"
 #include "Region.h"
 #include "ScrollTypes.h"
-#include "SessionID.h"
 #include "Supplementable.h"
 #include "Timer.h"
 #include "UserInterfaceLayoutDirection.h"
 #include "ViewportArguments.h"
 #include "WheelEventTestTrigger.h"
 #include <memory>
+#include <pal/identifier/SessionID.h>
 #include <wtf/Forward.h>
 #include <wtf/Function.h>
 #include <wtf/HashSet.h>
@@ -510,8 +510,8 @@ public:
     VisitedLinkStore& visitedLinkStore();
     WEBCORE_EXPORT void setVisitedLinkStore(Ref<VisitedLinkStore>&&);
 
-    WEBCORE_EXPORT SessionID sessionID() const;
-    WEBCORE_EXPORT void setSessionID(SessionID);
+    WEBCORE_EXPORT PAL::SessionID sessionID() const;
+    WEBCORE_EXPORT void setSessionID(PAL::SessionID);
     WEBCORE_EXPORT void enableLegacyPrivateBrowsing(bool privateBrowsingEnabled);
     bool usesEphemeralSession() const { return m_sessionID.isEphemeral(); }
 
@@ -781,7 +781,7 @@ private:
     std::unique_ptr<ResourceUsageOverlay> m_resourceUsageOverlay;
 #endif
 
-    SessionID m_sessionID;
+    PAL::SessionID m_sessionID;
 
     bool m_isClosing { false };
 
index 25a6962..b8e91fb 100644 (file)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#include "SessionID.h"
+#include <pal/identifier/SessionID.h>
 #include <wtf/Forward.h>
 
 namespace WebCore {
@@ -34,7 +34,7 @@ class PlugInClient {
 public:
     virtual void pageDestroyed() = 0;
     virtual bool shouldAutoStartFromOrigin(const String& pageOrigin, const String& pluginOrigin, const String& mimeType) = 0;
-    virtual void didStartFromOrigin(const String& pageOrigin, const String& pluginOrigin, const String& mimeType, SessionID) = 0;
+    virtual void didStartFromOrigin(const String& pageOrigin, const String& pluginOrigin, const String& mimeType, PAL::SessionID) = 0;
 
 protected:
     virtual ~PlugInClient() { }
index a765d4d..078c27d 100644 (file)
@@ -30,7 +30,7 @@
 
 namespace WebCore {
     
-Ref<SocketStreamHandle> SocketProvider::createSocketStreamHandle(const URL& url, SocketStreamHandleClient& client, SessionID sessionID, const String& credentialPartition)
+Ref<SocketStreamHandle> SocketProvider::createSocketStreamHandle(const URL& url, SocketStreamHandleClient& client, PAL::SessionID sessionID, const String& credentialPartition)
 {
     return SocketStreamHandleImpl::create(url, client, sessionID, credentialPartition, { });
 }
index 559cad0..75c02e6 100644 (file)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#include "SessionID.h"
+#include <pal/identifier/SessionID.h>
 #include <wtf/ThreadSafeRefCounted.h>
 #include <wtf/text/WTFString.h>
 
@@ -39,7 +39,7 @@ class URL;
 class WEBCORE_EXPORT SocketProvider : public ThreadSafeRefCounted<SocketProvider> {
 public:
     static Ref<SocketProvider> create() { return adoptRef(*new SocketProvider); }
-    virtual Ref<SocketStreamHandle> createSocketStreamHandle(const URL&, SocketStreamHandleClient&, SessionID, const String& credentialPartition);
+    virtual Ref<SocketStreamHandle> createSocketStreamHandle(const URL&, SocketStreamHandleClient&, PAL::SessionID, const String& credentialPartition);
     virtual ~SocketProvider() { };
 };
 
index e049be3..5dc752e 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef CookiesStrategy_h
 #define CookiesStrategy_h
 
-#include "SessionID.h"
+#include <pal/identifier/SessionID.h>
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
 
@@ -42,7 +42,7 @@ public:
     virtual void setCookiesFromDOM(const NetworkStorageSession&, const URL& firstParty, const URL&, const String& cookieString) = 0;
     virtual bool cookiesEnabled(const NetworkStorageSession&, const URL& firstParty, const URL&) = 0;
     virtual String cookieRequestHeaderFieldValue(const NetworkStorageSession&, const URL& firstParty, const URL&) = 0;
-    virtual String cookieRequestHeaderFieldValue(SessionID, const URL& firstParty, const URL&) = 0;
+    virtual String cookieRequestHeaderFieldValue(PAL::SessionID, const URL& firstParty, const URL&) = 0;
     virtual bool getRawCookies(const NetworkStorageSession&, const URL& firstParty, const URL&, Vector<Cookie>&) = 0;
     virtual void deleteCookie(const NetworkStorageSession&, const URL&, const String& cookieName) = 0;
 
index 121a86c..403676a 100644 (file)
 #include "config.h"
 #include "WebCoreCrossThreadCopier.h"
 
-#include "SessionID.h"
 #include "ThreadSafeDataBuffer.h"
+#include <pal/identifier/SessionID.h>
 
 namespace WTF {
 
-CrossThreadCopierBase<false, false, WebCore::SessionID>::Type CrossThreadCopierBase<false, false, WebCore::SessionID>::copy(const WebCore::SessionID& sessionID)
+CrossThreadCopierBase<false, false, PAL::SessionID>::Type CrossThreadCopierBase<false, false, PAL::SessionID>::copy(const PAL::SessionID& sessionID)
 {
     return sessionID;
 }
index 7e3b9bc..b4c9239 100644 (file)
 
 #include <wtf/CrossThreadCopier.h>
 
-namespace WebCore {
+namespace PAL {
 class SessionID;
+}
+
+namespace WebCore {
 class ThreadSafeDataBuffer;
 }
 
 namespace WTF {
 
-template<> struct CrossThreadCopierBase<false, false, WebCore::SessionID> {
-    typedef WebCore::SessionID Type;
-    static Type copy(const WebCore::SessionID&);
+template<> struct CrossThreadCopierBase<false, false, PAL::SessionID> {
+    typedef PAL::SessionID Type;
+    static Type copy(const PAL::SessionID&);
 };
 
 template<> struct CrossThreadCopierBase<false, false, WebCore::ThreadSafeDataBuffer> {
index c526c41..22b8333 100644 (file)
@@ -339,7 +339,7 @@ CacheControlDirectives parseCacheControlDirectives(const HTTPHeaderMap& headers)
     return result;
 }
 
-static String headerValueForVary(const ResourceRequest& request, const String& headerName, SessionID sessionID)
+static String headerValueForVary(const ResourceRequest& request, const String& headerName, PAL::SessionID sessionID)
 {
     // Explicit handling for cookies is needed because they are added magically by the networking layer.
     // FIXME: The value might have changed between making the request and retrieving the cookie here.
@@ -348,7 +348,7 @@ static String headerValueForVary(const ResourceRequest& request, const String& h
     if (headerName == httpHeaderNameString(HTTPHeaderName::Cookie)) {
         auto* cookieStrategy = platformStrategies() ? platformStrategies()->cookiesStrategy() : nullptr;
         if (!cookieStrategy) {
-            ASSERT(sessionID == SessionID::defaultSessionID());
+            ASSERT(sessionID == PAL::SessionID::defaultSessionID());
             return cookieRequestHeaderFieldValue(NetworkStorageSession::defaultStorageSession(), request.firstPartyForCookies(), request.url());
         }
         return cookieStrategy->cookieRequestHeaderFieldValue(sessionID, request.firstPartyForCookies(), request.url());
@@ -356,7 +356,7 @@ static String headerValueForVary(const ResourceRequest& request, const String& h
     return request.httpHeaderField(headerName);
 }
 
-Vector<std::pair<String, String>> collectVaryingRequestHeaders(const WebCore::ResourceRequest& request, const WebCore::ResourceResponse& response, SessionID sessionID)
+Vector<std::pair<String, String>> collectVaryingRequestHeaders(const WebCore::ResourceRequest& request, const WebCore::ResourceResponse& response, PAL::SessionID sessionID)
 {
     String varyValue = response.httpHeaderField(WebCore::HTTPHeaderName::Vary);
     if (varyValue.isEmpty())
@@ -373,7 +373,7 @@ Vector<std::pair<String, String>> collectVaryingRequestHeaders(const WebCore::Re
     return varyingRequestHeaders;
 }
 
-bool verifyVaryingRequestHeaders(const Vector<std::pair<String, String>>& varyingRequestHeaders, const WebCore::ResourceRequest& request, SessionID sessionID)
+bool verifyVaryingRequestHeaders(const Vector<std::pair<String, String>>& varyingRequestHeaders, const WebCore::ResourceRequest& request, PAL::SessionID sessionID)
 {
     for (auto& varyingRequestHeader : varyingRequestHeaders) {
         // FIXME: Vary: * in response would ideally trigger a cache delete instead of a store.
index 443b231..efe50ea 100644 (file)
@@ -26,8 +26,8 @@
 #pragma once
 
 #include "PlatformExportMacros.h"
-#include "SessionID.h"
 #include <chrono>
+#include <pal/identifier/SessionID.h>
 #include <wtf/Optional.h>
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
@@ -70,8 +70,8 @@ struct CacheControlDirectives {
 };
 WEBCORE_EXPORT CacheControlDirectives parseCacheControlDirectives(const HTTPHeaderMap&);
 
-WEBCORE_EXPORT Vector<std::pair<String, String>> collectVaryingRequestHeaders(const ResourceRequest&, const ResourceResponse&, SessionID = SessionID::defaultSessionID());
-WEBCORE_EXPORT bool verifyVaryingRequestHeaders(const Vector<std::pair<String, String>>& varyingRequestHeaders, const ResourceRequest&, SessionID = SessionID::defaultSessionID());
+WEBCORE_EXPORT Vector<std::pair<String, String>> collectVaryingRequestHeaders(const ResourceRequest&, const ResourceResponse&, PAL::SessionID = PAL::SessionID::defaultSessionID());
+WEBCORE_EXPORT bool verifyVaryingRequestHeaders(const Vector<std::pair<String, String>>& varyingRequestHeaders, const ResourceRequest&, PAL::SessionID = PAL::SessionID::defaultSessionID());
 
 WEBCORE_EXPORT bool isStatusCodeCacheableByDefault(int statusCode);
 WEBCORE_EXPORT bool isStatusCodePotentiallyCacheable(int statusCode);
index 98da082..41688c0 100644 (file)
 #include "config.h"
 #include "NetworkStorageSession.h"
 
-#include "SessionID.h"
+#include <pal/identifier/SessionID.h>
 #include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
-HashMap<SessionID, std::unique_ptr<NetworkStorageSession>>& NetworkStorageSession::globalSessionMap()
+HashMap<PAL::SessionID, std::unique_ptr<NetworkStorageSession>>& NetworkStorageSession::globalSessionMap()
 {
-    static NeverDestroyed<HashMap<SessionID, std::unique_ptr<NetworkStorageSession>>> map;
+    static NeverDestroyed<HashMap<PAL::SessionID, std::unique_ptr<NetworkStorageSession>>> map;
     return map;
 }
 
-NetworkStorageSession* NetworkStorageSession::storageSession(SessionID sessionID)
+NetworkStorageSession* NetworkStorageSession::storageSession(PAL::SessionID sessionID)
 {
-    if (sessionID == SessionID::defaultSessionID())
+    if (sessionID == PAL::SessionID::defaultSessionID())
         return &defaultStorageSession();
     return globalSessionMap().get(sessionID);
 }
 
-void NetworkStorageSession::destroySession(SessionID sessionID)
+void NetworkStorageSession::destroySession(PAL::SessionID sessionID)
 {
-    ASSERT(sessionID != SessionID::defaultSessionID());
+    ASSERT(sessionID != PAL::SessionID::defaultSessionID());
     globalSessionMap().remove(sessionID);
 }
 
index ded26ca..b459fc3 100644 (file)
@@ -26,7 +26,7 @@
 #pragma once
 
 #include "CredentialStorage.h"
-#include "SessionID.h"
+#include <pal/identifier/SessionID.h>
 #include <wtf/Function.h>
 #include <wtf/HashSet.h>
 #include <wtf/text/WTFString.h>
@@ -62,15 +62,15 @@ class NetworkStorageSession {
     WTF_MAKE_NONCOPYABLE(NetworkStorageSession); WTF_MAKE_FAST_ALLOCATED;
 public:
     WEBCORE_EXPORT static NetworkStorageSession& defaultStorageSession();
-    WEBCORE_EXPORT static NetworkStorageSession* storageSession(SessionID);
-    WEBCORE_EXPORT static void ensurePrivateBrowsingSession(SessionID, const String& identifierBase = String());
-    WEBCORE_EXPORT static void ensureSession(SessionID, const String& identifierBase = String());
-    WEBCORE_EXPORT static void destroySession(SessionID);
+    WEBCORE_EXPORT static NetworkStorageSession* storageSession(PAL::SessionID);
+    WEBCORE_EXPORT static void ensurePrivateBrowsingSession(PAL::SessionID, const String& identifierBase = String());
+    WEBCORE_EXPORT static void ensureSession(PAL::SessionID, const String& identifierBase = String());
+    WEBCORE_EXPORT static void destroySession(PAL::SessionID);
     WEBCORE_EXPORT static void forEach(const WTF::Function<void(const WebCore::NetworkStorageSession&)>&);
 
     WEBCORE_EXPORT static void switchToNewTestingSession();
 
-    SessionID sessionID() const { return m_sessionID; }
+    PAL::SessionID sessionID() const { return m_sessionID; }
     CredentialStorage& credentialStorage() { return m_credentialStorage; }
 
 #ifdef __OBJC__
@@ -78,8 +78,8 @@ public:
 #endif
 
 #if PLATFORM(COCOA) || USE(CFURLCONNECTION)
-    WEBCORE_EXPORT static void ensureSession(SessionID, const String& identifierBase, RetainPtr<CFHTTPCookieStorageRef>&&);
-    NetworkStorageSession(SessionID, RetainPtr<CFURLStorageSessionRef>&&, RetainPtr<CFHTTPCookieStorageRef>&&);
+    WEBCORE_EXPORT static void ensureSession(PAL::SessionID, const String& identifierBase, RetainPtr<CFHTTPCookieStorageRef>&&);
+    NetworkStorageSession(PAL::SessionID, RetainPtr<CFURLStorageSessionRef>&&, RetainPtr<CFHTTPCookieStorageRef>&&);
 
     // May be null, in which case a Foundation default should be used.
     CFURLStorageSessionRef platformSession() { return m_platformSession.get(); }
@@ -91,7 +91,7 @@ public:
     WEBCORE_EXPORT void setShouldPartitionCookiesForHosts(const Vector<String>& domainsToRemove, const Vector<String>& domainsToAdd, bool clearFirst);
 #endif
 #elif USE(SOUP)
-    NetworkStorageSession(SessionID, std::unique_ptr<SoupNetworkSession>&&);
+    NetworkStorageSession(PAL::SessionID, std::unique_ptr<SoupNetworkSession>&&);
     ~NetworkStorageSession();
 
     SoupNetworkSession* soupNetworkSession() const { return m_session.get(); };
@@ -103,7 +103,7 @@ public:
     void getCredentialFromPersistentStorage(const ProtectionSpace&, Function<void (Credential&&)> completionHandler);
     void saveCredentialToPersistentStorage(const ProtectionSpace&, const Credential&);
 #else
-    NetworkStorageSession(SessionID, NetworkingContext*);
+    NetworkStorageSession(PAL::SessionID, NetworkingContext*);
     ~NetworkStorageSession();
 
     NetworkingContext* context() const;
@@ -117,8 +117,8 @@ public:
     WEBCORE_EXPORT void flushCookieStore();
 
 private:
-    static HashMap<SessionID, std::unique_ptr<NetworkStorageSession>>& globalSessionMap();
-    SessionID m_sessionID;
+    static HashMap<PAL::SessionID, std::unique_ptr<NetworkStorageSession>>& globalSessionMap();
+    PAL::SessionID m_sessionID;
 
 #if PLATFORM(COCOA) || USE(CFURLCONNECTION)
     RetainPtr<CFURLStorageSessionRef> m_platformSession;
index 4e1e33e..b2a657f 100644 (file)
@@ -34,7 +34,7 @@
 
 namespace WebCore {
 
-NetworkStorageSession::NetworkStorageSession(SessionID sessionID, NetworkingContext* context)
+NetworkStorageSession::NetworkStorageSession(PAL::SessionID sessionID, NetworkingContext* context)
     : m_sessionID(sessionID)
     , m_context(context)
 {
@@ -49,12 +49,12 @@ NetworkingContext* NetworkStorageSession::context() const
     return m_context.get();
 }
 
-void NetworkStorageSession::ensurePrivateBrowsingSession(SessionID, const String&)
+void NetworkStorageSession::ensurePrivateBrowsingSession(PAL::SessionID, const String&)
 {
     ASSERT_NOT_REACHED();
 }
 
-void NetworkStorageSession::ensureSession(SessionID, const String&)
+void NetworkStorageSession::ensureSession(PAL::SessionID, const String&)
 {
     ASSERT_NOT_REACHED();
 }
@@ -68,7 +68,7 @@ static std::unique_ptr<NetworkStorageSession>& defaultSession()
 NetworkStorageSession& NetworkStorageSession::defaultStorageSession()
 {
     if (!defaultSession())
-        defaultSession() = std::make_unique<NetworkStorageSession>(SessionID::defaultSessionID(), nullptr);
+        defaultSession() = std::make_unique<NetworkStorageSession>(PAL::SessionID::defaultSessionID(), nullptr);
     return *defaultSession();
 }
 
index 3e0854f..7e9032c 100644 (file)
@@ -69,7 +69,7 @@ static RetainPtr<CFURLStorageSessionRef> createCFStorageSessionForIdentifier(CFS
     return storageSession;
 }
 
-NetworkStorageSession::NetworkStorageSession(SessionID sessionID, RetainPtr<CFURLStorageSessionRef>&& platformSession, RetainPtr<CFHTTPCookieStorageRef>&& platformCookieStorage)
+NetworkStorageSession::NetworkStorageSession(PAL::SessionID sessionID, RetainPtr<CFURLStorageSessionRef>&& platformSession, RetainPtr<CFHTTPCookieStorageRef>&& platformCookieStorage)
     : m_sessionID(sessionID)
     , m_platformSession(WTFMove(platformSession))
 {
@@ -99,23 +99,23 @@ void NetworkStorageSession::switchToNewTestingSession()
     if (session)
         cookieStorage = adoptCF(_CFURLStorageSessionCopyCookieStorage(kCFAllocatorDefault, session.get()));
 
-    defaultNetworkStorageSession() = std::make_unique<NetworkStorageSession>(SessionID::defaultSessionID(), WTFMove(session), WTFMove(cookieStorage));
+    defaultNetworkStorageSession() = std::make_unique<NetworkStorageSession>(PAL::SessionID::defaultSessionID(), WTFMove(session), WTFMove(cookieStorage));
 }
 
 NetworkStorageSession& NetworkStorageSession::defaultStorageSession()
 {
     if (!defaultNetworkStorageSession())
-        defaultNetworkStorageSession() = std::make_unique<NetworkStorageSession>(SessionID::defaultSessionID(), nullptr, nullptr);
+        defaultNetworkStorageSession() = std::make_unique<NetworkStorageSession>(PAL::SessionID::defaultSessionID(), nullptr, nullptr);
     return *defaultNetworkStorageSession();
 }
 
-void NetworkStorageSession::ensurePrivateBrowsingSession(SessionID sessionID, const String& identifierBase)
+void NetworkStorageSession::ensurePrivateBrowsingSession(PAL::SessionID sessionID, const String& identifierBase)
 {
     ASSERT(sessionID.isEphemeral());
     ensureSession(sessionID, identifierBase);
 }
 
-void NetworkStorageSession::ensureSession(SessionID sessionID, const String& identifierBase, RetainPtr<CFHTTPCookieStorageRef>&& cookieStorage)
+void NetworkStorageSession::ensureSession(PAL::SessionID sessionID, const String& identifierBase, RetainPtr<CFHTTPCookieStorageRef>&& cookieStorage)
 {
     auto addResult = globalSessionMap().add(sessionID, nullptr);
     if (!addResult.isNewEntry)
@@ -139,7 +139,7 @@ void NetworkStorageSession::ensureSession(SessionID sessionID, const String& ide
     addResult.iterator->value = std::make_unique<NetworkStorageSession>(sessionID, WTFMove(storageSession), WTFMove(cookieStorage));
 }
 
-void NetworkStorageSession::ensureSession(SessionID sessionID, const String& identifierBase)
+void NetworkStorageSession::ensureSession(PAL::SessionID sessionID, const String& identifierBase)
 {
     ensureSession(sessionID, identifierBase, nullptr);
 }
index 09d2a87..5d6f23f 100644 (file)
@@ -31,8 +31,8 @@
 
 #pragma once
 
-#include "SessionID.h"
 #include "SocketStreamHandle.h"
+#include <pal/identifier/SessionID.h>
 #include <wtf/RetainPtr.h>
 #include <wtf/StreamBuffer.h>
 
@@ -46,7 +46,7 @@ class SocketStreamHandleClient;
 
 class SocketStreamHandleImpl : public SocketStreamHandle {
 public:
-    static Ref<SocketStreamHandleImpl> create(const URL& url, SocketStreamHandleClient& client, SessionID sessionID, const String& credentialPartition, SourceApplicationAuditToken&& auditData) { return adoptRef(*new SocketStreamHandleImpl(url, client, sessionID, credentialPartition, WTFMove(auditData))); }
+    static Ref<SocketStreamHandleImpl> create(const URL& url, SocketStreamHandleClient& client, PAL::SessionID sessionID, const String& credentialPartition, SourceApplicationAuditToken&& auditData) { return adoptRef(*new SocketStreamHandleImpl(url, client, sessionID, credentialPartition, WTFMove(auditData))); }
 
     virtual ~SocketStreamHandleImpl();
 
@@ -57,7 +57,7 @@ private:
     std::optional<size_t> platformSendInternal(const char*, size_t);
     bool sendPendingData();
 
-    WEBCORE_EXPORT SocketStreamHandleImpl(const URL&, SocketStreamHandleClient&, SessionID, const String& credentialPartition, SourceApplicationAuditToken&&);
+    WEBCORE_EXPORT SocketStreamHandleImpl(const URL&, SocketStreamHandleClient&, PAL::SessionID, const String& credentialPartition, SourceApplicationAuditToken&&);
     void createStreams();
     void scheduleStreams();
     void chooseProxy();
@@ -99,7 +99,7 @@ private:
     RetainPtr<CFWriteStreamRef> m_writeStream;
 
     RetainPtr<CFURLRef> m_httpsURL; // ws(s): replaced with https:
-    SessionID m_sessionID;
+    PAL::SessionID m_sessionID;
     String m_credentialPartition;
     SourceApplicationAuditToken m_auditData;
 
index 3366aa6..0998a1e 100644 (file)
@@ -64,7 +64,7 @@ extern "C" const CFStringRef _kCFStreamSocketSetNoDelay;
 
 namespace WebCore {
 
-SocketStreamHandleImpl::SocketStreamHandleImpl(const URL& url, SocketStreamHandleClient& client, SessionID sessionID, const String& credentialPartition, SourceApplicationAuditToken&& auditData)
+SocketStreamHandleImpl::SocketStreamHandleImpl(const URL& url, SocketStreamHandleClient& client, PAL::SessionID sessionID, const String& credentialPartition, SourceApplicationAuditToken&& auditData)
     : SocketStreamHandle(url, client)
     , m_connectingSubstate(New)
     , m_connectionType(Unknown)
index db3090e..80b980b 100644 (file)
@@ -37,8 +37,8 @@
 #include <winsock2.h>
 #endif
 
-#include "SessionID.h"
 #include <curl/curl.h>
+#include <pal/identifier/SessionID.h>
 #include <wtf/Deque.h>
 #include <wtf/Lock.h>
 #include <wtf/RefCounted.h>
@@ -51,7 +51,7 @@ class SocketStreamHandleClient;
 
 class SocketStreamHandleImpl : public SocketStreamHandle {
 public:
-    static Ref<SocketStreamHandleImpl> create(const URL& url, SocketStreamHandleClient& client, SessionID, const String&, SourceApplicationAuditToken&&) { return adoptRef(*new SocketStreamHandleImpl(url, client)); }
+    static Ref<SocketStreamHandleImpl> create(const URL& url, SocketStreamHandleClient& client, PAL::SessionID, const String&, SourceApplicationAuditToken&&) { return adoptRef(*new SocketStreamHandleImpl(url, client)); }
 
     virtual ~SocketStreamHandleImpl();
 
index 5c5fd75..0dfc665 100644 (file)
@@ -49,7 +49,7 @@
 
 namespace WebCore {
 
-NetworkStorageSession::NetworkStorageSession(SessionID sessionID, std::unique_ptr<SoupNetworkSession>&& session)
+NetworkStorageSession::NetworkStorageSession(PAL::SessionID sessionID, std::unique_ptr<SoupNetworkSession>&& session)
     : m_sessionID(sessionID)
     , m_session(WTFMove(session))
 {
@@ -75,25 +75,25 @@ static std::unique_ptr<NetworkStorageSession>& defaultSession()
 NetworkStorageSession& NetworkStorageSession::defaultStorageSession()
 {
     if (!defaultSession())
-        defaultSession() = std::make_unique<NetworkStorageSession>(SessionID::defaultSessionID(), nullptr);
+        defaultSession() = std::make_unique<NetworkStorageSession>(PAL::SessionID::defaultSessionID(), nullptr);
     return *defaultSession();
 }
 
-void NetworkStorageSession::ensurePrivateBrowsingSession(SessionID sessionID, const String&)
+void NetworkStorageSession::ensurePrivateBrowsingSession(PAL::SessionID sessionID, const String&)
 {
-    ASSERT(sessionID != SessionID::defaultSessionID());
+    ASSERT(sessionID != PAL::SessionID::defaultSessionID());
     ASSERT(!globalSessionMap().contains(sessionID));
     globalSessionMap().add(sessionID, std::make_unique<NetworkStorageSession>(sessionID, std::make_unique<SoupNetworkSession>()));
 }
 
-void NetworkStorageSession::ensureSession(SessionID, const String&)
+void NetworkStorageSession::ensureSession(PAL::SessionID, const String&)
 {
     // FIXME: Implement
 }
 
 void NetworkStorageSession::switchToNewTestingSession()
 {
-    defaultSession() = std::make_unique<NetworkStorageSession>(SessionID::defaultSessionID(), std::make_unique<SoupNetworkSession>());
+    defaultSession() = std::make_unique<NetworkStorageSession>(PAL::SessionID::defaultSessionID(), std::make_unique<SoupNetworkSession>());
 }
 
 SoupNetworkSession& NetworkStorageSession::getOrCreateSoupNetworkSession() const
index 9378995..fe02423 100644 (file)
@@ -36,7 +36,7 @@
 
 #if USE(SOUP)
 
-#include "SessionID.h"
+#include <pal/identifier/SessionID.h>
 #include <wtf/StreamBuffer.h>
 #include <wtf/glib/GRefPtr.h>
 
@@ -47,7 +47,7 @@ class SocketStreamHandleClient;
 
 class SocketStreamHandleImpl final : public SocketStreamHandle {
 public:
-    static Ref<SocketStreamHandleImpl> create(const URL&, SocketStreamHandleClient&, SessionID, const String&, SourceApplicationAuditToken&&);
+    static Ref<SocketStreamHandleImpl> create(const URL&, SocketStreamHandleClient&, PAL::SessionID, const String&, SourceApplicationAuditToken&&);
     static Ref<SocketStreamHandle> create(GSocketConnection*, SocketStreamHandleClient&);
 
     virtual ~SocketStreamHandleImpl();
index e8594e9..8e50bd6 100644 (file)
@@ -63,7 +63,7 @@ static void wssSocketClientEventCallback(GSocketClient*, GSocketClientEvent even
     g_signal_connect(connection, "accept-certificate", G_CALLBACK(wssConnectionAcceptCertificateCallback), nullptr);
 }
 
-Ref<SocketStreamHandleImpl> SocketStreamHandleImpl::create(const URL& url, SocketStreamHandleClient& client, SessionID, const String&, SourceApplicationAuditToken&&)
+Ref<SocketStreamHandleImpl> SocketStreamHandleImpl::create(const URL& url, SocketStreamHandleClient& client, PAL::SessionID, const String&, SourceApplicationAuditToken&&)
 {
     Ref<SocketStreamHandleImpl> socket = adoptRef(*new SocketStreamHandleImpl(url, client));
 
index 7b73f59..1210585 100644 (file)
@@ -41,7 +41,7 @@
 
 namespace WebCore {
 
-Ref<DedicatedWorkerGlobalScope> DedicatedWorkerGlobalScope::create(const URL& url, const String& identifier, const String& userAgent, DedicatedWorkerThread& thread, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider, SessionID sessionID)
+Ref<DedicatedWorkerGlobalScope> DedicatedWorkerGlobalScope::create(const URL& url, const String& identifier, const String& userAgent, DedicatedWorkerThread& thread, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider, PAL::SessionID sessionID)
 {
     auto context = adoptRef(*new DedicatedWorkerGlobalScope(url, identifier, userAgent, thread, shouldBypassMainWorldContentSecurityPolicy, WTFMove(topOrigin), timeOrigin, connectionProxy, socketProvider, sessionID));
     if (!shouldBypassMainWorldContentSecurityPolicy)
@@ -49,7 +49,7 @@ Ref<DedicatedWorkerGlobalScope> DedicatedWorkerGlobalScope::create(const URL& ur
     return context;
 }
 
-DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope(const URL& url, const String& identifier, const String& userAgent, DedicatedWorkerThread& thread, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider, SessionID sessionID)
+DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope(const URL& url, const String& identifier, const String& userAgent, DedicatedWorkerThread& thread, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider, PAL::SessionID sessionID)
     : WorkerGlobalScope(url, identifier, userAgent, thread, shouldBypassMainWorldContentSecurityPolicy, WTFMove(topOrigin), timeOrigin, connectionProxy, socketProvider, sessionID)
 {
 }
index 2d508f1..34edec0 100644 (file)
@@ -48,7 +48,7 @@ class SerializedScriptValue;
 
 class DedicatedWorkerGlobalScope final : public WorkerGlobalScope {
 public:
-    static Ref<DedicatedWorkerGlobalScope> create(const URL&, const String& identifier, const String& userAgent, DedicatedWorkerThread&, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*, SessionID);
+    static Ref<DedicatedWorkerGlobalScope> create(const URL&, const String& identifier, const String& userAgent, DedicatedWorkerThread&, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*, PAL::SessionID);
     virtual ~DedicatedWorkerGlobalScope();
 
     ExceptionOr<void> postMessage(JSC::ExecState&, JSC::JSValue message, Vector<JSC::Strong<JSC::JSObject>>&&);
@@ -58,7 +58,7 @@ public:
 private:
     using Base = WorkerGlobalScope;
 
-    DedicatedWorkerGlobalScope(const URL&, const String& identifier, const String& userAgent, DedicatedWorkerThread&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*, SessionID);
+    DedicatedWorkerGlobalScope(const URL&, const String& identifier, const String& userAgent, DedicatedWorkerThread&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*, PAL::SessionID);
 
     bool isDedicatedWorkerGlobalScope() const final { return true; }
     ExceptionOr<void> importScripts(const Vector<String>& urls) final;
index a4838b4..5092bc9 100644 (file)
@@ -38,7 +38,7 @@
 
 namespace WebCore {
 
-DedicatedWorkerThread::DedicatedWorkerThread(const URL& url, const String& identifier, const String& userAgent, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerObjectProxy& workerObjectProxy, WorkerThreadStartMode startMode, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider, JSC::RuntimeFlags runtimeFlags, SessionID sessionID)
+DedicatedWorkerThread::DedicatedWorkerThread(const URL& url, const String& identifier, const String& userAgent, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerObjectProxy& workerObjectProxy, WorkerThreadStartMode startMode, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider, JSC::RuntimeFlags runtimeFlags, PAL::SessionID sessionID)
     : WorkerThread(url, identifier, userAgent, sourceCode, workerLoaderProxy, workerObjectProxy, startMode, contentSecurityPolicyResponseHeaders, shouldBypassMainWorldContentSecurityPolicy, topOrigin, timeOrigin, connectionProxy, socketProvider, runtimeFlags, sessionID)
     , m_workerObjectProxy(workerObjectProxy)
 {
@@ -48,7 +48,7 @@ DedicatedWorkerThread::~DedicatedWorkerThread()
 {
 }
 
-Ref<WorkerGlobalScope> DedicatedWorkerThread::createWorkerGlobalScope(const URL& url, const String& identifier, const String& userAgent, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, SessionID sessionID)
+Ref<WorkerGlobalScope> DedicatedWorkerThread::createWorkerGlobalScope(const URL& url, const String& identifier, const String& userAgent, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, PAL::SessionID sessionID)
 {
     return DedicatedWorkerGlobalScope::create(url, identifier, userAgent, *this, contentSecurityPolicyResponseHeaders, shouldBypassMainWorldContentSecurityPolicy, WTFMove(topOrigin), timeOrigin, idbConnectionProxy(), socketProvider(), sessionID);
 }
index ec012f5..775b0c0 100644 (file)
@@ -49,11 +49,11 @@ public:
     WorkerObjectProxy& workerObjectProxy() const { return m_workerObjectProxy; }
 
 protected:
-    Ref<WorkerGlobalScope> createWorkerGlobalScope(const URL&, const String& identifier, const String& userAgent, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, SessionID) override;
+    Ref<WorkerGlobalScope> createWorkerGlobalScope(const URL&, const String& identifier, const String& userAgent, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, PAL::SessionID) override;
     void runEventLoop() override;
 
 private:
-    DedicatedWorkerThread(const URL&, const String& identifier, const String& userAgent, const String& sourceCode, WorkerLoaderProxy&, WorkerObjectProxy&, WorkerThreadStartMode, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*, JSC::RuntimeFlags, SessionID);
+    DedicatedWorkerThread(const URL&, const String& identifier, const String& userAgent, const String& sourceCode, WorkerLoaderProxy&, WorkerObjectProxy&, WorkerThreadStartMode, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*, JSC::RuntimeFlags, PAL::SessionID);
 
     WorkerObjectProxy& m_workerObjectProxy;
 };
index 43612d2..8290314 100644 (file)
@@ -167,7 +167,7 @@ void Worker::didReceiveResponse(unsigned long identifier, const ResourceResponse
 void Worker::notifyFinished()
 {
     auto* context = scriptExecutionContext();
-    SessionID sessionID = context ? context->sessionID() : SessionID();
+    PAL::SessionID sessionID = context ? context->sessionID() : PAL::SessionID();
 
     if (m_scriptLoader->failed() || !sessionID.isValid())
         dispatchEvent(Event::create(eventNames().errorEvent, false, true));
index d9ad59a..88b32fa 100644 (file)
@@ -52,7 +52,7 @@ using namespace Inspector;
 
 namespace WebCore {
 
-WorkerGlobalScope::WorkerGlobalScope(const URL& url, const String& identifier, const String& userAgent, WorkerThread& thread, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider, SessionID sessionID)
+WorkerGlobalScope::WorkerGlobalScope(const URL& url, const String& identifier, const String& userAgent, WorkerThread& thread, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider, PAL::SessionID sessionID)
     : m_url(url)
     , m_identifier(identifier)
     , m_userAgent(userAgent)
index 0491d7c..b890004 100644 (file)
@@ -30,7 +30,6 @@
 #include "CacheStorageConnection.h"
 #include "EventTarget.h"
 #include "ScriptExecutionContext.h"
-#include "SessionID.h"
 #include "Supplementable.h"
 #include "URL.h"
 #include "WorkerCacheStorageConnection.h"
@@ -38,6 +37,7 @@
 #include "WorkerScriptController.h"
 #include <inspector/ConsoleMessage.h>
 #include <memory>
+#include <pal/identifier/SessionID.h>
 
 namespace WebCore {
 
@@ -112,7 +112,7 @@ public:
     void removeAllEventListeners() final;
 
 protected:
-    WorkerGlobalScope(const URL&, const String& identifier, const String& userAgent, WorkerThread&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*, SessionID);
+    WorkerGlobalScope(const URL&, const String& identifier, const String& userAgent, WorkerThread&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*, PAL::SessionID);
 
     void applyContentSecurityPolicyResponseHeaders(const ContentSecurityPolicyResponseHeaders&);
 
@@ -134,7 +134,7 @@ private:
 
     ScriptExecutionContext* scriptExecutionContext() const final { return const_cast<WorkerGlobalScope*>(this); }
     URL completeURL(const String&) const final;
-    SessionID sessionID() const final { return m_sessionID; }
+    PAL::SessionID sessionID() const final { return m_sessionID; }
     String userAgent(const URL&) const final;
     void disableEval(const String& errorMessage) final;
     void disableWebAssembly(const String& errorMessage) final;
@@ -186,7 +186,7 @@ private:
     RefPtr<Performance> m_performance;
     mutable RefPtr<Crypto> m_crypto;
 
-    SessionID m_sessionID;
+    PAL::SessionID m_sessionID;
     RefPtr<WorkerCacheStorageConnection> m_cacheStorageConnection;
 };
 
index 67adf70..c1df49c 100644 (file)
 #include <runtime/RuntimeFlags.h>
 #include <wtf/MonotonicTime.h>
 
+namespace PAL {
+class SessionID;
+}
+
 namespace WebCore {
 
 class ContentSecurityPolicyResponseHeaders;
-class SessionID;
 class URL;
 class Worker;
 
@@ -47,7 +50,7 @@ class WorkerGlobalScopeProxy {
 public:
     static WorkerGlobalScopeProxy& create(Worker&);
 
-    virtual void startWorkerGlobalScope(const URL& scriptURL, const String& userAgent, const String& sourceCode, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, MonotonicTime timeOrigin, JSC::RuntimeFlags, SessionID) = 0;
+    virtual void startWorkerGlobalScope(const URL& scriptURL, const String& userAgent, const String& sourceCode, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, MonotonicTime timeOrigin, JSC::RuntimeFlags, PAL::SessionID) = 0;
     virtual void terminateWorkerGlobalScope() = 0;
     virtual void postMessageToWorkerGlobalScope(RefPtr<SerializedScriptValue>&&, std::unique_ptr<MessagePortChannelArray>) = 0;
     virtual bool hasPendingActivity() const = 0;
index 19653d8..4b2ac13 100644 (file)
@@ -70,7 +70,7 @@ WorkerMessagingProxy::~WorkerMessagingProxy()
         || (is<WorkerGlobalScope>(*m_scriptExecutionContext) && currentThread() == downcast<WorkerGlobalScope>(*m_scriptExecutionContext).thread().threadID()));
 }
 
-void WorkerMessagingProxy::startWorkerGlobalScope(const URL& scriptURL, const String& userAgent, const String& sourceCode, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, MonotonicTime timeOrigin, JSC::RuntimeFlags runtimeFlags, SessionID sessionID)
+void WorkerMessagingProxy::startWorkerGlobalScope(const URL& scriptURL, const String& userAgent, const String& sourceCode, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, MonotonicTime timeOrigin, JSC::RuntimeFlags runtimeFlags, PAL::SessionID sessionID)
 {
     // FIXME: This need to be revisited when we support nested worker one day
     ASSERT(m_scriptExecutionContext);
index 793a4c5..c123e3f 100644 (file)
@@ -45,7 +45,7 @@ public:
 private:
     // Implementations of WorkerGlobalScopeProxy.
     // (Only use these functions in the worker object thread.)
-    void startWorkerGlobalScope(const URL& scriptURL, const String& userAgent, const String& sourceCode, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, MonotonicTime timeOrigin, JSC::RuntimeFlags, SessionID) final;
+    void startWorkerGlobalScope(const URL& scriptURL, const String& userAgent, const String& sourceCode, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, MonotonicTime timeOrigin, JSC::RuntimeFlags, PAL::SessionID) final;
     void terminateWorkerGlobalScope() final;
     void postMessageToWorkerGlobalScope(RefPtr<SerializedScriptValue>&&, std::unique_ptr<MessagePortChannelArray>) final;
     bool hasPendingActivity() const final;
index f6ab9e4..a6b7112 100644 (file)
@@ -72,7 +72,7 @@ unsigned WorkerThread::workerThreadCount()
 struct WorkerThreadStartupData {
     WTF_MAKE_NONCOPYABLE(WorkerThreadStartupData); WTF_MAKE_FAST_ALLOCATED;
 public:
-    WorkerThreadStartupData(const URL& scriptURL, const String& identifier, const String& userAgent, const String& sourceCode, WorkerThreadStartMode, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, SessionID);
+    WorkerThreadStartupData(const URL& scriptURL, const String& identifier, const String& userAgent, const String& sourceCode, WorkerThreadStartMode, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, PAL::SessionID);
 
     URL m_scriptURL;
     String m_identifier;
@@ -83,10 +83,10 @@ public:
     bool m_shouldBypassMainWorldContentSecurityPolicy;
     Ref<SecurityOrigin> m_topOrigin;
     MonotonicTime m_timeOrigin;
-    SessionID m_sessionID;
+    PAL::SessionID m_sessionID;
 };
 
-WorkerThreadStartupData::WorkerThreadStartupData(const URL& scriptURL, const String& identifier, const String& userAgent, const String& sourceCode, WorkerThreadStartMode startMode, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, SessionID sessionID)
+WorkerThreadStartupData::WorkerThreadStartupData(const URL& scriptURL, const String& identifier, const String& userAgent, const String& sourceCode, WorkerThreadStartMode startMode, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, PAL::SessionID sessionID)
     : m_scriptURL(scriptURL.isolatedCopy())
     , m_identifier(identifier.isolatedCopy())
     , m_userAgent(userAgent.isolatedCopy())
@@ -100,7 +100,7 @@ WorkerThreadStartupData::WorkerThreadStartupData(const URL& scriptURL, const Str
 {
 }
 
-WorkerThread::WorkerThread(const URL& scriptURL, const String& identifier, const String& userAgent, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerReportingProxy& workerReportingProxy, WorkerThreadStartMode startMode, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider, JSC::RuntimeFlags runtimeFlags, SessionID sessionID)
+WorkerThread::WorkerThread(const URL& scriptURL, const String& identifier, const String& userAgent, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerReportingProxy& workerReportingProxy, WorkerThreadStartMode startMode, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider, JSC::RuntimeFlags runtimeFlags, PAL::SessionID sessionID)
     : m_workerLoaderProxy(workerLoaderProxy)
     , m_workerReportingProxy(workerReportingProxy)
     , m_runtimeFlags(runtimeFlags)
index c593229..cfe343e 100644 (file)
 #include <wtf/Forward.h>
 #include <wtf/RefCounted.h>
 
+namespace PAL {
+class SessionID;
+}
+
 namespace WebCore {
 
 class ContentSecurityPolicyResponseHeaders;
 class URL;
 class NotificationClient;
 class SecurityOrigin;
-class SessionID;
 class SocketProvider;
 class WorkerGlobalScope;
 class WorkerLoaderProxy;
@@ -81,10 +84,10 @@ public:
     JSC::RuntimeFlags runtimeFlags() const { return m_runtimeFlags; }
 
 protected:
-    WorkerThread(const URL&, const String& identifier, const String& userAgent, const String& sourceCode, WorkerLoaderProxy&, WorkerReportingProxy&, WorkerThreadStartMode, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*, JSC::RuntimeFlags, SessionID);
+    WorkerThread(const URL&, const String& identifier, const String& userAgent, const String& sourceCode, WorkerLoaderProxy&, WorkerReportingProxy&, WorkerThreadStartMode, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*, JSC::RuntimeFlags, PAL::SessionID);
 
     // Factory method for creating a new worker context for the thread.
-    virtual Ref<WorkerGlobalScope> createWorkerGlobalScope(const URL&, const String& identifier, const String& userAgent, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, SessionID) = 0;
+    virtual Ref<WorkerGlobalScope> createWorkerGlobalScope(const URL&, const String& identifier, const String& userAgent, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, PAL::SessionID) = 0;
 
     // Executes the event loop for the worker thread. Derived classes can override to perform actions before/after entering the event loop.
     virtual void runEventLoop();
index 102c2fc..0e42bc4 100644 (file)
@@ -33,7 +33,7 @@
 #include "ServiceWorkerJobClient.h"
 #include "ServiceWorkerRegistration.h"
 #include "ServiceWorkerRegistrationOptions.h"
-#include "SessionID.h"
+#include <pal/identifier/SessionID.h>
 #include <wtf/Threading.h>
 
 namespace WebCore {
index ba7434a..1f92a7f 100644 (file)
 
 #include "SecurityOriginData.h"
 #include "ServiceWorkerRegistrationOptions.h"
-#include "SessionID.h"
 #include "URL.h"
+#include <pal/identifier/SessionID.h>
 
 namespace WebCore {
 
 struct ServiceWorkerRegistrationParameters {
-    SessionID sessionID;
+    PAL::SessionID sessionID;
     URL scriptURL;
     URL clientCreationURL;
     SecurityOriginData topOrigin;
index 7440f3a..011a84b 100644 (file)
@@ -1,3 +1,279 @@
+2017-08-17  Don Olmstead  <don.olmstead@sony.com>
+
+        [PAL] Move SessionID into PAL
+        https://bugs.webkit.org/show_bug.cgi?id=174192
+
+        Reviewed by Antti Koivisto.
+
+        * NetworkProcess/Downloads/Download.cpp:
+        (WebKit::Download::Download):
+        * NetworkProcess/Downloads/Download.h:
+        (WebKit::Download::Download):
+        * NetworkProcess/Downloads/DownloadManager.cpp:
+        (WebKit::DownloadManager::startDownload):
+        (WebKit::DownloadManager::resumeDownload):
+        * NetworkProcess/Downloads/DownloadManager.h:
+        (WebKit::DownloadManager::startDownload):
+        * NetworkProcess/NetworkCORSPreflightChecker.h:
+        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+        (WebKit::NetworkConnectionToWebProcess::createSocketStream):
+        (WebKit::storageSession):
+        (WebKit::NetworkConnectionToWebProcess::startDownload):
+        (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
+        (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
+        (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
+        (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
+        (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
+        (WebKit::NetworkConnectionToWebProcess::getRawCookies):
+        (WebKit::NetworkConnectionToWebProcess::deleteCookie):
+        (WebKit::NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession):
+        * NetworkProcess/NetworkConnectionToWebProcess.h:
+        (WebKit::NetworkConnectionToWebProcess::startDownload):
+        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
+        * NetworkProcess/NetworkLoad.cpp:
+        * NetworkProcess/NetworkLoadParameters.h:
+        * NetworkProcess/NetworkProcess.cpp:
+        (WebKit::NetworkProcess::initializeNetworkProcess):
+        (WebKit::NetworkProcess::destroySession):
+        (WebKit::fetchDiskCacheEntries):
+        (WebKit::NetworkProcess::fetchWebsiteData):
+        (WebKit::NetworkProcess::deleteWebsiteData):
+        (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
+        (WebKit::NetworkProcess::downloadRequest):
+        (WebKit::NetworkProcess::resumeDownload):
+        * NetworkProcess/NetworkProcess.h:
+        * NetworkProcess/NetworkProcess.messages.in:
+        * NetworkProcess/NetworkResourceLoadParameters.h:
+        * NetworkProcess/NetworkResourceLoader.h:
+        * NetworkProcess/NetworkSession.cpp:
+        (WebKit::NetworkSession::create):
+        (WebKit::NetworkSession::defaultSession):
+        (WebKit::NetworkSession::NetworkSession):
+        * NetworkProcess/NetworkSession.h:
+        (WebKit::NetworkSession::sessionID const):
+        * NetworkProcess/NetworkSocketStream.cpp:
+        (WebKit::NetworkSocketStream::create):
+        (WebKit::NetworkSocketStream::NetworkSocketStream):
+        * NetworkProcess/NetworkSocketStream.h:
+        * NetworkProcess/RemoteNetworkingContext.h:
+        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
+        (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
+        * NetworkProcess/cocoa/NetworkSessionCocoa.h:
+        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+        (WebKit::configurationForSessionID):
+        (WebKit::NetworkSessionCocoa::create):
+        (WebKit::NetworkSessionCocoa::defaultSession):
+        (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
+        * NetworkProcess/soup/NetworkSessionSoup.cpp:
+        (WebKit::NetworkSessionSoup::NetworkSessionSoup):
+        * NetworkProcess/soup/NetworkSessionSoup.h:
+        * Scripts/webkit/messages.py:
+        (forward_declarations_and_headers.templates): Deleted.
+        (class_template_headers.template): Deleted.
+        * Shared/ChildProcess.cpp:
+        (WebKit::ChildProcess::initialize):
+        * Shared/SessionTracker.cpp:
+        (WebKit::staticSessionMap):
+        (WebKit::SessionTracker::networkSession):
+        (WebKit::SessionTracker::setSession):
+        (WebKit::SessionTracker::destroySession):
+        * Shared/SessionTracker.h:
+        * Shared/Storage/StorageProcessCreationParameters.h:
+        * Shared/WebCoreArgumentCoders.cpp:
+        * Shared/WebCoreArgumentCoders.h:
+        * Shared/WebPageCreationParameters.h:
+        * Shared/WebProcessCreationParameters.h:
+        * Shared/WebsiteDataStoreParameters.h:
+        * Shared/mac/CookieStorageShim.mm:
+        (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
+        * StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp:
+        (WebKit::WebIDBConnectionToClient::create):
+        (WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient):
+        * StorageProcess/IndexedDB/WebIDBConnectionToClient.h:
+        * StorageProcess/StorageProcess.cpp:
+        (WebKit::StorageProcess::idbServer):
+        (WebKit::StorageProcess::fetchWebsiteData):
+        (WebKit::StorageProcess::deleteWebsiteData):
+        (WebKit::StorageProcess::deleteWebsiteDataForOrigins):
+        * StorageProcess/StorageProcess.h:
+        * StorageProcess/StorageProcess.messages.in:
+        * StorageProcess/StorageToWebProcessConnection.cpp:
+        (WebKit::StorageToWebProcessConnection::establishIDBConnectionToServer):
+        * StorageProcess/StorageToWebProcessConnection.h:
+        * StorageProcess/StorageToWebProcessConnection.messages.in:
+        * UIProcess/API/APIPageConfiguration.cpp:
+        (API::PageConfiguration::setWebsiteDataStore):
+        (API::PageConfiguration::sessionID):
+        (API::PageConfiguration::setSessionID):
+        * UIProcess/API/APIPageConfiguration.h:
+        * UIProcess/API/APIWebsiteDataStore.cpp:
+        (API::WebsiteDataStore::defaultDataStore):
+        (API::WebsiteDataStore::createLegacy):
+        (API::WebsiteDataStore::WebsiteDataStore):
+        * UIProcess/API/APIWebsiteDataStore.h:
+        * UIProcess/API/C/WKCookieManager.cpp:
+        (WKCookieManagerGetHostnamesWithCookies):
+        (WKCookieManagerDeleteCookiesForHostname):
+        (WKCookieManagerDeleteAllCookies):
+        (WKCookieManagerDeleteAllCookiesModifiedAfterDate):
+        (WKCookieManagerSetHTTPCookieAcceptPolicy):
+        (WKCookieManagerGetHTTPCookieAcceptPolicy):
+        (WKCookieManagerStartObservingCookieChanges):
+        (WKCookieManagerStopObservingCookieChanges):
+        * UIProcess/API/Cocoa/WKProcessPool.mm:
+        (-[WKProcessPool _setCookieAcceptPolicy:]):
+        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
+        (-[WKWebsiteDataStore _initWithConfiguration:]):
+        * UIProcess/API/glib/WebKitCookieManager.cpp:
+        (webkit_cookie_manager_set_accept_policy):
+        (webkit_cookie_manager_get_accept_policy):
+        * UIProcess/Network/NetworkProcessProxy.cpp:
+        (WebKit::NetworkProcessProxy::fetchWebsiteData):
+        (WebKit::NetworkProcessProxy::deleteWebsiteData):
+        (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
+        * UIProcess/Network/NetworkProcessProxy.h:
+        * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
+        (WebKit::PlugInAutoStartProvider::PlugInAutoStartProvider):
+        (WebKit::PlugInAutoStartProvider::addAutoStartOriginHash):
+        (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy const):
+        (WebKit::PlugInAutoStartProvider::setAutoStartOriginsTableWithItemsPassingTest):
+        (WebKit::PlugInAutoStartProvider::didReceiveUserInteraction):
+        * UIProcess/Plugins/PlugInAutoStartProvider.h:
+        * UIProcess/Storage/StorageProcessProxy.cpp:
+        (WebKit::StorageProcessProxy::fetchWebsiteData):
+        (WebKit::StorageProcessProxy::deleteWebsiteData):
+        (WebKit::StorageProcessProxy::deleteWebsiteDataForOrigins):
+        * UIProcess/Storage/StorageProcessProxy.h:
+        * UIProcess/WebCookieManagerProxy.cpp:
+        (WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
+        (WebKit::WebCookieManagerProxy::deleteCookiesForHostname):
+        (WebKit::WebCookieManagerProxy::deleteAllCookies):
+        (WebKit::WebCookieManagerProxy::deleteCookie):
+        (WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
+        (WebKit::WebCookieManagerProxy::setCookie):
+        (WebKit::WebCookieManagerProxy::setCookies):
+        (WebKit::WebCookieManagerProxy::getAllCookies):
+        (WebKit::WebCookieManagerProxy::getCookies):
+        (WebKit::WebCookieManagerProxy::startObservingCookieChanges):
+        (WebKit::WebCookieManagerProxy::stopObservingCookieChanges):
+        (WebKit::WebCookieManagerProxy::setCookieObserverCallback):
+        (WebKit::WebCookieManagerProxy::registerObserver):
+        (WebKit::WebCookieManagerProxy::unregisterObserver):
+        (WebKit::WebCookieManagerProxy::cookiesDidChange):
+        (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
+        (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
+        * UIProcess/WebCookieManagerProxy.h:
+        * UIProcess/WebCookieManagerProxy.messages.in:
+        * UIProcess/WebPageProxy.h:
+        (WebKit::WebPageProxy::sessionID const):
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
+        (WebKit::WebProcessPool::createNewWebProcess):
+        (WebKit::WebProcessPool::createWebPage):
+        (WebKit::WebProcessPool::pageAddedToProcess):
+        (WebKit::WebProcessPool::pageRemovedFromProcess):
+        (WebKit::WebProcessPool::download):
+        (WebKit::WebProcessPool::resumeDownload):
+        (WebKit::WebProcessPool::addPlugInAutoStartOriginHash):
+        (WebKit::WebProcessPool::plugInDidReceiveUserInteraction):
+        * UIProcess/WebProcessPool.h:
+        * UIProcess/WebProcessPool.messages.in:
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
+        (WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebsiteData):
+        (WebKit::WebProcessProxy::fetchWebsiteData):
+        (WebKit::WebProcessProxy::deleteWebsiteData):
+        (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
+        * UIProcess/WebProcessProxy.h:
+        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
+        (WebKit::WebsiteDataStore::createNonPersistent):
+        (WebKit::WebsiteDataStore::create):
+        (WebKit::WebsiteDataStore::WebsiteDataStore):
+        (WebKit::WebsiteDataStore::~WebsiteDataStore):
+        * UIProcess/WebsiteData/WebsiteDataStore.h:
+        (WebKit::WebsiteDataStore::sessionID const):
+        * WebProcess/Cookies/WebCookieManager.cpp:
+        (WebKit::WebCookieManager::getHostnamesWithCookies):
+        (WebKit::WebCookieManager::deleteCookiesForHostname):
+        (WebKit::WebCookieManager::deleteAllCookies):
+        (WebKit::WebCookieManager::deleteCookie):
+        (WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
+        (WebKit::WebCookieManager::getAllCookies):
+        (WebKit::WebCookieManager::getCookies):
+        (WebKit::WebCookieManager::setCookie):
+        (WebKit::WebCookieManager::setCookies):
+        (WebKit::WebCookieManager::notifyCookiesDidChange):
+        (WebKit::WebCookieManager::startObservingCookieChanges):
+        (WebKit::WebCookieManager::stopObservingCookieChanges):
+        * WebProcess/Cookies/WebCookieManager.h:
+        * WebProcess/Cookies/WebCookieManager.messages.in:
+        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
+        (WebKit::WebIDBConnectionToServer::create):
+        (WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):
+        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
+        * WebProcess/Databases/WebDatabaseProvider.cpp:
+        (WebKit::WebDatabaseProvider::idbConnectionToServerForSession):
+        * WebProcess/Databases/WebDatabaseProvider.h:
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
+        * WebProcess/Network/NetworkProcessConnection.cpp:
+        (WebKit::NetworkProcessConnection::didCacheResource):
+        * WebProcess/Network/NetworkProcessConnection.h:
+        * WebProcess/Network/NetworkProcessConnection.messages.in:
+        * WebProcess/Network/WebLoaderStrategy.cpp:
+        (WebKit::WebLoaderStrategy::scheduleLoad):
+        (WebKit::WebLoaderStrategy::loadResourceSynchronously):
+        (WebKit::WebLoaderStrategy::createPingHandle):
+        * WebProcess/Network/WebSocketProvider.cpp:
+        (WebKit::WebSocketProvider::createSocketStreamHandle):
+        * WebProcess/Network/WebSocketProvider.h:
+        * WebProcess/Network/WebSocketStream.cpp:
+        (WebKit::WebSocketStream::create):
+        (WebKit::WebSocketStream::WebSocketStream):
+        * WebProcess/Network/WebSocketStream.h:
+        * WebProcess/Storage/WebToStorageProcessConnection.cpp:
+        (WebKit::WebToStorageProcessConnection::idbConnectionToServerForSession):
+        * WebProcess/Storage/WebToStorageProcessConnection.h:
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::convertMainResourceLoadToDownload):
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
+        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
+        (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
+        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
+        * WebProcess/WebCoreSupport/WebPlugInClient.cpp:
+        (WebKit::WebPlugInClient::didStartFromOrigin):
+        * WebProcess/WebCoreSupport/WebPlugInClient.h:
+        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
+        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
+        (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
+        * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
+        (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
+        * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
+        * WebProcess/WebPage/WebFrame.cpp:
+        (WebKit::WebFrame::startDownload):
+        (WebKit::WebFrame::convertMainResourceLoadToDownload):
+        * WebProcess/WebPage/WebFrame.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::setSessionID):
+        (WebKit::WebPage::updatePreferences):
+        * WebProcess/WebPage/WebPage.h:
+        (WebKit::WebPage::sessionID const):
+        * WebProcess/WebProcess.cpp:
+        (WebKit::m_webSQLiteDatabaseTracker):
+        (WebKit::WebProcess::ensurePrivateBrowsingSession):
+        (WebKit::WebProcess::destroySession):
+        (WebKit::WebProcess::isPlugInAutoStartOriginHash):
+        (WebKit::WebProcess::plugInDidStartFromOrigin):
+        (WebKit::WebProcess::didAddPlugInAutoStartOriginHash):
+        (WebKit::WebProcess::resetPlugInAutoStartOriginDefaultHashes):
+        (WebKit::WebProcess::resetPlugInAutoStartOriginHashes):
+        (WebKit::WebProcess::plugInDidReceiveUserInteraction):
+        (WebKit::WebProcess::fetchWebsiteData):
+        (WebKit::WebProcess::deleteWebsiteData):
+        (WebKit::WebProcess::deleteWebsiteDataForOrigins):
+        * WebProcess/WebProcess.h:
+        * WebProcess/WebProcess.messages.in:
+
 2017-08-17  Joseph Pecoraro  <pecoraro@apple.com>
 
         Fix typo: setUpInectedBundleClient
index bf8443b..cd92195 100644 (file)
@@ -45,7 +45,7 @@ using namespace WebCore;
 namespace WebKit {
 
 #if USE(NETWORK_SESSION)
-Download::Download(DownloadManager& downloadManager, DownloadID downloadID, NetworkDataTask& download, const SessionID& sessionID, const String& suggestedName)
+Download::Download(DownloadManager& downloadManager, DownloadID downloadID, NetworkDataTask& download, const PAL::SessionID& sessionID, const String& suggestedName)
     : m_downloadManager(downloadManager)
     , m_downloadID(downloadID)
     , m_download(&download)
@@ -57,7 +57,7 @@ Download::Download(DownloadManager& downloadManager, DownloadID downloadID, Netw
     m_downloadManager.didCreateDownload();
 }
 #if PLATFORM(COCOA)
-Download::Download(DownloadManager& downloadManager, DownloadID downloadID, NSURLSessionDownloadTask* download, const SessionID& sessionID, const String& suggestedName)
+Download::Download(DownloadManager& downloadManager, DownloadID downloadID, NSURLSessionDownloadTask* download, const PAL::SessionID& sessionID, const String& suggestedName)
     : m_downloadManager(downloadManager)
     , m_downloadID(downloadID)
     , m_downloadTask(download)
index ae4d7cf..bc9ea4f 100644 (file)
@@ -32,8 +32,8 @@
 #include <WebCore/ResourceHandle.h>
 #include <WebCore/ResourceHandleClient.h>
 #include <WebCore/ResourceRequest.h>
-#include <WebCore/SessionID.h>
 #include <memory>
+#include <pal/identifier/SessionID.h>
 #include <wtf/Noncopyable.h>
 #include <wtf/RetainPtr.h>
 
@@ -76,9 +76,9 @@ class Download : public IPC::MessageSender {
     WTF_MAKE_NONCOPYABLE(Download); WTF_MAKE_FAST_ALLOCATED;
 public:
 #if USE(NETWORK_SESSION)
-    Download(DownloadManager&, DownloadID, NetworkDataTask&, const WebCore::SessionID& sessionID, const String& suggestedFilename = { });
+    Download(DownloadManager&, DownloadID, NetworkDataTask&, const PAL::SessionID& sessionID, const String& suggestedFilename = { });
 #if PLATFORM(COCOA)
-    Download(DownloadManager&, DownloadID, NSURLSessionDownloadTask*, const WebCore::SessionID& sessionID, const String& suggestedFilename = { });
+    Download(DownloadManager&, DownloadID, NSURLSessionDownloadTask*, const PAL::SessionID& sessionID, const String& suggestedFilename = { });
 #endif
 #else
     Download(DownloadManager&, DownloadID, const WebCore::ResourceRequest&, const String& suggestedFilename = { });
@@ -143,7 +143,7 @@ private:
 #if PLATFORM(COCOA)
     RetainPtr<NSURLSessionDownloadTask> m_downloadTask;
 #endif
-    WebCore::SessionID m_sessionID;
+    PAL::SessionID m_sessionID;
 #else // USE(NETWORK_SESSION)
     WebCore::ResourceRequest m_request;
     String m_responseMIMEType;
index b76ba47..ef15301 100644 (file)
@@ -33,7 +33,7 @@
 #include "PendingDownload.h"
 #include "SessionTracker.h"
 #include <WebCore/NotImplemented.h>
-#include <WebCore/SessionID.h>
+#include <pal/identifier/SessionID.h>
 #include <wtf/StdLibExtras.h>
 
 using namespace WebCore;
@@ -45,7 +45,7 @@ DownloadManager::DownloadManager(Client& client)
 {
 }
 
-void DownloadManager::startDownload(NetworkConnectionToWebProcess* connection, SessionID sessionID, DownloadID downloadID, const ResourceRequest& request, const String& suggestedName)
+void DownloadManager::startDownload(NetworkConnectionToWebProcess* connection, PAL::SessionID sessionID, DownloadID downloadID, const ResourceRequest& request, const String& suggestedName)
 {
 #if USE(NETWORK_SESSION)
     auto* networkSession = SessionTracker::networkSession(sessionID);
@@ -162,7 +162,7 @@ void DownloadManager::continueDecidePendingDownloadDestination(DownloadID downlo
 #endif
 }
 
-void DownloadManager::resumeDownload(SessionID, DownloadID downloadID, const IPC::DataReference& resumeData, const String& path, const SandboxExtension::Handle& sandboxExtensionHandle)
+void DownloadManager::resumeDownload(PAL::SessionID, DownloadID downloadID, const IPC::DataReference& resumeData, const String& path, const SandboxExtension::Handle& sandboxExtensionHandle)
 {
 #if USE(NETWORK_SESSION)
     notImplemented();
index b4d525b..163c00a 100644 (file)
 #include <wtf/HashMap.h>
 #include <wtf/Noncopyable.h>
 
+namespace PAL {
+class SessionID;
+}
+
 namespace WebCore {
 class BlobDataFileReference;
 class ResourceHandle;
 class ResourceRequest;
 class ResourceResponse;
-class SessionID;
 }
 
 namespace IPC {
@@ -75,7 +78,7 @@ public:
 
     explicit DownloadManager(Client&);
 
-    void startDownload(NetworkConnectionToWebProcess*, WebCore::SessionID, DownloadID, const WebCore::ResourceRequest&, const String& suggestedName = { });
+    void startDownload(NetworkConnectionToWebProcess*, PAL::SessionID, DownloadID, const WebCore::ResourceRequest&, const String& suggestedName = { });
 #if USE(NETWORK_SESSION)
     void dataTaskBecameDownloadTask(DownloadID, std::unique_ptr<Download>&&);
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
@@ -87,7 +90,7 @@ public:
     void convertNetworkLoadToDownload(DownloadID, std::unique_ptr<NetworkLoad>&&, Vector<RefPtr<WebCore::BlobDataFileReference>>&&, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
     void continueDecidePendingDownloadDestination(DownloadID, String destination, const SandboxExtension::Handle&, bool allowOverwrite);
 
-    void resumeDownload(WebCore::SessionID, DownloadID, const IPC::DataReference& resumeData, const String& path, const SandboxExtension::Handle&);
+    void resumeDownload(PAL::SessionID, DownloadID, const IPC::DataReference& resumeData, const String& path, const SandboxExtension::Handle&);
 
     void cancelDownload(DownloadID);
     
index 6522d98..ae9474a 100644 (file)
@@ -31,7 +31,7 @@
 #include <WebCore/ResourceHandleTypes.h>
 #include <WebCore/ResourceRequest.h>
 #include <WebCore/ResourceResponse.h>
-#include <WebCore/SessionID.h>
+#include <pal/identifier/SessionID.h>
 #include <wtf/Function.h>
 
 namespace WebCore {
@@ -46,7 +46,7 @@ public:
     struct Parameters {
         WebCore::ResourceRequest originalRequest;
         Ref<WebCore::SecurityOrigin> sourceOrigin;
-        WebCore::SessionID sessionID;
+        PAL::SessionID sessionID;
         WebCore::StoredCredentials allowStoredCredentials;
     };
     enum class Result { Success, Failure };
index 73ba60c..d241c0d 100644 (file)
@@ -51,7 +51,7 @@
 #include <WebCore/PlatformCookieJar.h>
 #include <WebCore/ResourceLoaderOptions.h>
 #include <WebCore/ResourceRequest.h>
-#include <WebCore/SessionID.h>
+#include <pal/identifier/SessionID.h>
 
 #if USE(NETWORK_SESSION)
 #include "PingLoad.h"
@@ -173,7 +173,7 @@ void NetworkConnectionToWebProcess::didReceiveInvalidMessage(IPC::Connection&, I
 {
 }
 
-void NetworkConnectionToWebProcess::createSocketStream(URL&& url, SessionID sessionID, String cachePartition, uint64_t identifier)
+void NetworkConnectionToWebProcess::createSocketStream(URL&& url, PAL::SessionID sessionID, String cachePartition, uint64_t identifier)
 {
     ASSERT(!m_networkSocketStreams.contains(identifier));
     WebCore::SourceApplicationAuditToken token = { };
@@ -263,10 +263,10 @@ void NetworkConnectionToWebProcess::prefetchDNS(const String& hostname)
     NetworkProcess::singleton().prefetchDNS(hostname);
 }
 
-static NetworkStorageSession& storageSession(SessionID sessionID)
+static NetworkStorageSession& storageSession(PAL::SessionID sessionID)
 {
     ASSERT(sessionID.isValid());
-    if (sessionID != SessionID::defaultSessionID()) {
+    if (sessionID != PAL::SessionID::defaultSessionID()) {
         if (auto* storageSession = NetworkStorageSession::storageSession(sessionID))
             return *storageSession;
 
@@ -277,12 +277,12 @@ static NetworkStorageSession& storageSession(SessionID sessionID)
     return NetworkStorageSession::defaultStorageSession();
 }
 
-void NetworkConnectionToWebProcess::startDownload(SessionID sessionID, DownloadID downloadID, const ResourceRequest& request, const String& suggestedName)
+void NetworkConnectionToWebProcess::startDownload(PAL::SessionID sessionID, DownloadID downloadID, const ResourceRequest& request, const String& suggestedName)
 {
     NetworkProcess::singleton().downloadManager().startDownload(this, sessionID, downloadID, request, suggestedName);
 }
 
-void NetworkConnectionToWebProcess::convertMainResourceLoadToDownload(SessionID sessionID, uint64_t mainResourceLoadIdentifier, DownloadID downloadID, const ResourceRequest& request, const ResourceResponse& response)
+void NetworkConnectionToWebProcess::convertMainResourceLoadToDownload(PAL::SessionID sessionID, uint64_t mainResourceLoadIdentifier, DownloadID downloadID, const ResourceRequest& request, const ResourceResponse& response)
 {
     auto& networkProcess = NetworkProcess::singleton();
     if (!mainResourceLoadIdentifier) {
@@ -299,32 +299,32 @@ void NetworkConnectionToWebProcess::convertMainResourceLoadToDownload(SessionID
     loader->convertToDownload(downloadID, request, response);
 }
 
-void NetworkConnectionToWebProcess::cookiesForDOM(SessionID sessionID, const URL& firstParty, const URL& url, String& result)
+void NetworkConnectionToWebProcess::cookiesForDOM(PAL::SessionID sessionID, const URL& firstParty, const URL& url, String& result)
 {
     result = WebCore::cookiesForDOM(storageSession(sessionID), firstParty, url);
 }
 
-void NetworkConnectionToWebProcess::setCookiesFromDOM(SessionID sessionID, const URL& firstParty, const URL& url, const String& cookieString)
+void NetworkConnectionToWebProcess::setCookiesFromDOM(PAL::SessionID sessionID, const URL& firstParty, const URL& url, const String& cookieString)
 {
     WebCore::setCookiesFromDOM(storageSession(sessionID), firstParty, url, cookieString);
 }
 
-void NetworkConnectionToWebProcess::cookiesEnabled(SessionID sessionID, const URL& firstParty, const URL& url, bool& result)
+void NetworkConnectionToWebProcess::cookiesEnabled(PAL::SessionID sessionID, const URL& firstParty, const URL& url, bool& result)
 {
     result = WebCore::cookiesEnabled(storageSession(sessionID), firstParty, url);
 }
 
-void NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue(SessionID sessionID, const URL& firstParty, const URL& url, String& result)
+void NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue(PAL::SessionID sessionID, const URL& firstParty, const URL& url, String& result)
 {
     result = WebCore::cookieRequestHeaderFieldValue(storageSession(sessionID), firstParty, url);
 }
 
-void NetworkConnectionToWebProcess::getRawCookies(SessionID sessionID, const URL& firstParty, const URL& url, Vector<Cookie>& result)
+void NetworkConnectionToWebProcess::getRawCookies(PAL::SessionID sessionID, const URL& firstParty, const URL& url, Vector<Cookie>& result)
 {
     WebCore::getRawCookies(storageSession(sessionID), firstParty, url, result);
 }
 
-void NetworkConnectionToWebProcess::deleteCookie(SessionID sessionID, const URL& url, const String& cookieName)
+void NetworkConnectionToWebProcess::deleteCookie(PAL::SessionID sessionID, const URL& url, const String& cookieName)
 {
     WebCore::deleteCookie(storageSession(sessionID), url, cookieName);
 }
@@ -420,7 +420,7 @@ void NetworkConnectionToWebProcess::setCaptureExtraNetworkLoadMetricsEnabled(boo
 
 void NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession()
 {
-    NetworkProcess::singleton().ensurePrivateBrowsingSession({SessionID::legacyPrivateSessionID(), { }, { }, { }});
+    NetworkProcess::singleton().ensurePrivateBrowsingSession({PAL::SessionID::legacyPrivateSessionID(), { }, { }, { }});
 }
 
 } // namespace WebKit
index 384cce7..267a1a6 100644 (file)
@@ -88,15 +88,15 @@ private:
     void removeLoadIdentifier(ResourceLoadIdentifier);
     void setDefersLoading(ResourceLoadIdentifier, bool);
     void crossOriginRedirectReceived(ResourceLoadIdentifier, const WebCore::URL& redirectURL);
-    void startDownload(WebCore::SessionID, DownloadID, const WebCore::ResourceRequest&, const String& suggestedName = { });
-    void convertMainResourceLoadToDownload(WebCore::SessionID, uint64_t mainResourceLoadIdentifier, DownloadID, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
+    void startDownload(PAL::SessionID, DownloadID, const WebCore::ResourceRequest&, const String& suggestedName = { });
+    void convertMainResourceLoadToDownload(PAL::SessionID, uint64_t mainResourceLoadIdentifier, DownloadID, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
 
-    void cookiesForDOM(WebCore::SessionID, const WebCore::URL& firstParty, const WebCore::URL&, String& result);
-    void setCookiesFromDOM(WebCore::SessionID, const WebCore::URL& firstParty, const WebCore::URL&, const String&);
-    void cookiesEnabled(WebCore::SessionID, const WebCore::URL& firstParty, const WebCore::URL&, bool& result);
-    void cookieRequestHeaderFieldValue(WebCore::SessionID, const WebCore::URL& firstParty, const WebCore::URL&, String& result);
-    void getRawCookies(WebCore::SessionID, const WebCore::URL& firstParty, const WebCore::URL&, Vector<WebCore::Cookie>&);
-    void deleteCookie(WebCore::SessionID, const WebCore::URL&, const String& cookieName);
+    void cookiesForDOM(PAL::SessionID, const WebCore::URL& firstParty, const WebCore::URL&, String& result);
+    void setCookiesFromDOM(PAL::SessionID, const WebCore::URL& firstParty, const WebCore::URL&, const String&);
+    void cookiesEnabled(PAL::SessionID, const WebCore::URL& firstParty, const WebCore::URL&, bool& result);
+    void cookieRequestHeaderFieldValue(PAL::SessionID, const WebCore::URL& firstParty, const WebCore::URL&, String& result);
+    void getRawCookies(PAL::SessionID, const WebCore::URL& firstParty, const WebCore::URL&, Vector<WebCore::Cookie>&);
+    void deleteCookie(PAL::SessionID, const WebCore::URL&, const String& cookieName);
 
     void registerFileBlobURL(const WebCore::URL&, const String& path, const SandboxExtension::Handle&, const String& contentType);
     void registerBlobURL(const WebCore::URL&, Vector<WebCore::BlobPart>&&, const String& contentType);
@@ -112,7 +112,7 @@ private:
 
     void setCaptureExtraNetworkLoadMetricsEnabled(bool);
 
-    void createSocketStream(WebCore::URL&&, WebCore::SessionID, String cachePartition, uint64_t);
+    void createSocketStream(WebCore::URL&&, PAL::SessionID, String cachePartition, uint64_t);
     void destroySocketStream(uint64_t);
     
     void ensureLegacyPrivateBrowsingSession();
index ee2584b..9608b49 100644 (file)
@@ -29,15 +29,15 @@ messages -> NetworkConnectionToWebProcess LegacyReceiver {
     SetDefersLoading(uint64_t resourceLoadIdentifier, bool defers)
     PrefetchDNS(String hostname)
 
-    StartDownload(WebCore::SessionID sessionID, WebKit::DownloadID downloadID, WebCore::ResourceRequest request, String suggestedName)
-    ConvertMainResourceLoadToDownload(WebCore::SessionID sessionID, uint64_t mainResourceLoadIdentifier, WebKit::DownloadID downloadID, WebCore::ResourceRequest request, WebCore::ResourceResponse response)
+    StartDownload(PAL::SessionID sessionID, WebKit::DownloadID downloadID, WebCore::ResourceRequest request, String suggestedName)
+    ConvertMainResourceLoadToDownload(PAL::SessionID sessionID, uint64_t mainResourceLoadIdentifier, WebKit::DownloadID downloadID, WebCore::ResourceRequest request, WebCore::ResourceResponse response)
 
-    CookiesForDOM(WebCore::SessionID sessionID, WebCore::URL firstParty, WebCore::URL url) -> (String result)
-    SetCookiesFromDOM(WebCore::SessionID sessionID, WebCore::URL firstParty, WebCore::URL url, String cookieString)
-    CookiesEnabled(WebCore::SessionID sessionID, WebCore::URL firstParty, WebCore::URL url) -> (bool enabled)
-    CookieRequestHeaderFieldValue(WebCore::SessionID sessionID, WebCore::URL firstParty, WebCore::URL url) -> (String result)
-    GetRawCookies(WebCore::SessionID sessionID, WebCore::URL firstParty, WebCore::URL url) -> (Vector<WebCore::Cookie> cookies)
-    DeleteCookie(WebCore::SessionID sessionID, WebCore::URL url, String cookieName)
+    CookiesForDOM(PAL::SessionID sessionID, WebCore::URL firstParty, WebCore::URL url) -> (String result)
+    SetCookiesFromDOM(PAL::SessionID sessionID, WebCore::URL firstParty, WebCore::URL url, String cookieString)
+    CookiesEnabled(PAL::SessionID sessionID, WebCore::URL firstParty, WebCore::URL url) -> (bool enabled)
+    CookieRequestHeaderFieldValue(PAL::SessionID sessionID, WebCore::URL firstParty, WebCore::URL url) -> (String result)
+    GetRawCookies(PAL::SessionID sessionID, WebCore::URL firstParty, WebCore::URL url) -> (Vector<WebCore::Cookie> cookies)
+    DeleteCookie(PAL::SessionID sessionID, WebCore::URL url, String cookieName)
 
     RegisterFileBlobURL(WebCore::URL url, String path, WebKit::SandboxExtension::Handle extensionHandle, String contentType)
     RegisterBlobURL(WebCore::URL url, Vector<WebCore::BlobPart> blobParts, String contentType)
@@ -53,7 +53,7 @@ messages -> NetworkConnectionToWebProcess LegacyReceiver {
 
     SetCaptureExtraNetworkLoadMetricsEnabled(bool enabled)
 
-    CreateSocketStream(WebCore::URL url, WebCore::SessionID sessionID, String cachePartition, uint64_t identifier)
+    CreateSocketStream(WebCore::URL url, PAL::SessionID sessionID, String cachePartition, uint64_t identifier)
 
     EnsureLegacyPrivateBrowsingSession()
 }
index 04747c4..85a5b12 100644 (file)
@@ -35,8 +35,8 @@
 #include <WebCore/NotImplemented.h>
 #include <WebCore/ResourceHandle.h>
 #include <WebCore/ResourceRequest.h>
-#include <WebCore/SessionID.h>
 #include <WebCore/SharedBuffer.h>
+#include <pal/identifier/SessionID.h>
 #include <wtf/MainThread.h>
 #include <wtf/Seconds.h>
 
index d064beb..14a5e93 100644 (file)
@@ -29,7 +29,7 @@
 #include <WebCore/BlobDataFileReference.h>
 #include <WebCore/ResourceLoaderOptions.h>
 #include <WebCore/ResourceRequest.h>
-#include <WebCore/SessionID.h>
+#include <pal/identifier/SessionID.h>
 
 namespace WebKit {
 
@@ -37,7 +37,7 @@ class NetworkLoadParameters {
 public:
     uint64_t webPageID { 0 };
     uint64_t webFrameID { 0 };
-    WebCore::SessionID sessionID { WebCore::SessionID::emptySessionID() };
+    PAL::SessionID sessionID { PAL::SessionID::emptySessionID() };
     WebCore::ResourceRequest request;
     WebCore::ContentSniffingPolicy contentSniffingPolicy { WebCore::SniffContent };
     WebCore::StoredCredentials allowStoredCredentials { WebCore::DoNotAllowStoredCredentials };
index 1be38a2..e1ef151 100644 (file)
@@ -61,9 +61,9 @@
 #include <WebCore/RuntimeApplicationChecks.h>
 #include <WebCore/SecurityOriginData.h>
 #include <WebCore/SecurityOriginHash.h>
-#include <WebCore/SessionID.h>
 #include <WebCore/Settings.h>
 #include <WebCore/URLParser.h>
+#include <pal/identifier/SessionID.h>
 #include <wtf/OptionSet.h>
 #include <wtf/RunLoop.h>
 #include <wtf/text/CString.h>
@@ -237,7 +237,7 @@ void NetworkProcess::initializeNetworkProcess(NetworkProcessCreationParameters&&
 
     // FIXME: instead of handling this here, a message should be sent later (scales to multiple sessions)
     if (parameters.privateBrowsingEnabled)
-        RemoteNetworkingContext::ensurePrivateBrowsingSession({SessionID::legacyPrivateSessionID(), { }, { }, { }});
+        RemoteNetworkingContext::ensurePrivateBrowsingSession({PAL::SessionID::legacyPrivateSessionID(), { }, { }, { }});
 
     if (parameters.shouldUseTestingNetworkSession)
         NetworkStorageSession::switchToNewTestingSession();
@@ -298,7 +298,7 @@ void NetworkProcess::addWebsiteDataStore(WebsiteDataStoreParameters&& parameters
     RemoteNetworkingContext::ensureWebsiteDataStoreSession(WTFMove(parameters));
 }
 
-void NetworkProcess::destroySession(SessionID sessionID)
+void NetworkProcess::destroySession(PAL::SessionID sessionID)
 {
     SessionTracker::destroySession(sessionID);
 }
@@ -325,7 +325,7 @@ void NetworkProcess::updateCookiePartitioningForTopPrivatelyOwnedDomains(const V
 }
 #endif
 
-static void fetchDiskCacheEntries(SessionID sessionID, OptionSet<WebsiteDataFetchOption> fetchOptions, Function<void (Vector<WebsiteData::Entry>)>&& completionHandler)
+static void fetchDiskCacheEntries(PAL::SessionID sessionID, OptionSet<WebsiteDataFetchOption> fetchOptions, Function<void (Vector<WebsiteData::Entry>)>&& completionHandler)
 {
 #if ENABLE(NETWORK_CACHE)
     if (auto* cache = NetworkProcess::singleton().cache()) {
@@ -360,7 +360,7 @@ static void fetchDiskCacheEntries(SessionID sessionID, OptionSet<WebsiteDataFetc
     });
 }
 
-void NetworkProcess::fetchWebsiteData(SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, OptionSet<WebsiteDataFetchOption> fetchOptions, uint64_t callbackID)
+void NetworkProcess::fetchWebsiteData(PAL::SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, OptionSet<WebsiteDataFetchOption> fetchOptions, uint64_t callbackID)
 {
     struct CallbackAggregator final : public RefCounted<CallbackAggregator> {
         explicit CallbackAggregator(Function<void (WebsiteData)>&& completionHandler)
@@ -402,7 +402,7 @@ void NetworkProcess::fetchWebsiteData(SessionID sessionID, OptionSet<WebsiteData
     }
 }
 
-void NetworkProcess::deleteWebsiteData(SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, std::chrono::system_clock::time_point modifiedSince, uint64_t callbackID)
+void NetworkProcess::deleteWebsiteData(PAL::SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, std::chrono::system_clock::time_point modifiedSince, uint64_t callbackID)
 {
 #if PLATFORM(COCOA)
     if (websiteDataTypes.contains(WebsiteDataType::HSTSCache)) {
@@ -460,7 +460,7 @@ static void clearDiskCacheEntries(const Vector<SecurityOriginData>& origins, Fun
     RunLoop::main().dispatch(WTFMove(completionHandler));
 }
 
-void NetworkProcess::deleteWebsiteDataForOrigins(SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, const Vector<SecurityOriginData>& origins, const Vector<String>& cookieHostNames, uint64_t callbackID)
+void NetworkProcess::deleteWebsiteDataForOrigins(PAL::SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, const Vector<SecurityOriginData>& origins, const Vector<String>& cookieHostNames, uint64_t callbackID)
 {
     if (websiteDataTypes.contains(WebsiteDataType::Cookies)) {
         if (auto* networkStorageSession = NetworkStorageSession::storageSession(sessionID))
@@ -479,12 +479,12 @@ void NetworkProcess::deleteWebsiteDataForOrigins(SessionID sessionID, OptionSet<
     completionHandler();
 }
 
-void NetworkProcess::downloadRequest(SessionID sessionID, DownloadID downloadID, const ResourceRequest& request, const String& suggestedFilename)
+void NetworkProcess::downloadRequest(PAL::SessionID sessionID, DownloadID downloadID, const ResourceRequest& request, const String& suggestedFilename)
 {
     downloadManager().startDownload(nullptr, sessionID, downloadID, request, suggestedFilename);
 }
 
-void NetworkProcess::resumeDownload(SessionID sessionID, DownloadID downloadID, const IPC::DataReference& resumeData, const String& path, const WebKit::SandboxExtension::Handle& sandboxExtensionHandle)
+void NetworkProcess::resumeDownload(PAL::SessionID sessionID, DownloadID downloadID, const IPC::DataReference& resumeData, const String& path, const WebKit::SandboxExtension::Handle& sandboxExtensionHandle)
 {
     downloadManager().resumeDownload(sessionID, downloadID, resumeData, path, sandboxExtensionHandle);
 }
index 6fcba1a..23e8677 100644 (file)
@@ -30,8 +30,8 @@
 #include "DownloadManager.h"
 #include "MessageReceiverMap.h"
 #include <WebCore/DiagnosticLoggingClient.h>
-#include <WebCore/SessionID.h>
 #include <memory>
+#include <pal/identifier/SessionID.h>
 #include <wtf/Forward.h>
 #include <wtf/Function.h>
 #include <wtf/MemoryPressureHandler.h>
 #include "WebSQLiteDatabaseTracker.h"
 #endif
 
+namespace PAL {
+class SessionID;
+}
+
 namespace WebCore {
 class DownloadID;
 class CertificateInfo;
 class NetworkStorageSession;
 class ProtectionSpace;
 class SecurityOrigin;
-class SessionID;
 struct SecurityOriginData;
 struct SoupNetworkProxySettings;
 }
@@ -171,19 +174,19 @@ private:
     void initializeNetworkProcess(NetworkProcessCreationParameters&&);
     void createNetworkConnectionToWebProcess();
     void addWebsiteDataStore(WebsiteDataStoreParameters&&);
-    void destroySession(WebCore::SessionID);
+    void destroySession(PAL::SessionID);
 
-    void fetchWebsiteData(WebCore::SessionID, OptionSet<WebsiteDataType>, OptionSet<WebsiteDataFetchOption>, uint64_t callbackID);
-    void deleteWebsiteData(WebCore::SessionID, OptionSet<WebsiteDataType>, std::chrono::system_clock::time_point modifiedSince, uint64_t callbackID);
-    void deleteWebsiteDataForOrigins(WebCore::SessionID, OptionSet<WebsiteDataType>, const Vector<WebCore::SecurityOriginData>& origins, const Vector<String>& cookieHostNames, uint64_t callbackID);
+    void fetchWebsiteData(PAL::SessionID, OptionSet<WebsiteDataType>, OptionSet<WebsiteDataFetchOption>, uint64_t callbackID);
+    void deleteWebsiteData(PAL::SessionID, OptionSet<WebsiteDataType>, std::chrono::system_clock::time_point modifiedSince, uint64_t callbackID);
+    void deleteWebsiteDataForOrigins(PAL::SessionID, OptionSet<WebsiteDataType>, const Vector<WebCore::SecurityOriginData>& origins, const Vector<String>& cookieHostNames, uint64_t callbackID);
 
     void clearCachedCredentials();
 
     // FIXME: This should take a session ID so we can identify which disk cache to delete.
     void clearDiskCache(std::chrono::system_clock::time_point modifiedSince, Function<void ()>&& completionHandler);
 
-    void downloadRequest(WebCore::SessionID, DownloadID, const WebCore::ResourceRequest&, const String& suggestedFilename);
-    void resumeDownload(WebCore::SessionID, DownloadID, const IPC::DataReference& resumeData, const String& path, const SandboxExtension::Handle&);
+    void downloadRequest(PAL::SessionID, DownloadID, const WebCore::ResourceRequest&, const String& suggestedFilename);
+    void resumeDownload(PAL::SessionID, DownloadID, const IPC::DataReference& resumeData, const String& path, const SandboxExtension::Handle&);
     void cancelDownload(DownloadID);
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     void continueCanAuthenticateAgainstProtectionSpace(uint64_t resourceLoadIdentifier, bool canAuthenticate);
index c14aba1..a42190d 100644 (file)
@@ -38,14 +38,14 @@ messages -> NetworkProcess LegacyReceiver {
 
     EnsurePrivateBrowsingSession(struct WebKit::WebsiteDataStoreParameters websiteDataStoreParameters)
     AddWebsiteDataStore(struct WebKit::WebsiteDataStoreParameters websiteDataStoreParameters);
-    DestroySession(WebCore::SessionID sessionID)
+    DestroySession(PAL::SessionID sessionID)
 
-    FetchWebsiteData(WebCore::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes, OptionSet<WebKit::WebsiteDataFetchOption> fetchOptions, uint64_t callbackID)
-    DeleteWebsiteData(WebCore::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes, std::chrono::system_clock::time_point modifiedSince, uint64_t callbackID)
-    DeleteWebsiteDataForOrigins(WebCore::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes, Vector<WebCore::SecurityOriginData> origins, Vector<String> cookieHostNames, uint64_t callbackID)
+    FetchWebsiteData(PAL::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes, OptionSet<WebKit::WebsiteDataFetchOption> fetchOptions, uint64_t callbackID)
+    DeleteWebsiteData(PAL::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes, std::chrono::system_clock::time_point modifiedSince, uint64_t callbackID)
+    DeleteWebsiteDataForOrigins(PAL::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes, Vector<WebCore::SecurityOriginData> origins, Vector<String> cookieHostNames, uint64_t callbackID)
 
-    DownloadRequest(WebCore::SessionID sessionID, WebKit::DownloadID downloadID, WebCore::ResourceRequest request, String suggestedFilename)
-    ResumeDownload(WebCore::SessionID sessionID, WebKit::DownloadID downloadID, IPC::DataReference resumeData, String path, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
+    DownloadRequest(PAL::SessionID sessionID, WebKit::DownloadID downloadID, WebCore::ResourceRequest request, String suggestedFilename)
+    ResumeDownload(PAL::SessionID sessionID, WebKit::DownloadID downloadID, IPC::DataReference resumeData, String path, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
     CancelDownload(WebKit::DownloadID downloadID)
 
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
index cfe986e..fc60fa8 100644 (file)
@@ -35,7 +35,7 @@
 #include <WebCore/ResourceLoaderOptions.h>
 #include <WebCore/ResourceRequest.h>
 #include <WebCore/SecurityOrigin.h>
-#include <WebCore/SessionID.h>
+#include <pal/identifier/SessionID.h>
 #include <wtf/Seconds.h>
 
 namespace IPC {
index 6ed5f7f..dbe519c 100644 (file)
@@ -77,7 +77,7 @@ public:
     const WebCore::ResourceResponse& response() const { return m_response; }
 
     NetworkConnectionToWebProcess& connectionToWebProcess() { return m_connection; }
-    WebCore::SessionID sessionID() const { return m_parameters.sessionID; }
+    PAL::SessionID sessionID() const { return m_parameters.sessionID; }
     ResourceLoadIdentifier identifier() const { return m_parameters.identifier; }
     uint64_t frameID() const { return m_parameters.webFrameID; }
     uint64_t pageID() const { return m_parameters.webPageID; }
index 498005e..6794d00 100644 (file)
@@ -45,7 +45,7 @@ using namespace WebCore;
 
 namespace WebKit {
 
-Ref<NetworkSession> NetworkSession::create(SessionID sessionID, LegacyCustomProtocolManager* customProtocolManager)
+Ref<NetworkSession> NetworkSession::create(PAL::SessionID sessionID, LegacyCustomProtocolManager* customProtocolManager)
 {
 #if PLATFORM(COCOA)
     return NetworkSessionCocoa::create(sessionID, customProtocolManager);
@@ -62,7 +62,7 @@ NetworkSession& NetworkSession::defaultSession()
     return NetworkSessionCocoa::defaultSession();
 #else
     ASSERT(RunLoop::isMain());
-    static NetworkSession* session = &NetworkSession::create(SessionID::defaultSessionID()).leakRef();
+    static NetworkSession* session = &NetworkSession::create(PAL::SessionID::defaultSessionID()).leakRef();
     return *session;
 #endif
 }
@@ -74,7 +74,7 @@ NetworkStorageSession& NetworkSession::networkStorageSession() const
     return *storageSession;
 }
 
-NetworkSession::NetworkSession(SessionID sessionID)
+NetworkSession::NetworkSession(PAL::SessionID sessionID)
     : m_sessionID(sessionID)
 {
 }
index ac23091..5a3fe6c 100644 (file)
@@ -27,7 +27,7 @@
 
 #if USE(NETWORK_SESSION)
 
-#include <WebCore/SessionID.h>
+#include <pal/identifier/SessionID.h>
 #include <wtf/HashSet.h>
 #include <wtf/Ref.h>
 #include <wtf/RefCounted.h>
@@ -43,23 +43,23 @@ class NetworkDataTask;
 
 class NetworkSession : public RefCounted<NetworkSession> {
 public:
-    static Ref<NetworkSession> create(WebCore::SessionID, LegacyCustomProtocolManager* = nullptr);
+    static Ref<NetworkSession> create(PAL::SessionID, LegacyCustomProtocolManager* = nullptr);
     static NetworkSession& defaultSession();
     virtual ~NetworkSession();
 
     virtual void invalidateAndCancel();
     virtual void clearCredentials() { };
 
-    WebCore::SessionID sessionID() const { return m_sessionID; }
+    PAL::SessionID sessionID() const { return m_sessionID; }
     WebCore::NetworkStorageSession& networkStorageSession() const;
 
     void registerNetworkDataTask(NetworkDataTask& task) { m_dataTaskSet.add(&task); }
     void unregisterNetworkDataTask(NetworkDataTask& task) { m_dataTaskSet.remove(&task); }
 
 protected:
-    NetworkSession(WebCore::SessionID);
+    NetworkSession(PAL::SessionID);
 
-    WebCore::SessionID m_sessionID;
+    PAL::SessionID m_sessionID;
 
     HashSet<NetworkDataTask*> m_dataTaskSet;
 };
index 33170da..c116083 100644 (file)
@@ -35,12 +35,12 @@ using namespace WebCore;
 
 namespace WebKit {
 
-Ref<NetworkSocketStream> NetworkSocketStream::create(WebCore::URL&& url, WebCore::SessionID sessionID, const String& credentialPartition, uint64_t identifier, IPC::Connection& connection, SourceApplicationAuditToken&& auditData)
+Ref<NetworkSocketStream> NetworkSocketStream::create(WebCore::URL&& url, PAL::SessionID sessionID, const String& credentialPartition, uint64_t identifier, IPC::Connection& connection, SourceApplicationAuditToken&& auditData)
 {
     return adoptRef(*new NetworkSocketStream(WTFMove(url), sessionID, credentialPartition, identifier, connection, WTFMove(auditData)));
 }
 
-NetworkSocketStream::NetworkSocketStream(URL&& url, SessionID sessionID, const String& credentialPartition, uint64_t identifier, IPC::Connection& connection, SourceApplicationAuditToken&& auditData)
+NetworkSocketStream::NetworkSocketStream(URL&& url, PAL::SessionID sessionID, const String& credentialPartition, uint64_t identifier, IPC::Connection& connection, SourceApplicationAuditToken&& auditData)
     : m_identifier(identifier)
     , m_connection(connection)
     , m_impl(SocketStreamHandleImpl::create(url, *this, sessionID, credentialPartition, WTFMove(auditData)))
index 7dc3d0c..e465073 100644 (file)
@@ -27,9 +27,9 @@
 
 #include "MessageReceiver.h"
 #include "MessageSender.h"
-#include <WebCore/SessionID.h>
 #include <WebCore/SocketStreamHandleClient.h>
 #include <WebCore/SocketStreamHandleImpl.h>
+#include <pal/identifier/SessionID.h>
 
 namespace IPC {
 class Connection;
@@ -46,7 +46,7 @@ namespace WebKit {
 
 class NetworkSocketStream : public RefCounted<NetworkSocketStream>, public IPC::MessageSender, public IPC::MessageReceiver, public WebCore::SocketStreamHandleClient {
 public:
-    static Ref<NetworkSocketStream> create(WebCore::URL&&, WebCore::SessionID, const String& credentialPartition, uint64_t, IPC::Connection&, WebCore::SourceApplicationAuditToken&&);
+    static Ref<NetworkSocketStream> create(WebCore::URL&&, PAL::SessionID, const String& credentialPartition, uint64_t, IPC::Connection&, WebCore::SourceApplicationAuditToken&&);
     ~NetworkSocketStream();
 
     void didReceiveMessage(IPC::Connection&, IPC::Decoder&);
@@ -66,7 +66,7 @@ private:
     IPC::Connection* messageSenderConnection() final;
     uint64_t messageSenderDestinationID() final;
 
-    NetworkSocketStream(WebCore::URL&&, WebCore::SessionID, const String& credentialPartition, uint64_t, IPC::Connection&, WebCore::SourceApplicationAuditToken&&);
+    NetworkSocketStream(WebCore::URL&&, PAL::SessionID, const String& credentialPartition, uint64_t, IPC::Connection&, WebCore::SourceApplicationAuditToken&&);
 
     uint64_t m_identifier;
     IPC::Connection& m_connection;
index ab3efbb..2e4e7c9 100644 (file)
@@ -28,7 +28,7 @@
 #define RemoteNetworkingContext_h
 
 #include <WebCore/NetworkingContext.h>
-#include <WebCore/SessionID.h>
+#include <pal/identifier/SessionID.h>
 
 namespace WebKit {
 
@@ -36,7 +36,7 @@ struct WebsiteDataStoreParameters;
 
 class RemoteNetworkingContext final : public WebCore::NetworkingContext {
 public:
-    static Ref<RemoteNetworkingContext> create(WebCore::SessionID sessionID, bool shouldClearReferrerOnHTTPSToHTTPRedirect)
+    static Ref<RemoteNetworkingContext> create(PAL::SessionID sessionID, bool shouldClearReferrerOnHTTPSToHTTPRedirect)
     {
         return adoptRef(*new RemoteNetworkingContext(sessionID, shouldClearReferrerOnHTTPSToHTTPRedirect));
     }
@@ -49,7 +49,7 @@ public:
     bool shouldClearReferrerOnHTTPSToHTTPRedirect() const override { return m_shouldClearReferrerOnHTTPSToHTTPRedirect; }
 
 private:
-    RemoteNetworkingContext(WebCore::SessionID sessionID, bool shouldClearReferrerOnHTTPSToHTTPRedirect)
+    RemoteNetworkingContext(PAL::SessionID sessionID, bool shouldClearReferrerOnHTTPSToHTTPRedirect)
         : m_sessionID(sessionID)
         , m_shouldClearReferrerOnHTTPSToHTTPRedirect(shouldClearReferrerOnHTTPSToHTTPRedirect)
     {
@@ -66,7 +66,7 @@ private:
     WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) const override;
 #endif
 
-    WebCore::SessionID m_sessionID;
+    PAL::SessionID m_sessionID;
     bool m_shouldClearReferrerOnHTTPSToHTTPRedirect;
 
 #if PLATFORM(COCOA)
index e3757c9..8d6ed04 100644 (file)
@@ -32,7 +32,7 @@
 #include "NetworkCache.h"
 #include "NetworkLoad.h"
 #include "NetworkSession.h"
-#include <WebCore/SessionID.h>
+#include <pal/identifier/SessionID.h>
 #include <wtf/CurrentTime.h>
 #include <wtf/RunLoop.h>
 
@@ -52,7 +52,7 @@ SpeculativeLoad::SpeculativeLoad(Cache& cache, const GlobalFrameID& frameID, con
     ASSERT(!m_cacheEntry || m_cacheEntry->needsValidation());
 
     NetworkLoadParameters parameters;
-    parameters.sessionID = SessionID::defaultSessionID();
+    parameters.sessionID = PAL::SessionID::defaultSessionID();
     parameters.allowStoredCredentials = AllowStoredCredentials;
     parameters.contentSniffingPolicy = DoNotSniffContent;
     parameters.request = m_originalRequest;
index 3516412..49001e6 100644 (file)
@@ -42,7 +42,7 @@ namespace WebKit {
 class NetworkSessionCocoa final : public NetworkSession {
     friend class NetworkDataTaskCocoa;
 public:
-    static Ref<NetworkSession> create(WebCore::SessionID, LegacyCustomProtocolManager*);
+    static Ref<NetworkSession> create(PAL::SessionID, LegacyCustomProtocolManager*);
     static NetworkSession& defaultSession();
     ~NetworkSessionCocoa();
 
@@ -64,7 +64,7 @@ public:
     DownloadID takeDownloadID(NetworkDataTaskCocoa::TaskIdentifier);
 
 private:
-    NetworkSessionCocoa(WebCore::SessionID, LegacyCustomProtocolManager*);
+    NetworkSessionCocoa(PAL::SessionID, LegacyCustomProtocolManager*);
 
     void invalidateAndCancel() override;
     void clearCredentials() override;
index 0f85d07..8754821 100644 (file)
@@ -455,7 +455,7 @@ static LegacyCustomProtocolManager* legacyCustomProtocolManager;
 static bool sessionsCreated = false;
 #endif
 
-static NSURLSessionConfiguration *configurationForSessionID(const WebCore::SessionID& session)
+static NSURLSessionConfiguration *configurationForSessionID(const PAL::SessionID& session)
 {
     if (session.isEphemeral()) {
         NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration ephemeralSessionConfiguration];
@@ -533,7 +533,7 @@ void NetworkSessionCocoa::setCTDataConnectionServiceType(const String& type)
 }
 #endif
 
-Ref<NetworkSession> NetworkSessionCocoa::create(WebCore::SessionID sessionID, LegacyCustomProtocolManager* customProtocolManager)
+Ref<NetworkSession> NetworkSessionCocoa::create(PAL::SessionID sessionID, LegacyCustomProtocolManager* customProtocolManager)
 {
     return adoptRef(*new NetworkSessionCocoa(sessionID, customProtocolManager));
 }
@@ -541,11 +541,11 @@ Ref<NetworkSession> NetworkSessionCocoa::create(WebCore::SessionID sessionID, Le
 NetworkSession& NetworkSessionCocoa::defaultSession()
 {
     ASSERT(RunLoop::isMain());
-    static NetworkSession* session = &NetworkSessionCocoa::create(WebCore::SessionID::defaultSessionID(), legacyCustomProtocolManager).leakRef();
+    static NetworkSession* session = &NetworkSessionCocoa::create(PAL::SessionID::defaultSessionID(), legacyCustomProtocolManager).leakRef();
     return *session;
 }
 
-NetworkSessionCocoa::NetworkSessionCocoa(WebCore::SessionID sessionID, LegacyCustomProtocolManager* customProtocolManager)
+NetworkSessionCocoa::NetworkSessionCocoa(PAL::SessionID sessionID, LegacyCustomProtocolManager* customProtocolManager)
     : NetworkSession(sessionID)
 {
     relaxAdoptionRequirement();
index f6baeda..dc69cc6 100644 (file)
@@ -36,7 +36,7 @@ using namespace WebCore;
 
 namespace WebKit {
 
-NetworkSessionSoup::NetworkSessionSoup(SessionID sessionID)
+NetworkSessionSoup::NetworkSessionSoup(PAL::SessionID sessionID)
     : NetworkSession(sessionID)
 {
     networkStorageSession().setCookieObserverHandler([this] {
index e019602..f58cd81 100644 (file)
@@ -33,7 +33,7 @@ namespace WebKit {
 
 class NetworkSessionSoup final : public NetworkSession {
 public:
-    static Ref<NetworkSession> create(WebCore::SessionID sessionID)
+    static Ref<NetworkSession> create(PAL::SessionID sessionID)
     {
         return adoptRef(*new NetworkSessionSoup(sessionID));
     }
@@ -42,7 +42,7 @@ public:
     SoupSession* soupSession() const;
 
 private:
-    NetworkSessionSoup(WebCore::SessionID);
+    NetworkSessionSoup(PAL::SessionID);
 
     void clearCredentials() override;
 };
index 0c2b2cd..08aec1f 100644 (file)
@@ -352,6 +352,7 @@ def headers_for_type(type):
 
     special_cases = {
         'String': ['<wtf/text/WTFString.h>'],
+        'PAL::SessionID': ['<pal/identifier/SessionID.h>'],
         'WebCore::AutoplayEventFlags': ['<WebCore/AutoplayEvent.h>'],
         'WebCore::ExceptionDetails': ['<WebCore/JSDOMExceptionHandling.h>'],
         'WebCore::FileChooserSettings': ['<WebCore/FileChooser.h>'],
index a6a8634..c8102a0 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "Logging.h"
 #include "SandboxInitializationParameters.h"
-#include <WebCore/SessionID.h>
+#include <pal/identifier/SessionID.h>
 #include <unistd.h>
 
 namespace WebKit {
@@ -73,8 +73,8 @@ void ChildProcess::initialize(const ChildProcessInitializationParameters& parame
     SandboxInitializationParameters sandboxParameters;
     initializeSandbox(parameters, sandboxParameters);
 
-    // In WebKit2, only the UI process should ever be generating non-default SessionIDs.
-    WebCore::SessionID::enableGenerationProtection();
+    // In WebKit2, only the UI process should ever be generating non-default PAL::SessionIDs.
+    PAL::SessionID::enableGenerationProtection();
 
     m_connection = IPC::Connection::createClientConnection(parameters.connectionIdentifier, *this);
     m_connection->setDidCloseOnConnectionWorkQueueCallback(didCloseOnConnectionWorkQueue);
index 48ae8a5..d738357 100644 (file)
@@ -56,29 +56,29 @@ void SessionTracker::setIdentifierBase(const String& identifier)
 }
 
 #if USE(NETWORK_SESSION)
-static HashMap<SessionID, RefPtr<NetworkSession>>& staticSessionMap()
+static HashMap<PAL::SessionID, RefPtr<NetworkSession>>& staticSessionMap()
 {
     ASSERT(RunLoop::isMain());
 
-    static NeverDestroyed<HashMap<SessionID, RefPtr<NetworkSession>>> map;
+    static NeverDestroyed<HashMap<PAL::SessionID, RefPtr<NetworkSession>>> map;
     return map;
 }
 
-NetworkSession* SessionTracker::networkSession(SessionID sessionID)
+NetworkSession* SessionTracker::networkSession(PAL::SessionID sessionID)
 {
-    if (sessionID == SessionID::defaultSessionID())
+    if (sessionID == PAL::SessionID::defaultSessionID())
         return &NetworkSession::defaultSession();
     return staticSessionMap().get(sessionID);
 }
 
-void SessionTracker::setSession(SessionID sessionID, Ref<NetworkSession>&& session)
+void SessionTracker::setSession(PAL::SessionID sessionID, Ref<NetworkSession>&& session)
 {
-    ASSERT(sessionID != SessionID::defaultSessionID());
+    ASSERT(sessionID != PAL::SessionID::defaultSessionID());
     staticSessionMap().set(sessionID, WTFMove(session));
 }
 #endif
 
-void SessionTracker::destroySession(SessionID sessionID)
+void SessionTracker::destroySession(PAL::SessionID sessionID)
 {
     ASSERT(RunLoop::isMain());
 #if USE(NETWORK_SESSION)
index 9f7a6c0..bfe1509 100644 (file)
@@ -30,7 +30,7 @@ namespace WebCore {
 class NetworkStorageSession;
 }
 
-#include <WebCore/SessionID.h>
+#include <pal/identifier/SessionID.h>
 #include <wtf/HashMap.h>
 #include <wtf/Noncopyable.h>
 #include <wtf/text/WTFString.h>
@@ -46,10 +46,10 @@ public:
     static void setIdentifierBase(const String&);
     
 #if USE(NETWORK_SESSION)
-    static void setSession(WebCore::SessionID, Ref<NetworkSession>&&);
-    static NetworkSession* networkSession(WebCore::SessionID);
+    static void setSession(PAL::SessionID, Ref<NetworkSession>&&);
+    static NetworkSession* networkSession(PAL::SessionID);
 #endif
-    static void destroySession(WebCore::SessionID);
+    static void destroySession(PAL::SessionID);
 };
 
 } // namespace WebKit
index e0f3536..4617378 100644 (file)
@@ -27,7 +27,7 @@
 #pragma once
 
 #include "SandboxExtension.h"
-#include <WebCore/SessionID.h>
+#include <pal/identifier/SessionID.h>
 #include <wtf/text/WTFString.h>
 
 namespace IPC {
@@ -43,7 +43,7 @@ struct StorageProcessCreationParameters {
     void encode(IPC::Encoder&) const;
     static bool decode(IPC::Decoder&, StorageProcessCreationParameters&);
 
-    WebCore::SessionID sessionID;
+    PAL::SessionID sessionID;
     
 #if ENABLE(INDEXED_DATABASE)
     String indexedDatabaseDirectory;
index 99c3954..14a823c 100644 (file)
@@ -61,7 +61,6 @@
 #include <WebCore/ScrollingConstraints.h>
 #include <WebCore/ScrollingCoordinator.h>
 #include <WebCore/SearchPopupMenu.h>
-#include <WebCore/SessionID.h>
 #include <WebCore/TextCheckerClient.h>
 #include <WebCore/TextIndicator.h>
 #include <WebCore/TimingFunction.h>
@@ -70,6 +69,7 @@
 #include <WebCore/UserStyleSheet.h>
 #include <WebCore/ViewportArguments.h>
 #include <WebCore/WindowFeatures.h>
+#include <pal/identifier/SessionID.h>
 #include <wtf/MonotonicTime.h>
 #include <wtf/Seconds.h>
 #include <wtf/text/CString.h>
index b022a03..0d0c814 100644 (file)
@@ -44,6 +44,10 @@ class MonotonicTime;
 class Seconds;
 }
 
+namespace PAL {
+class SessionID;
+}
+
 namespace WebCore {
 class AffineTransform;
 class AuthenticationChallenge;
@@ -78,7 +82,6 @@ class Region;
 class ResourceError;
 class ResourceRequest;
 class ResourceResponse;
-class SessionID;
 class SpringTimingFunction;
 class StepsTimingFunction;
 class StickyPositionViewportConstraints;
index 3763c87..c9e59a8 100644 (file)
@@ -41,8 +41,8 @@
 #include <WebCore/MediaProducer.h>
 #include <WebCore/Pagination.h>
 #include <WebCore/ScrollTypes.h>
-#include <WebCore/SessionID.h>
 #include <WebCore/UserInterfaceLayoutDirection.h>
+#include <pal/identifier/SessionID.h>
 #include <wtf/HashMap.h>
 #include <wtf/text/WTFString.h>
 
@@ -88,7 +88,7 @@ struct WebPageCreationParameters {
     String userAgent;
 
     Vector<BackForwardListItemState> itemStates;
-    WebCore::SessionID sessionID;
+    PAL::SessionID sessionID;
     uint64_t highestUsedBackForwardItemID;
 
     uint64_t userContentControllerID;
index 672b65b..d998802 100644 (file)
@@ -29,7 +29,7 @@
 #include "SandboxExtension.h"
 #include "TextCheckerState.h"
 #include "UserData.h"
-#include <WebCore/SessionID.h>
+#include <pal/identifier/SessionID.h>
 #include <wtf/RetainPtr.h>
 #include <wtf/Vector.h>
 #include <wtf/text/StringHash.h>
@@ -155,7 +155,7 @@ struct WebProcessCreationParameters {
     HashMap<String, bool> notificationPermissions;
 #endif
 
-    HashMap<WebCore::SessionID, HashMap<unsigned, double>> plugInAutoStartOriginHashes;
+    HashMap<PAL::SessionID, HashMap<unsigned, double>> plugInAutoStartOriginHashes;
     Vector<String> plugInAutoStartOrigins;
 
 #if ENABLE(NETSCAPE_PLUGIN_API)
index e92c07f..e401a96 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "SandboxExtension.h"
 #include <WebCore/Cookie.h>
-#include <WebCore/SessionID.h>
+#include <pal/identifier/SessionID.h>
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
 
@@ -46,7 +46,7 @@ struct WebsiteDataStoreParameters {
     void encode(IPC::Encoder&) const;
     static bool decode(IPC::Decoder&, WebsiteDataStoreParameters&);
 
-    WebCore::SessionID sessionID;
+    PAL::SessionID sessionID;
     Vector<uint8_t> uiProcessCookieStorageIdentifier;
     SandboxExtension::Handle cookieStoragePathExtensionHandle;
     Vector<WebCore::Cookie> pendingCookies;
index 52912fa..342748d 100644 (file)
@@ -31,9 +31,9 @@
 #include "NetworkProcessConnection.h"
 #include "WebCoreArgumentCoders.h"
 #include "WebProcess.h"
-#include <WebCore/SessionID.h>
 #include <WebCore/URL.h>
 #include <dlfcn.h>
+#include <pal/identifier/SessionID.h>
 #include <pal/spi/cf/CFNetworkSPI.h>
 #include <wtf/MainThread.h>
 #include <wtf/RetainPtr.h>
@@ -57,7 +57,7 @@ static CFDictionaryRef webKitCookieStorageCopyRequestHeaderFieldsForURL(CFHTTPCo
 {
     String cookies;
     URL firstPartyForCookiesURL;
-    if (!WebProcess::singleton().networkConnection().connection().sendSync(Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue(SessionID::defaultSessionID(), firstPartyForCookiesURL, inRequestURL), Messages::NetworkConnectionToWebProcess::CookiesForDOM::Reply(cookies), 0))
+    if (!WebProcess::singleton().networkConnection().connection().sendSync(Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue(PAL::SessionID::defaultSessionID(), firstPartyForCookiesURL, inRequestURL), Messages::NetworkConnectionToWebProcess::CookiesForDOM::Reply(cookies), 0))
         return 0;
 
     if (cookies.isNull())
index 1ff7be8..bd04501 100644 (file)
@@ -45,12 +45,12 @@ using namespace WebCore;
 
 namespace WebKit {
 
-Ref<WebIDBConnectionToClient> WebIDBConnectionToClient::create(StorageToWebProcessConnection& connection, uint64_t serverConnectionIdentifier, WebCore::SessionID sessionID)
+Ref<WebIDBConnectionToClient> WebIDBConnectionToClient::create(StorageToWebProcessConnection& connection, uint64_t serverConnectionIdentifier, PAL::SessionID sessionID)
 {
     return adoptRef(*new WebIDBConnectionToClient(connection, serverConnectionIdentifier, sessionID));
 }
 
-WebIDBConnectionToClient::WebIDBConnectionToClient(StorageToWebProcessConnection& connection, uint64_t serverConnectionIdentifier, WebCore::SessionID sessionID)
+WebIDBConnectionToClient::WebIDBConnectionToClient(StorageToWebProcessConnection& connection, uint64_t serverConnectionIdentifier, PAL::SessionID sessionID)
     : m_connection(connection)
     , m_identifier(serverConnectionIdentifier)
     , m_sessionID(sessionID)
index f343e13..883381d 100644 (file)
@@ -30,7 +30,7 @@
 #include "MessageSender.h"
 #include "StorageToWebProcessConnection.h"
 #include <WebCore/IDBConnectionToClient.h>
-#include <WebCore/SessionID.h>
+#include <pal/identifier/SessionID.h>
 
 namespace WebCore {
 class IDBCursorInfo;
@@ -52,7 +52,7 @@ namespace WebKit {
 
 class WebIDBConnectionToClient final : public WebCore::IDBServer::IDBConnectionToClientDelegate, public IPC::MessageSender, public RefCounted<WebIDBConnectionToClient> {
 public:
-    static Ref<WebIDBConnectionToClient> create(StorageToWebProcessConnection&, uint64_t serverConnectionIdentifier, WebCore::SessionID);
+    static Ref<WebIDBConnectionToClient> create(StorageToWebProcessConnection&, uint64_t serverConnectionIdentifier, PAL::SessionID);
 
     virtual ~WebIDBConnectionToClient();
 
@@ -126,7 +126,7 @@ public:
     void didReceiveMessage(IPC::Connection&, IPC::Decoder&);
 
 private:
-    WebIDBConnectionToClient(StorageToWebProcessConnection&, uint64_t serverConnectionIdentifier, WebCore::SessionID);
+    WebIDBConnectionToClient(StorageToWebProcessConnection&, uint64_t serverConnectionIdentifier, PAL::SessionID);
 
     IPC::Connection* messageSenderConnection() final;
 
@@ -135,7 +135,7 @@ private:
     Ref<StorageToWebProcessConnection> m_connection;
 
     uint64_t m_identifier;
-    WebCore::SessionID m_sessionID;
+    PAL::SessionID m_sessionID;
     RefPtr<WebCore::IDBServer::IDBConnectionToClient> m_connectionToClient;
 };
 
index 1cc7a6b..9946a68 100644 (file)
@@ -35,8 +35,8 @@
 #include <WebCore/FileSystem.h>
 #include <WebCore/IDBKeyData.h>
 #include <WebCore/NotImplemented.h>
-#include <WebCore/SessionID.h>
 #include <WebCore/TextEncoding.h>
+#include <pal/identifier/SessionID.h>
 #include <wtf/CrossThreadTask.h>
 #include <wtf/MainThread.h>
 
@@ -89,7 +89,7 @@ void StorageProcess::didReceiveMessage(IPC::Connection& connection, IPC::Decoder
 }
 
 #if ENABLE(INDEXED_DATABASE)
-IDBServer::IDBServer& StorageProcess::idbServer(SessionID sessionID)
+IDBServer::IDBServer& StorageProcess::idbServer(PAL::SessionID sessionID)
 {
     auto addResult = m_idbServers.add(sessionID, nullptr);
     if (!addResult.isNewEntry) {
@@ -98,8 +98,8 @@ IDBServer::IDBServer& StorageProcess::idbServer(SessionID sessionID)
     }
 
     auto path = m_idbDatabasePaths.get(sessionID);
-    // There should already be a registered path for this SessionID.
-    // If there's not, then where did this SessionID come from?
+    // There should already be a registered path for this PAL::SessionID.
+    // If there's not, then where did this PAL::SessionID come from?
     ASSERT(!path.isEmpty());
 
     addResult.iterator->value = IDBServer::IDBServer::create(path, StorageProcess::singleton());
@@ -181,7 +181,7 @@ void StorageProcess::createStorageToWebProcessConnection()
 #endif
 }
 
-void StorageProcess::fetchWebsiteData(SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, uint64_t callbackID)
+void StorageProcess::fetchWebsiteData(PAL::SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, uint64_t callbackID)
 {
 #if ENABLE(INDEXED_DATABASE)
     auto completionHandler = [this, callbackID](const WebsiteData& websiteData) {
@@ -209,7 +209,7 @@ void StorageProcess::fetchWebsiteData(SessionID sessionID, OptionSet<WebsiteData
 #endif
 }
 
-void StorageProcess::deleteWebsiteData(WebCore::SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, std::chrono::system_clock::time_point modifiedSince, uint64_t callbackID)
+void StorageProcess::deleteWebsiteData(PAL::SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, std::chrono::system_clock::time_point modifiedSince, uint64_t callbackID)
 {
 #if ENABLE(INDEXED_DATABASE)
     auto completionHandler = [this, callbackID]() {
@@ -225,7 +225,7 @@ void StorageProcess::deleteWebsiteData(WebCore::SessionID sessionID, OptionSet<W
 #endif
 }
 
-void StorageProcess::deleteWebsiteDataForOrigins(WebCore::SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, const Vector<SecurityOriginData>& securityOriginDatas, uint64_t callbackID)
+void StorageProcess::deleteWebsiteDataForOrigins(PAL::SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, const Vector<SecurityOriginData>& securityOriginDatas, uint64_t callbackID)
 {
 #if ENABLE(INDEXED_DATABASE)
     auto completionHandler = [this, callbackID]() {
index 3bc72e2..b8c7f77 100644 (file)
@@ -29,8 +29,8 @@
 #include "SandboxExtension.h"
 #include <WebCore/IDBBackingStore.h>
 #include <WebCore/IDBServer.h>
-#include <WebCore/SessionID.h>
 #include <WebCore/UniqueIDBDatabase.h>
+#include <pal/identifier/SessionID.h>
 #include <wtf/CrossThreadTask.h>
 #include <wtf/Function.h>
 
@@ -56,7 +56,7 @@ public:
     ~StorageProcess();
 
 #if ENABLE(INDEXED_DATABASE)
-    WebCore::IDBServer::IDBServer& idbServer(WebCore::SessionID);
+    WebCore::IDBServer::IDBServer& idbServer(PAL::SessionID);
 #endif
 
     WorkQueue& queue() { return m_queue.get(); }
@@ -92,9 +92,9 @@ private:
     void initializeWebsiteDataStore(const StorageProcessCreationParameters&);
     void createStorageToWebProcessConnection();
 
-    void fetchWebsiteData(WebCore::SessionID, OptionSet<WebsiteDataType> websiteDataTypes, uint64_t callbackID);
-    void deleteWebsiteData(WebCore::SessionID, OptionSet<WebsiteDataType> websiteDataTypes, std::chrono::system_clock::time_point modifiedSince, uint64_t callbackID);
-    void deleteWebsiteDataForOrigins(WebCore::SessionID, OptionSet<WebsiteDataType> websiteDataTypes, const Vector<WebCore::SecurityOriginData>& origins, uint64_t callbackID);
+    void fetchWebsiteData(PAL::SessionID, OptionSet<WebsiteDataType> websiteDataTypes, uint64_t callbackID);
+    void deleteWebsiteData(PAL::SessionID, OptionSet<WebsiteDataType> websiteDataTypes, std::chrono::system_clock::time_point modifiedSince, uint64_t callbackID);
+    void deleteWebsiteDataForOrigins(PAL::SessionID, OptionSet<WebsiteDataType> websiteDataTypes, const Vector<WebCore::SecurityOriginData>& origins, uint64_t callbackID);
 #if ENABLE(SANDBOX_EXTENSIONS)
     void grantSandboxExtensionsForBlobs(const Vector<String>& paths, const SandboxExtension::HandleArray&);
     void didGetSandboxExtensionsForBlobFiles(uint64_t requestID, SandboxExtension::HandleArray&&);
@@ -113,8 +113,8 @@ private:
     Ref<WorkQueue> m_queue;
 
 #if ENABLE(INDEXED_DATABASE)
-    HashMap<WebCore::SessionID, String> m_idbDatabasePaths;
-    HashMap<WebCore::SessionID, RefPtr<WebCore::IDBServer::IDBServer>> m_idbServers;
+    HashMap<PAL::SessionID, String> m_idbDatabasePaths;
+    HashMap<PAL::SessionID, RefPtr<WebCore::IDBServer::IDBServer>> m_idbServers;
 #endif
     HashMap<String, RefPtr<SandboxExtension>> m_blobTemporaryFileSandboxExtensions;
     HashMap<uint64_t, WTF::Function<void (SandboxExtension::HandleArray&&)>> m_sandboxExtensionForBlobsCompletionHandlers;
index 4bdec73..c9deadf 100644 (file)
@@ -27,9 +27,9 @@ messages -> StorageProcess LegacyReceiver {
     # Creates a connection for communication with a WebProcess
     CreateStorageToWebProcessConnection()
 
-    FetchWebsiteData(WebCore::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes, uint64_t callbackID)
-    DeleteWebsiteData(WebCore::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes, std::chrono::system_clock::time_point modifiedSince, uint64_t callbackID)
-    DeleteWebsiteDataForOrigins(WebCore::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes, Vector<WebCore::SecurityOriginData> origins, uint64_t callbackID)
+    FetchWebsiteData(PAL::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes, uint64_t callbackID)
+    DeleteWebsiteData(PAL::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes, std::chrono::system_clock::time_point modifiedSince, uint64_t callbackID)
+    DeleteWebsiteDataForOrigins(PAL::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes, Vector<WebCore::SecurityOriginData> origins, uint64_t callbackID)
 #if ENABLE(SANDBOX_EXTENSIONS)
     GrantSandboxExtensionsForBlobs(Vector<String> paths, WebKit::SandboxExtension::HandleArray extensions)
     DidGetSandboxExtensionsForBlobFiles(uint64_t requestID, WebKit::SandboxExtension::HandleArray extensions)
index 4acc264..de91911 100644 (file)
@@ -105,7 +105,7 @@ static uint64_t generateConnectionToServerIdentifier()
     return ++identifier;
 }
 
-void StorageToWebProcessConnection::establishIDBConnectionToServer(WebCore::SessionID sessionID, uint64_t& serverConnectionIdentifier)
+void StorageToWebProcessConnection::establishIDBConnectionToServer(PAL::SessionID sessionID, uint64_t& serverConnectionIdentifier)
 {
     serverConnectionIdentifier = generateConnectionToServerIdentifier();
     LOG(IndexedDB, "StorageToWebProcessConnection::establishIDBConnectionToServer - %" PRIu64, serverConnectionIdentifier);
index 12ffe95..5be9832 100644 (file)
@@ -28,7 +28,7 @@
 #include "Connection.h"
 #include "MessageSender.h"
 
-#include <WebCore/SessionID.h>
+#include <pal/identifier/SessionID.h>
 #include <wtf/HashMap.h>
 
 namespace WebKit {
@@ -59,7 +59,7 @@ private:
 
 #if ENABLE(INDEXED_DATABASE)
     // Messages handlers (Modern IDB)
-    void establishIDBConnectionToServer(WebCore::SessionID, uint64_t& serverConnectionIdentifier);
+    void establishIDBConnectionToServer(PAL::SessionID, uint64_t& serverConnectionIdentifier);
     void removeIDBConnectionToServer(uint64_t serverConnectionIdentifier);
 
     HashMap<uint64_t, RefPtr<WebIDBConnectionToClient>> m_webIDBConnections;
index 5876120..8d108f6 100644 (file)
@@ -23,7 +23,7 @@
 messages -> StorageToWebProcessConnection LegacyReceiver {
 #if ENABLE(INDEXED_DATABASE)
     # Creates a connection for communication with a WebProcess
-    EstablishIDBConnectionToServer(WebCore::SessionID sessionID) -> (uint64_t serverConnectionIdentifier)
+    EstablishIDBConnectionToServer(PAL::SessionID sessionID) -> (uint64_t serverConnectionIdentifier)
     RemoveIDBConnectionToServer(uint64_t serverConnectionIdentifier)
 #endif
 }
index f03a4e9..2fe3fa6 100644 (file)
@@ -150,17 +150,17 @@ void PageConfiguration::setWebsiteDataStore(API::WebsiteDataStore* websiteDataSt
     if (m_websiteDataStore)
         m_sessionID = m_websiteDataStore->websiteDataStore().sessionID();
     else
-        m_sessionID = WebCore::SessionID();
+        m_sessionID = PAL::SessionID();
 }
 
-WebCore::SessionID PageConfiguration::sessionID()
+PAL::SessionID PageConfiguration::sessionID()
 {
-    ASSERT(!m_websiteDataStore || m_websiteDataStore->websiteDataStore().sessionID() == m_sessionID || m_sessionID == SessionID::legacyPrivateSessionID());
+    ASSERT(!m_websiteDataStore || m_websiteDataStore->websiteDataStore().sessionID() == m_sessionID || m_sessionID == PAL::SessionID::legacyPrivateSessionID());
 
     return m_sessionID;
 }
 
-void PageConfiguration::setSessionID(WebCore::SessionID sessionID)
+void PageConfiguration::setSessionID(PAL::SessionID sessionID)
 {
     m_sessionID = sessionID;
 }
index b2ae247..23c011e 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "APIObject.h"
 #include "WebPreferencesStore.h"
-#include <WebCore/SessionID.h>
+#include <pal/identifier/SessionID.h>
 #include <wtf/Forward.h>
 #include <wtf/GetPtr.h>
 
@@ -81,8 +81,8 @@ public:
     void setWebsiteDataStore(WebsiteDataStore*);
 
     // FIXME: Once PageConfigurations *always* have a data store, get rid of the separate sessionID.
-    WebCore::SessionID sessionID();
-    void setSessionID(WebCore::SessionID);
+    PAL::SessionID sessionID();
+    void setSessionID(PAL::SessionID);
 
     bool treatsSHA1SignedCertificatesAsInsecure() { return m_treatsSHA1SignedCertificatesAsInsecure; }
     void setTreatsSHA1SignedCertificatesAsInsecure(bool treatsSHA1SignedCertificatesAsInsecure) { m_treatsSHA1SignedCertificatesAsInsecure = treatsSHA1SignedCertificatesAsInsecure; } 
@@ -119,7 +119,7 @@ private:
     RefPtr<WebsiteDataStore> m_websiteDataStore;
     // FIXME: We currently have to pass the session ID separately here to support the legacy private browsing session.
     // Once we get rid of it we should get rid of this configuration parameter as well.
-    WebCore::SessionID m_sessionID;
+    PAL::SessionID m_sessionID;
 
     bool m_treatsSHA1SignedCertificatesAsInsecure = true;
 #if PLATFORM(IOS)
index 0db5dd9..50fa60b 100644 (file)
@@ -35,7 +35,7 @@ Ref<WebsiteDataStore> WebsiteDataStore::defaultDataStore()
 {
     WebKit::InitializeWebKit2();
 
-    static WebsiteDataStore* defaultDataStore = adoptRef(new WebsiteDataStore(defaultDataStoreConfiguration(), WebCore::SessionID::defaultSessionID())).leakRef();
+    static WebsiteDataStore* defaultDataStore = adoptRef(new WebsiteDataStore(defaultDataStoreConfiguration(), PAL::SessionID::defaultSessionID())).leakRef();
 
     return *defaultDataStore;
 }
@@ -47,7 +47,7 @@ Ref<WebsiteDataStore> WebsiteDataStore::createNonPersistentDataStore()
 
 Ref<WebsiteDataStore> WebsiteDataStore::createLegacy(WebKit::WebsiteDataStore::Configuration configuration)
 {
-    return adoptRef(*new WebsiteDataStore(WTFMove(configuration), WebCore::SessionID::defaultSessionID()));
+    return adoptRef(*new WebsiteDataStore(WTFMove(configuration), PAL::SessionID::defaultSessionID()));
 }
 
 WebsiteDataStore::WebsiteDataStore()
@@ -55,7 +55,7 @@ WebsiteDataStore::WebsiteDataStore()
 {
 }
 
-WebsiteDataStore::WebsiteDataStore(WebKit::WebsiteDataStore::Configuration configuration, WebCore::SessionID sessionID)
+WebsiteDataStore::WebsiteDataStore(WebKit::WebsiteDataStore::Configuration configuration, PAL::SessionID sessionID)
     : m_websiteDataStore(WebKit::WebsiteDataStore::create(WTFMove(configuration), sessionID))
 {
 }
index 238c6c4..44b1d3d 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "APIHTTPCookieStore.h"
 #include "WebsiteDataStore.h"
-#include <WebCore/SessionID.h>
+#include <pal/identifier/SessionID.h>
 #include <wtf/text/WTFString.h>
 
 namespace API {
@@ -39,7 +39,7 @@ public:
     static Ref<WebsiteDataStore> createNonPersistentDataStore();
     static Ref<WebsiteDataStore> createLegacy(WebKit::WebsiteDataStore::Configuration);
 
-    explicit WebsiteDataStore(WebKit::WebsiteDataStore::Configuration, WebCore::SessionID);
+    explicit WebsiteDataStore(WebKit::WebsiteDataStore::Configuration, PAL::SessionID);
     virtual ~WebsiteDataStore();
 
     bool isPersistent();
index 190f551..aa62f26 100644 (file)
@@ -44,17 +44,17 @@ void WKCookieManagerSetClient(WKCookieManagerRef cookieManagerRef, const WKCooki
 
 void WKCookieManagerGetHostnamesWithCookies(WKCookieManagerRef cookieManagerRef, void* context, WKCookieManagerGetCookieHostnamesFunction callback)
 {
-    toImpl(cookieManagerRef)->getHostnamesWithCookies(WebCore::SessionID::defaultSessionID(), toGenericCallbackFunction(context, callback));
+    toImpl(cookieManagerRef)->getHostnamesWithCookies(PAL::SessionID::defaultSessionID(), toGenericCallbackFunction(context, callback));
 }
 
 void WKCookieManagerDeleteCookiesForHostname(WKCookieManagerRef cookieManagerRef, WKStringRef hostname)
 {
-    toImpl(cookieManagerRef)->deleteCookiesForHostname(WebCore::SessionID::defaultSessionID(), toImpl(hostname)->string());
+    toImpl(cookieManagerRef)->deleteCookiesForHostname(PAL::SessionID::defaultSessionID(), toImpl(hostname)->string());
 }
 
 void WKCookieManagerDeleteAllCookies(WKCookieManagerRef cookieManagerRef)
 {
-    toImpl(cookieManagerRef)->deleteAllCookies(WebCore::SessionID::defaultSessionID());
+    toImpl(cookieManagerRef)->deleteAllCookies(PAL::SessionID::defaultSessionID());
 }
 
 void WKCookieManagerDeleteAllCookiesModifiedAfterDate(WKCookieManagerRef cookieManagerRef, double date)
@@ -62,17 +62,17 @@ void WKCookieManagerDeleteAllCookiesModifiedAfterDate(WKCookieManagerRef cookieM
     using namespace std::chrono;
 
     auto time = system_clock::time_point(duration_cast<system_clock::duration>(duration<double>(date)));
-    toImpl(cookieManagerRef)->deleteAllCookiesModifiedSince(WebCore::SessionID::defaultSessionID(), time, [](CallbackBase::Error){});
+    toImpl(cookieManagerRef)->deleteAllCookiesModifiedSince(PAL::SessionID::defaultSessionID(), time, [](CallbackBase::Error){});
 }
 
 void WKCookieManagerSetHTTPCookieAcceptPolicy(WKCookieManagerRef cookieManager, WKHTTPCookieAcceptPolicy policy)
 {
-    toImpl(cookieManager)->setHTTPCookieAcceptPolicy(WebCore::SessionID::defaultSessionID(), toHTTPCookieAcceptPolicy(policy), [](CallbackBase::Error){});
+    toImpl(cookieManager)->setHTTPCookieAcceptPolicy(PAL::SessionID::defaultSessionID(), toHTTPCookieAcceptPolicy(policy), [](CallbackBase::Error){});
 }
 
 void WKCookieManagerGetHTTPCookieAcceptPolicy(WKCookieManagerRef cookieManager, void* context, WKCookieManagerGetHTTPCookieAcceptPolicyFunction callback)
 {
-    toImpl(cookieManager)->getHTTPCookieAcceptPolicy(WebCore::SessionID::defaultSessionID(), toGenericCallbackFunction<WKHTTPCookieAcceptPolicy, HTTPCookieAcceptPolicy>(context, callback));
+    toImpl(cookieManager)->getHTTPCookieAcceptPolicy(PAL::SessionID::defaultSessionID(), toGenericCallbackFunction<WKHTTPCookieAcceptPolicy, HTTPCookieAcceptPolicy>(context, callback));
 }
 
 void WKCookieManagerSetCookieStoragePartitioningEnabled(WKCookieManagerRef cookieManager, bool enabled)
@@ -82,10 +82,10 @@ void WKCookieManagerSetCookieStoragePartitioningEnabled(WKCookieManagerRef cooki
 
 void WKCookieManagerStartObservingCookieChanges(WKCookieManagerRef cookieManager)
 {
-    toImpl(cookieManager)->startObservingCookieChanges(WebCore::SessionID::defaultSessionID());
+    toImpl(cookieManager)->startObservingCookieChanges(PAL::SessionID::defaultSessionID());
 }
 
 void WKCookieManagerStopObservingCookieChanges(WKCookieManagerRef cookieManager)
 {
-    toImpl(cookieManager)->stopObservingCookieChanges(WebCore::SessionID::defaultSessionID());
+    toImpl(cookieManager)->stopObservingCookieChanges(PAL::SessionID::defaultSessionID());
 }
index 4dd8a0d..1f5974d 100644 (file)
@@ -200,7 +200,7 @@ static WebKit::HTTPCookieAcceptPolicy toHTTPCookieAcceptPolicy(NSHTTPCookieAccep
 
 - (void)_setCookieAcceptPolicy:(NSHTTPCookieAcceptPolicy)policy
 {
-    _processPool->supplement<WebKit::WebCookieManagerProxy>()->setHTTPCookieAcceptPolicy(WebCore::SessionID::defaultSessionID(), toHTTPCookieAcceptPolicy(policy), [](WebKit::CallbackBase::Error){});
+    _processPool->supplement<WebKit::WebCookieManagerProxy>()->setHTTPCookieAcceptPolicy(PAL::SessionID::defaultSessionID(), toHTTPCookieAcceptPolicy(policy), [](WebKit::CallbackBase::Error){});
 }
 
 - (id)_objectForBundleParameter:(NSString *)parameter
index 41b18d0..8c1212b 100644 (file)
@@ -190,7 +190,7 @@ static Vector<WebKit::WebsiteDataRecord> toWebsiteDataRecords(NSArray *dataRecor
     if (configuration._cookieStorageFile)
         config.cookieStorageFile = configuration._cookieStorageFile.path;
 
-    API::Object::constructInWrapper<API::WebsiteDataStore>(self, config, WebCore::SessionID::generatePersistentSessionID());
+    API::Object::constructInWrapper<API::WebsiteDataStore>(self, config, PAL::SessionID::generatePersistentSessionID());
 
     return self;
 }
index d7eac84..2ef542e 100644 (file)
@@ -27,7 +27,7 @@
 #include "WebKitWebsiteDataManagerPrivate.h"
 #include "WebKitWebsiteDataPrivate.h"
 #include "WebsiteDataRecord.h"
-#include <WebCore/SessionID.h>
+#include <pal/identifier/SessionID.h>
 #include <wtf/glib/GRefPtr.h>
 #include <wtf/glib/WTFGType.h>
 #include <wtf/text/CString.h>
@@ -180,7 +180,7 @@ void webkit_cookie_manager_set_accept_policy(WebKitCookieManager* manager, WebKi
     g_return_if_fail(WEBKIT_IS_COOKIE_MANAGER(manager));
 
     for (auto* processPool : webkitWebsiteDataManagerGetProcessPools(manager->priv->dataManager))
-        processPool->supplement<WebCookieManagerProxy>()->setHTTPCookieAcceptPolicy(WebCore::SessionID::defaultSessionID(), toHTTPCookieAcceptPolicy(policy), [](CallbackBase::Error){});
+        processPool->supplement<WebCookieManagerProxy>()->setHTTPCookieAcceptPolicy(PAL::SessionID::defaultSessionID(), toHTTPCookieAcceptPolicy(policy), [](CallbackBase::Error){});
 }
 
 /**
@@ -208,7 +208,7 @@ void webkit_cookie_manager_get_accept_policy(WebKitCookieManager* manager, GCanc
         return;
     }
 
-    processPools[0]->supplement<WebCookieManagerProxy>()->getHTTPCookieAcceptPolicy(WebCore::SessionID::defaultSessionID(), [task = WTFMove(task)](HTTPCookieAcceptPolicy policy, CallbackBase::Error) {
+    processPools[0]->supplement<WebCookieManagerProxy>()->getHTTPCookieAcceptPolicy(PAL::SessionID::defaultSessionID(), [task = WTFMove(task)](HTTPCookieAcceptPolicy policy, CallbackBase::Error) {
         g_task_return_int(task.get(), toWebKitCookieAcceptPolicy(policy));
     });
 }