[SOUP] Clean up NetworkStorageSession
authormcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Jan 2019 17:24:19 +0000 (17:24 +0000)
committermcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Jan 2019 17:24:19 +0000 (17:24 +0000)
commitd3b027f901a005d40e2729a4188a01f15e6f6460
tree63efda008fe35462da3578923a483e7e796030da
parentb0f82e2382830209b8a028d3b2d9d9e58b37f912
[SOUP] Clean up NetworkStorageSession
https://bugs.webkit.org/show_bug.cgi?id=193707

Reviewed by Carlos Garcia Campos.

Source/WebCore:

A NetworkStorageSession now always has a SoupNetworkSession, so we can remove a lot of
complexity that is no longer needed. getOrCreateSoupNetworkSession can go away because we
know the session has always already been created. The soupNetworkSession getter can now
return a reference rather than a pointer, because it will never be NULL except after it has
been cleared with clearSoupNetworkSession (renamed), and that should only happen immediately
before process termination after nothing else is using it. Cookie jar syncing can also go
away; the NetworkStorageSession can now rely on the SoupNetworkSession to exist and just
use its cookie jar.

* platform/network/NetworkStorageSession.h:
(WebCore::NetworkStorageSession::soupNetworkSession const): Deleted.
* platform/network/soup/DNSResolveQueueSoup.cpp:
(WebCore::DNSResolveQueueSoup::updateIsUsingProxy):
(WebCore::DNSResolveQueueSoup::platformResolve):
(WebCore::DNSResolveQueueSoup::resolve):
* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::NetworkStorageSession):
(WebCore::NetworkStorageSession::~NetworkStorageSession):
(WebCore::NetworkStorageSession::soupNetworkSession const):
(WebCore::NetworkStorageSession::clearSoupNetworkSession):
(WebCore::NetworkStorageSession::cookieStorage const):
(WebCore::NetworkStorageSession::setCookieStorage):
(WebCore::NetworkStorageSession::getOrCreateSoupNetworkSession const): Deleted.
(WebCore::NetworkStorageSession::clearSoupNetworkSessionAndCookieStorage): Deleted.
* platform/network/soup/SocketStreamHandleImplSoup.cpp:
(WebCore::SocketStreamHandleImpl::create):

Source/WebKit:

Restore an important call to clearSoupNetworkSession that was removed in r240292. Also,
adapt to NetworkStorageSessions API changes.

* NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp:
(WebKit::LegacyCustomProtocolManager::registerScheme):
* NetworkProcess/soup/NetworkProcessMainSoup.cpp:
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::userPreferredLanguagesChanged):
(WebKit::NetworkProcess::setNetworkProxySettings):
* NetworkProcess/soup/NetworkSessionSoup.cpp:
(WebKit::NetworkSessionSoup::soupSession const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240340 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/network/NetworkStorageSession.h
Source/WebCore/platform/network/soup/DNSResolveQueueSoup.cpp
Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp
Source/WebCore/platform/network/soup/SocketStreamHandleImplSoup.cpp
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp
Source/WebKit/NetworkProcess/soup/NetworkProcessMainSoup.cpp
Source/WebKit/NetworkProcess/soup/NetworkProcessSoup.cpp
Source/WebKit/NetworkProcess/soup/NetworkSessionSoup.cpp