[GTK][WPE] Move proxy settings from WebKitContext to WebKitWebsiteDataManager
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Sep 2020 16:14:55 +0000 (16:14 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Sep 2020 16:14:55 +0000 (16:14 +0000)
commit8a99eb93db6f29b529f34a77d5a71b67e56b48de
tree69f3182b041cafa1a3cc4a1955925fe6610e629f
parent825fb0f3b9f9376d738b8520c09ff79cff846687
[GTK][WPE] Move proxy settings from WebKitContext to WebKitWebsiteDataManager
https://bugs.webkit.org/show_bug.cgi?id=216927

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2020-09-24
Reviewed by Alex Christensen.

Source/WebCore:

Make proxySettings a member of SoupNetworkSession, instead of being global.

* platform/network/soup/SoupNetworkSession.cpp:
(WebCore::SoupNetworkSession::SoupNetworkSession):
(WebCore::SoupNetworkSession::setProxySettings):
(WebCore::proxySettings): Deleted.
(WebCore::SoupNetworkSession::setupProxy): Deleted.
* platform/network/soup/SoupNetworkSession.h:

Source/WebKit:

Make proxy settings per session instead of global to the network process. The web context API now simply
forwards the request to the website data manager.

* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* NetworkProcess/NetworkSessionCreationParameters.cpp:
(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):
* NetworkProcess/NetworkSessionCreationParameters.h:
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
(WebKit::NetworkProcess::setNetworkProxySettings):
* NetworkProcess/soup/NetworkSessionSoup.cpp:
(WebKit::NetworkSessionSoup::NetworkSessionSoup):
(WebKit::NetworkSessionSoup::setProxySettings):
* NetworkProcess/soup/NetworkSessionSoup.h:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/glib/WebKitAutomationSession.cpp:
(webkitAutomationSessionCreate):
* UIProcess/API/glib/WebKitWebContext.cpp:
(webkit_web_context_set_network_proxy_settings):
* UIProcess/API/glib/WebKitWebView.cpp:
(webkitWebViewConstructed):
* UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
(webkit_website_data_manager_set_network_proxy_settings):
* UIProcess/API/gtk/WebKitNetworkProxySettings.h:
* UIProcess/API/gtk/WebKitWebContext.h:
* UIProcess/API/gtk/WebKitWebsiteDataManager.h:
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
* UIProcess/API/wpe/WebKitNetworkProxySettings.h:
* UIProcess/API/wpe/WebKitWebContext.h:
* UIProcess/API/wpe/WebKitWebsiteDataManager.h:
* UIProcess/API/wpe/docs/wpe-1.0-sections.txt:
* UIProcess/WebProcessPool.h:
* UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::networkProxySettings const):
* UIProcess/WebsiteData/soup/WebsiteDataStoreSoup.cpp:
(WebKit::WebsiteDataStore::platformSetNetworkParameters):
(WebKit::WebsiteDataStore::setNetworkProxySettings):
* UIProcess/glib/WebProcessPoolGLib.cpp:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* UIProcess/soup/WebProcessPoolSoup.cpp:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
(WebKit::WebProcessPool::setNetworkProxySettings): Deleted.

Tools:

Use the new API in tests.

* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:
(testWebContextProxySettings):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267534 268f45cc-cd09-0410-ab3c-d52691b4dbfc
34 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/network/soup/SoupNetworkSession.cpp
Source/WebCore/platform/network/soup/SoupNetworkSession.h
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/NetworkProcess.h
Source/WebKit/NetworkProcess/NetworkProcess.messages.in
Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp
Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h
Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.cpp
Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h
Source/WebKit/NetworkProcess/soup/NetworkProcessSoup.cpp
Source/WebKit/NetworkProcess/soup/NetworkSessionSoup.cpp
Source/WebKit/NetworkProcess/soup/NetworkSessionSoup.h
Source/WebKit/Shared/WebProcessCreationParameters.cpp
Source/WebKit/Shared/WebProcessCreationParameters.h
Source/WebKit/UIProcess/API/glib/WebKitAutomationSession.cpp
Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
Source/WebKit/UIProcess/API/glib/WebKitWebsiteDataManager.cpp
Source/WebKit/UIProcess/API/gtk/WebKitNetworkProxySettings.h
Source/WebKit/UIProcess/API/gtk/WebKitWebContext.h
Source/WebKit/UIProcess/API/gtk/WebKitWebsiteDataManager.h
Source/WebKit/UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt
Source/WebKit/UIProcess/API/wpe/WebKitNetworkProxySettings.h
Source/WebKit/UIProcess/API/wpe/WebKitWebContext.h
Source/WebKit/UIProcess/API/wpe/WebKitWebsiteDataManager.h
Source/WebKit/UIProcess/API/wpe/docs/wpe-1.0-sections.txt
Source/WebKit/UIProcess/WebProcessPool.h
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
Source/WebKit/UIProcess/WebsiteData/soup/WebsiteDataStoreSoup.cpp
Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
Source/WebKit/UIProcess/soup/WebProcessPoolSoup.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp