summaryrefslogtreecommitdiffstats
path: root/src/core/profile_adapter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove deprecated useforglobalcertificateverificationPeter Varga2021-07-061-35/+0
| | | | | | | | | | | | | It enabled an unrecommended OCSP path on Linux [ChangeLog] (Q)WebEngineSettings::useForGlobalCertificateVerification has been removed. Task-number: QTBUG-91467 Change-Id: I9f5d1ad5e4fcb59abd31e6a133ded7bf8319c811 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io> (cherry picked from commit 8f7a386a5228428122813ebea1d7489783b00633) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Cancel favicon requests explicitlyAllan Sandfeld Jensen2021-07-021-0/+1
| | | | | | | | | Better to do it before we invalidate the profile. Change-Id: I2448bc522a973d26cb51aebe2f413bf30ca3edef Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> (cherry picked from commit 7433e47ab1c9a2c0b2a0f1bc3a21d3c6ba36b071) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove QRC->file special caseAllan Sandfeld Jensen2021-07-021-11/+0
| | | | | | | | | It was marked as to be removed for Qt6 Change-Id: I059c450aa6e5cad6d48ecdd2667abff21217d7e0 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> (cherry picked from commit 01f45d0b536ac2dad7493c826907ded7a76f59d6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add API for favicon databasePeter Varga2021-06-281-0/+99
| | | | | | | | | | | | | [ChangeLog][QtWebEngineCore][QWebEngineProfile] Add new API to access icon database asynchronously. [ChangeLog][QtWebEngineQuick] image:/favicon/ URLs now can be used to access icon database. Task-number: QTBUG-51184 Change-Id: I6096ad9a4210670ed59458c4fa099a02595e8a1e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 2ad450018e8ae22f4c426a421fa5c0995feb1e16) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Replace FaviconManager with Chromium's Favicon ComponentPeter Varga2021-06-041-0/+33
| | | | | | Task-number: QTBUG-51184 Change-Id: Ie050cb23f2c86841a66ec384bfbcdf0713cffa7c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-05-121-14/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webenginewidgets/printme/printhandler.cpp src/3rdparty src/core/api/qwebenginepage_p.h src/core/content_browser_client_qt.h src/core/web_contents_adapter_client.h src/core/web_contents_delegate_qt.cpp src/core/web_contents_delegate_qt.h src/webenginequick/api/qquickwebengineview_p_p.h tests/auto/quick/qmltests/data/tst_download.qml tests/auto/quick/qmltests/data/tst_viewSoure.qml tests/auto/widgets/loadsignals/tst_loadsignals.cpp tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp Change-Id: I9c1819ec15e13d4f8e244defe860e26274b5d4be
| * Allow leaving OCSP offAllan Sandfeld Jensen2021-05-031-14/+17
| | | | | | | | | | | | | | | | | | | | This form of OCSP is not good, so try to at least allow it to be disabled, until we remove it. Fixes: QTBUG-91467 Change-Id: Ied9e8c4960e6ea1503dea39ebbced2ad1af08d5d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Adaptations for Chromium 88Allan Sandfeld Jensen2021-04-151-1/+1
| | | | | | | | | | Change-Id: Ie66e95dbb9fbcafe961bb98d5c277f8c32d66b96 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-03-161-0/+3
|\| | | | | | | Change-Id: I0dd7c64669f4b130047a4a3836f62f7ee5b5f8d9
| * Do not flush messages form profile destructorMichal Klocek2021-02-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Flush ui messages in profile adapter instead, otherwise we will refer to already destroyed adapter (which we track by qpointer), if some ui messages are being processed. Note profile adapter owns profile so it should be fine to notify about coming browser context destruction. Pick-to: 5.15 Change-Id: Idaa29a459c984ca73d1f5f9ca61b96c9b4017259 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-01-251-1/+0
|\| | | | | | | | | | | Including update to 87-based Change-Id: I36b6054e00de97ab055d0bc800cff08d0408fac6
| * Adaptations for Chromium 84Allan Sandfeld Jensen2021-01-131-1/+0
| | | | | | | | | | Change-Id: I359805d0bea84147fca6de2e2c7b17b4dcb17bc7 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Fix build after 216c2ed5 in baseMichal Klocek2020-11-121-1/+1
|/ | | | | Change-Id: If9f646d36b70494248e7d721e7473505d9e0f42d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Adaptations for Chromium 83Allan Sandfeld Jensen2020-09-091-1/+1
| | | | | Change-Id: I63ed851426b18623d549ceaf87f1b6eeec527966 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Return valid path in Profile::GetPath() for incognito profilesAllan Sandfeld Jensen2020-06-291-14/+16
| | | | | | | | | | | | | Parts of Chromium depends on it for temporary directories it creates. This also changes the logic of depending on it being empty as indicating an in memory profile, so it required a bit of cleaning up. Note this does subtly change the return value of off-the-record profiles. Task-number: QTBUG-62957 Change-Id: Iec6e24556128c515fce27803171a766b8a9d92e3 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* 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>