[Webkit-unassigned] [Bug 222366] [WPE][GTK] Reconsider moving network session APIs to WebKitWebsiteDataManager

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 12 05:30:03 PST 2023


https://bugs.webkit.org/show_bug.cgi?id=222366

Carlos Garcia Campos <cgarcia at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cgarcia at igalia.com

--- Comment #4 from Carlos Garcia Campos <cgarcia at igalia.com> ---
I've been looking at this. The good thing of not introducing thi new api in the old api is that we have more flixibility to change the behavior too. So, I propose to change the way it currently works and move to something similar to apple. This is my proposal:

1.- Only support one network process: I don't see any reason to use more than one, you can just have different sessions in the same process. With current API you can end up with two network processes accessing the same cookies database, for example, even if that's actually a programmer error.

2.- Make it possible to use a different session on every web view: in our current API we can only decide whether to use the web context network session or an ephemeral one. The API would be similar to the settings property, you can share the same settings or use a different object, but it doesn't depend on the web context.

The API would be something like:

 - WebKitNetworkSession
  + new(): receives the data directory and cache directory, both optional and creates a persistent WebKitWebsiteDataManager for the given directories.
  + new_epehmeral(): creates an ephemeral WebKitWebsiteDataManager
  + All network related APIs from WebKitWebsiteDataManager (get_cookie_manager, set|get_itp_enabled, set|get_persistent_credential_storage_enabled, set|get_tls_errors_policy, set_network_proxy_settings, set_memory_pressure_settings and get_itp_summary) will be moved to WebKitNetworkSession
  + All network related APIs from WebKitWebContext (prefetch_dns, allow_tls_certificate_for_host and downloads) will be moved to WebKitNetworkSession

 - WebKitWebsiteDataManager
  + Remove the constructors, so it can only be created by WebKitNetworkSession
  + It keeps only the API to fetch and remove website data.

 - WebKitWebContext
  + Remove clear_cache(): it can be done with WebKitWebsiteDataManager.
  + Remove the website-data-manager property.

 - WebKitWebView
  + Remove the is-ephemeral property
  + Add network-session construct only property

What do you think?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230112/09f96d53/attachment-0001.htm>


More information about the webkit-unassigned mailing list