summaryrefslogtreecommitdiffstats
path: root/src/core/profile_adapter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add support for clearing the feature requestAllan Sandfeld Jensen2020-05-201-1/+1
| | | | | | Task-number: QTBUG-83476 Change-Id: I63ad9801e3e97f7fdac959600c69c04d0105be1f Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Avoid the network context reset during http cache clearTamas Zakor2020-04-231-13/+15
| | | | | | | | | | Reinstate BrowsingDataRemoverObserverQt() to check if http cache clearing is in-progress or done. ProfileIODataQt::resetNetworkContext() should not be called during http cache clearing because it causes an assert. Call it after the clearing is done. Change-Id: I6750341ff23f704ba547c913f40b0cec92b1cc43 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Cleanup interceptors in profileMichal Klocek2020-04-201-28/+0
| | | | | Change-Id: Ibc6d63845601b8189ac38bacc77885327284c81f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* ProfileIODataQt: remove more remains of non network service codeJüri Valdmann2020-04-101-16/+1
| | | | | | Task-number: QTBUG-83394 Change-Id: Ib1b4431ac75ae7e988bf62580e2bfb690840f54a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Update user-agent without replacing entire network contextAllan Sandfeld Jensen2020-03-031-4/+9
| | | | | | | | | | | | | | Use added API to treat user-agent changes like accept-language changes. 3rdparty changes: > Allow changing user-agent without replace the entire network context > Destroy old network context before creating the replacement > Enable plugin.mojom for plugin placeholder > Suppress racy DCHECK > Restore -fno-delete-null-pointer-checks Change-Id: Ie94f74332704313d63e064c61118afc53a95c0d8 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Improvements to dynamic update of profilesAllan Sandfeld Jensen2020-03-021-7/+17
| | | | | | | | | Avoid reseting network-context on accept-language change, and trigger update of url-loaders when customer schemes change, but not when a set of none are cleared. Change-Id: Iad268b7066cfd3854348f9a103120c4a104be7af Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Adaptations for Chromium 79Allan Sandfeld Jensen2020-02-281-1/+2
| | | | | | | | Fixes: QTBUG-80737 Fixes: QTBUG-81556 Fixes: QTBUG-81614 Change-Id: Ie6a69cdbf46d0508bff226f1b8fed28a618e1949 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Adaptations for Chromium 78Allan Sandfeld Jensen2020-02-281-3/+16
| | | | | | | | | | Including removal of renderer service. [ChangeLog][QWebEngineSetting] XSS Auditing has been removed, and XSSAuditingEnabled no longer has any effect. Change-Id: I0835e2a76551057f3eea30a343e0373b642192f0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix changing profile settings with network serviceJüri Valdmann2020-02-261-20/+19
| | | | | | | Fixes: QTBUG-81558 Change-Id: I6f6d1b927d0f20d99477dce21697d4a03f61c059 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove non-NetworkService support classesAllan Sandfeld Jensen2020-02-041-1/+0
| | | | | | | | Removes much of the specific code for non-networksupport, classes that won't work or even compile with 78/79 based. Change-Id: I150794a55164998fa3d0031757718081fa7d7d9a Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Allan Sandfeld Jensen2019-12-061-7/+0
|\ | | | | | | | | Fixes: QTBUG-80555 Change-Id: I4c7f69f697c09526f5f927948e6a6bf1c43fac17
| * Fix 'setDownloadDirectory' for download item on 'SavePage' actionKirill Burtsev2019-11-291-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Chromium's DownloadManager doesn't create its download items before path for saving page is confirmed. So assert inside updateDownloadPath was not correct. Moreover, the name is confusing because it's not really updating anything. Remove it and use ProfileAdapterClient::DownloadInfo timestamp to determine updated filename after directory change. Ammends recent new api for changing download directory 0884fab3b1. Fixes: QTBUG-80372 Change-Id: If9efb52979deb3cf21fc4e12989173c85e04e090 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Experimental network-service supportAllan Sandfeld Jensen2019-12-051-6/+3
|/ | | | | | | | | | | | | | | | | | | | | | Is default off, enable with --enable-network-service. Done: * Basic browsing * Basic profile settings * Custom URL schemes * UI-thread interceptors * CookieStore API * CookieStore filters * CookieStore changed events Missing: * deprecated interceptors * complete profile settings * cleanup of system network-context * proxy settings Change-Id: I6af92da40147b968a938d1263df54c4cfe7bcf6d Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Merge branch '5.13' into 5.14Allan Sandfeld Jensen2019-10-301-0/+9
|\ | | | | | | Change-Id: I6ab2e949cb2fa3b2db55a1654d42667db6257eab
| * Track request interceptor destroy and update profile io data accordinglyKirill Burtsev2019-10-231-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On destroy profile level interceptor is cleaned through QPointer in ProfileAdapter but not in ProfileIOData where it is stored as a raw pointer and used by NetworkDelegateQt. Track 'destroyed' signal and clean it from ProfileIOData, which resolves these issues after interceptor is deleted without explicitly being reset in profile: - for deprecated 'setRequestInterceptor': one of possible access violation in NetworkDelegateQt::OnBeforeURLRequest - for setUrlRequestInterceptor: sending URLRequestNotification for every url request after interceptor is deleted Fixes: QTBUG-79156 Change-Id: Ie2dd3f0909bc45748278c5f97c5c2701742591b5 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.13' into dev"Allan Sandfeld Jensen2019-07-141-3/+5
|\ \
| * | Merge remote-tracking branch 'origin/5.13' into devAllan Sandfeld Jensen2019-07-101-3/+5
| |\| | | | | | | | | | Change-Id: I156385925a060081cce7091da199266482aec5d8
| | * Fix unregistered custom scheme warningJüri Valdmann2019-07-031-3/+5
| | | | | | | | | | | | | | | | | | | | | The warning is emitted even for registered custom schemes. Change-Id: I07a505253627a920d96b75df8fa1fb2d81ab1f68 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Adaptations for Chromium 75Allan Sandfeld Jensen2019-07-101-10/+0
| | | | | | | | | | | | | | | Change-Id: Idad08244e0c749a9f70f5eb9f8cd236039b941b3 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | | Adaptations for Chromium 74Allan Sandfeld Jensen2019-07-101-1/+1
|/ / | | | | | | | | Change-Id: Icdefa05eec39c632328dfc40862e5b734170bf3f Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Add API to change download directory path and file nameTamas Zakor2019-07-051-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add functions and property to change the download directory and file name in QWebEngineDownloadItem and QQuickWebEngineDownloadItem and deprecate the path() and setPath(). Regenerating the uniquifying download filename after change the download directory. [ChangeLog][DownloadItem] Add functions and property to change the download directory and file name in QWebEngineDownloadItem and QQuickWebEngineDownloadItem and deprecate the path() and setPath(). Task-number: QTBUG-56978 Change-Id: I6e63da82a187add8bc3206cc80c8bf6865fbdd35 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Persistent storage of preferences between app runsLeander Beernaert2019-06-131-4/+7
|/ | | | | | | | | | | | | | | | | | | | | We can now persist the user preferences to disk at application exit so they are correctly remembered for the next run. The preferences are stored in dataPath()/user_prefs.json. This is managed via the PrefServiceAdapter class. It's not possible to test this in a correct pattern as we require the app to exit properly to be able to guarantee that the preferences are written to disk. The code added in ~PrefServiceAdapter() does not provide any guarantees in the next profile construction that the previous preferences have been written to disk. Fixes: QTBUG-75740 Change-Id: I96bb3037707d90b05b3dfab4f083702351923aee Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Allan Sandfeld Jensen2019-05-101-12/+30
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/core/profile_adapter.cpp src/core/profile_adapter.h src/webengine/api/qquickwebengineprofile.cpp src/webenginewidgets/api/qwebengineprofile.cpp tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp Change-Id: Ic561f22b361e32a0a63668c73bf6c0fc9c1ce16f
| * Q(Quick)WebEngineProfile: Update list of internal schemesJüri Valdmann2019-05-071-3/+38
| | | | | | | | | | | | | | | | | | | | | | Disallow installing handler for "about" and everything in kStandardURLSchemes of url/url_util.cc. Except for "gopher" which is used in tests. Suppress warning about custom schemes for "gopher" since it's not a custom scheme. Also lowercase the scheme in urlSchemeHandler() and removeUrlSchemeHandler(). Change-Id: I72b06d4fa6433882019405a0d600a593c8971bf1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Adaptations for Chromium 73Allan Sandfeld Jensen2019-03-231-2/+2
| | | | | | | | | | Change-Id: I565d1e327852110a5abebed3388d7cd6986bef06 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Fix -no-ssl buildv5.13.0-beta1Peter Varga2019-03-071-0/+4
| | | | | | | | | | Change-Id: I978f70545484060218f5243c74978c85bc603c16 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Allan Sandfeld Jensen2019-03-041-1/+16
|\| | | | | | | Change-Id: I1dd136df7004b11e2f38a2ec4e82a6fa81627479
| * Force destruction of webcontent client before profile adapterMichal Klocek2019-03-011-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently users might forget to delete webcontent client before profile adapter. This might be nasty if users are not aware of default profile. Instead of asserting badly in chromium, clean up and release chromium resources. This avoids the crash, but might leak memory if users never deletes page. Task-number: QTBUG-74021 Change-Id: I66f466f169d12f7ee08866d505260dca47800bb0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Fix destruction of qt quick profile after WebEngineContext gets deletedMichal Klocek2019-03-011-1/+2
| | | | | | | | | | | | | | | | | | | | Issue takes place when QQmlApplicationEngine is a child of qApp. In case WebEngineContext gets destructed do not try to get default profile, which is anyway already gone. Task-number: QTBUG-74116 Change-Id: I24ea87baf677360a420d444b4c964feb722ab317 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Tie client certificate stores to profilesAllan Sandfeld Jensen2019-03-011-0/+8
| | | | | | | | | | | | | | | | Move the client certificate store from being global to being tied to individual profiles. Change-Id: Ib21ae14c501b7d0612b84ae7535120291aeeada2 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Fix -Wreorder warning in ProfileAdapterJüri Valdmann2019-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | .../profile_adapter.h: In constructor 'QtWebEngineCore::ProfileAdapter::ProfileAdapter(const QString&)': .../profile_adapter.h:229:9: warning: 'QtWebEngineCore::ProfileAdapter::m_pageRequestInterceptors' will be initialized after [-Wreorder] .../profile_adapter.h:219:13: warning: 'QString QtWebEngineCore::ProfileAdapter::m_downloadPath' [-Wreorder] .../profile_adapter.cpp:79:1: warning: when initialized here [-Wreorder] Change-Id: I3aff0462769abc484845ac0233ad892a4ec9bb0d Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Add extension system and PDF viewer to Qt WebEngineMichael Brüning2019-02-011-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the Chromium extensiuon system to Qt WebEngine. Currently, it only exposes internal APIs to the internal PDF viewer extension. To load a PDF, simply navigate to it. This feature can be configured via the webengine-extensions flag and is turned on by default. Needs patch in Chromium 71-based to build. Adaptations to 71-based from 69-based include: * Flag out update installation, add crx file dependency * Move PostTask over to 71-based implementation * Move extensions API providers to 71-based implementaion * Don't use custom guest view and mime handler view delegates * Adapt the URLRequestResourceBundleJob to match new interface * Move extension system initialization to end of profile constructor Change-Id: I4fa5149057291bb5847f048534c11820cd7ff58c Fixes: QTBUG-50556 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add API to set default download pathTamas Zakor2019-01-301-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add functions and property to set the default download location in QWebEngineProfile and QQuickWebEngineProfile. Also add new test for check uniquifying download filename. Update plugins.qmltypes to 1.9 [ChangeLog][Profile][QtWebEngine][QtWebEngineWidgets] Add functions and property to set the default download location in QWebEngineProfile and QQuickWebEngineProfile. Task-number: QTBUG-66262 Task-number: QTBUG-72176 Change-Id: I7fa93b66c326766b176aec24d453dd75602b91de Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-221-0/+5
|\| | | | | | | Change-Id: Ib374079ded76e43d4b72f725bbf16fe353ef827e
| * Remove download items internally when API objects are deletedAllan Sandfeld Jensen2019-01-211-0/+5
| | | | | | | | | | | | | | | | | | | | We were never removing internal download item. [ChangeLog][Behavioral Changes] Deleting a download item will now also cancel it if it is still in progress. Change-Id: I2fab497d7acf7ca6ca17f4a61e106b1c18bfb333 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devMichael Brüning2019-01-181-2/+2
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/core/net/network_delegate_qt.cpp src/core/profile_io_data_qt.cpp src/core/web_engine_context.h tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.cpp Change-Id: Id98e3f52f548ceb5b68abd80aedd6ae59db72cc0
| * Rename leftovers of BrowserContext to ProfileAdapterMichal Klocek2019-01-071-2/+2
| | | | | | | | | | Change-Id: Ia86459503be86eb9b0d97affe94b7ce82d5e29f1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Clean up visitedLinksManagerQt constructionMichal Klocek2019-01-101-1/+1
| | | | | | | | | | | | | | Remove dependency on profileAdapter. Change-Id: I362a0500413d39f2dec1d3a8bbc155df068d84ec Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devMichael Brüning2018-12-181-0/+5
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/core/compositor/delegated_frame_node.cpp src/core/profile_adapter.cpp src/core/profile_io_data_qt.cpp src/webengine/api/qquickwebengineprofile.cpp src/webenginewidgets/api/qwebengineprofile.cpp Change-Id: I35ec8480e758bbcb6c5942a5401cb1b6dbdcc428
* | Use QWebEngineUrlSchemeHandler for qrcJüri Valdmann2018-10-311-0/+2
| | | | | | | | | | | | | | | | Delete qrc protocol handler and use custom scheme protocol handler instead. Fixes: QTBUG-71215 Change-Id: I8aa390552c80b591a92f52b8a388e5a707d28f9e Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Move the profiles' url scheme handler API to coreJüri Valdmann2018-10-311-11/+42
| | | | | | | | | | | | | | | | | | | | Implementation of the url scheme handler API in QWebEngineProfile and QQuickWebEngineProfile is exactly identical, so move it to the ProfileAdapter instead. Change-Id: I01baf1c4e5b3c393675adefb0470def90b8b2813 Task-number: QTBUG-71215 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add setRequestInterceptor to QWebEnginePageAllan Sandfeld Jensen2018-10-171-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | Makes it possible to make page specific intercepts, and is at the same time safer by running in the UI-thread. [ChangeLog][QtWebEngineWidgets][QWebEnginePage] Added setRequestInterceptor, similar to the same call on profile except it operates on a per-page basis and on the UI-thread. Change-Id: Id5a7173156c25d0f030f00b6ef314d283c7c8cdd Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Make it possible to enable OCSP on LinuxAllan Sandfeld Jensen2018-10-171-0/+31
|/ | | | | | | | | | | | | The code follows Chromium and also set a CertNetFetcher on both Linux and macOS, but it appears to be currently unused. [ChangeLog][QWebEngineProfile] A profile can now be designated to download OCSP records and thus enable OCSP verification on Linux. Task-number: QTBUG-58059 Task-number: QTBUG-71164 Change-Id: I84fd34d4351cb7aa4417ce4058f97bad4b8d0cd4 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* General adaptations for Chromium 69Allan Sandfeld Jensen2018-09-221-2/+2
| | | | | Change-Id: Ifeaf0ee13213dc5a24d2f2b4655cf7f405cddef7 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Fix running webengine without default profileMichal Klocek2018-08-031-0/+5
| | | | | | | | | If default profile is not needed do not create by accident one in ~QWebEngineProfilePrivate. Task-number: QTBUG-66068 Change-Id: Ib4131268686178560f3a89dce41e59eb57613e17 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Rename BrowserAdapterClient to ProfileAdapterClientMichal Klocek2018-07-091-2/+2
| | | | | Change-Id: I1f8c0d2e59c2565b24c8c636553f1b70bcd31774 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Rename BrowserContextAdapter to ProfileAdapterMichal Klocek2018-07-091-0/+544
Follow change of BrowserContextQt to ProfileQt. Fix wrong naming usage of browserContext instead of browserContextAdapter. Change-Id: I75fdac685d9bffd44f0144921d3e87305d6d44c9 Reviewed-by: Kai Koehne <kai.koehne@qt.io>