summaryrefslogtreecommitdiffstats
path: root/src/core/url_request_context_getter_qt.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-08-021-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty src/core/resources/resources.gyp src/webengine/doc/src/qtwebengine-overview.qdoc src/webenginewidgets/api/qwebenginepage.cpp src/webenginewidgets/api/qwebenginescriptcollection.cpp src/webenginewidgets/api/qwebenginescriptcollection_p.h tests/auto/widgets/qwebenginepage/BLACKLIST And readded newly in 5.6 enabled tests to the BLACKLIST. Change-Id: I4ab1fc54ebfaaf940df81b0d8d6bdd15cae8b7c4
| * Add persistent backend to channel id serviceAllan Sandfeld Jensen2016-07-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Channel-ids are only supposed to be memory only when running in off the record profiles. We have just never initialized the sql-based backend. We follow the cookie-settings, because channel-ids are used together with cookies, have similar implications, and newer Chromium versions will assert that cookie-store and channel-id store have matching storage models. Change-Id: I0a64146f0ed36a8913706bfc3fcadd7404894745 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-05-091-8/+31
|\| | | | | | | Change-Id: I2843a633721212850db77c772caf24e0ea82b450
| * Fix threading issues with URLRequestContextAllan Sandfeld Jensen2016-05-031-8/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | URLRequestContextGetterQt contains data which is shared between UI and IO thread. Make the class more thread friendly by making copies of the data that can be accessed from the IO thread, and protect synchronization with a full mutex instead of atomics. Also fixes circular reference between URLRequestContextGetterQt and BrowserContextAdapter. Task-number: QTBUG-50160 Task-number: QTBUG-52509 Change-Id: Idaba211533cfad229e1d1872cdfdf4e7dffeb3d8 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-04-251-4/+9
|\| | | | | | | Change-Id: I329397621f19ba3890be5daf44a6bb2d668ad2d8
| * Fix regenerating job-factoryAllan Sandfeld Jensen2016-04-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | Only update installed custom url scheme handlers, and leave the rest of the job factory untouched, so we don't delete the protocol handlers and request interceptors Chromium passed us, and that are now owned by the job-factory. Change-Id: I640527487dda053463f8fa9986ceb47941593f2b Task-number: QTBUG-52790 Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
| * Cleanup and comment URLRequestContextGetterQtAllan Sandfeld Jensen2016-04-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | Add comments to parts of URLRequestContextGetterQt that are subtle and I already forgot once. Also adds another update atomic to match the rest. Change-Id: I8193247ce76435ac0d169b740a4543099b3ffac2 Task-number: QTBUG-52790 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * Switch BrowserContextAdapter to QSharedPointerAllan Sandfeld Jensen2016-04-191-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | BrowserContextAdapter is not a form of shared data, and using QExplicitSharedDataPointer on it as always been a misuse of the class. Instead we should switch it to QSharedPointer, which also allows us to use QWeakPointer. Change-Id: I8eb489b4a12d3fdddcde55821be294814a156a9d Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
* | Basic adaptation to Chromium 49Allan Sandfeld Jensen2016-03-071-0/+1
| | | | | | | | | | | | | | | | Converts types, callbacks and headers to match Chromium 49. Task-number: QTBUG-51173 Change-Id: I544ef46e187105e250fea1b48b72d2c81a906640 Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
* | Merge branch '5.6' into devAllan Sandfeld Jensen2016-02-041-1/+2
|\| | | | | | | Change-Id: I0bb971f01ee1e02da768f336680c8ec0254ab2b0
| * Fix crash on exit for view-owned QWebEngineUrlSchemeHandler objectsJoerg Bornemann2016-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For view-owned URL scheme handlers the destructor would remove the handler and then trigger URLRequestContextGetterQt::generateStorage. This would access the browser context from the IO thread while it already has been destroyed on the browser thread. Increment the ref count for the browser context before every call of generateStorage, and decrement it when generateStorage is finished. Task-number: QTBUG-50160 Change-Id: Id8b1505891ec56e93bf9d47f33bb8bc3304eb55a Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
| * Avoid full storage update on installing URL scheme handlersJoerg Bornemann2016-01-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | When installing/removing URL scheme handlers, do not update the full URLRequestContextStorage. Only update the job factory. This avoids calling the - potentially expensive - generateStorage() method superfluously often. Change-Id: I99c4ec479fcfdee4e97d86b858ea42f3cdccfec4 Task-number: QTBUG-50160 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Unify license header usage.Jani Heikkinen2016-02-011-11/+14
| | | | | | | | | | | | | | | | | | Update files using old header.LGPL3 to use header.LGPL Update files using old header.FLD to use new header.FDL Update files using old header.BSD to use new header.BSD Change-Id: I36a67aaa8c3ca6c7946308defc9c03c3571a7d23 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Merge branch '5.6' into devAllan Sandfeld Jensen2016-01-121-2/+7
|\| | | | | | | Change-Id: I4272eb59cac08c69eaa58dd4d94debf1b8c5cf78
| * Use default URLRequestInterceptors passed from ChromiumAleksey Yermakov2015-12-161-2/+4
| | | | | | | | | | | | | | | | | | | | | | Default URLRequestInterceptors are required for App Cache and Service Workers support. They were previously ignored and dropped in BrowserContextQt::CreateRequestContext. Implementation in content shell was taken as a reference. Change-Id: I5a12e90febdb4c639f9ead9faf044df09431bdd0 Reviewed-by: Aleksey Yermakov <jp.kuraisu@gmail.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * Merge remote-tracking branch 'origin/5.5' into 5.6Michael Bruning2015-12-091-0/+3
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp Change-Id: I451bc61673014db8e87b2a2cf98fb6879ce0e58d
| | * Reuse or clean up HttpNetworkSession when (re-) setting a cache type.Michael Bruning2015-12-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not reusing or cleaning up the session led to race conditions which in turn lead to crashes and asserts. Reuse the session if parameters match, clean up and it recreate otherwise. Task-number: QTBUG-49397 Change-Id: I4f846a448b50d80a3cf7c4f9bb833fa6d64974d7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | | Add function to clear data from the cacheSzabolcs David2016-01-061-0/+2
|/ / | | | | | | | | | | | | | | | | It marks the entries of the current cache backend for deletion and starts to remove them. Task-number: QTBUG-48177 Change-Id: I85ec25048ff5429976f1b2dcacd74666bdbe6624 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Merge branch '5.5' into 5.6Allan Sandfeld Jensen2015-08-181-1/+2
|\| | | | | | | Change-Id: I9977663123560a22f493b8c02d02de8897b38666
| * Use v8 backend for proxy resolutionKai Koehne2015-07-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the v8 proxy resolution backend instead of the native one in the multi-process case. This fixes a particular issue on windows where the winhttp one will attempt to find proxy servers for every single request: https://crbug.com/40797 . Chrome uses the v8 backend too. Resort to the native backend though if started with --single-process. This is because the Chromium renderer and the V8 ProxyResolver can't run in the same process. See also proxy_resolver_v8.h: // It is important that *ALL* instances of V8 in the process be using // v8::Locker. If not there can be race conditions between the non-locked V8 // instances and the locked V8 instances used by ProxyResolverV8 (assuming they // run on different threads). // // This is the case with the V8 instance used by chromium's renderer -- it runs // on a different thread from ProxyResolver (renderer thread vs PAC thread), // and does not use locking since it expects to be alone. Task-number: QTBUG-44763 Change-Id: I7b48cb9d0f3c41fdddffc9eb9f51d83442d80622 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Add API for intercepting url requestsAndras Becsi2015-08-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is adding a QWebEngineUrlRequestInterceptor interface that can be subclassed to observe or intercept all resource requests making it possible to implement browser features like adblocking and setting custom request headers for url requests. The interceptRequest virtual function is executed on the IO thread. This patch also includes a unit test for the testable API parts. Change-Id: Ibe740fc55551a9a5da40794088ccb6d03d913631 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Martin Rotter <rotter.martinos@gmail.com> Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | Add QWebEngineCookieStoreClient core APIAndras Becsi2015-06-161-0/+4
|/ | | | | | | | | | | | | | | | | This class or its subclass can be set on the QWebEngineProfile and its API enables intercepting Chromium's cookies, setting and deleting cookies in the cookie store. These functions are asynchronous so if the result of the task is needed the user can provide a callback which will be run on the calling thread when the requested operation finishes. This does not include a hook for QQuick layer yet, there we have to figure out what the most convenient way is from a developer's perspective. Change-Id: I6a3af071883ce632df7a2fb952da93f306ac3fe2 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Add namespace to internal QtWebEngine APIAllan Sandfeld Jensen2015-03-021-0/+4
| | | | | | | | Adds the QtWebEngineCore namespace to all internal core API. This ensures we don't export any internal symbols in the global namespace. Change-Id: I26af888ea7c6c4c4d0f04c24a377c1a9d3c92751 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Synchronize with QAtomic instead of volatileAllan Sandfeld Jensen2015-02-201-5/+5
| | | | | | | | Replaces the three volatile bool with two atomic ints and an atomic pointer. Change-Id: Iad41aef4952bbf7de77523ffd729bd00ace68ee9 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-161-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: Ieb6bac7a1be5c25eb7cb917495b58b6a870ca6d4 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Introduce QWebEngineProfile APIAllan Sandfeld Jensen2014-12-121-4/+20
| | | | | | | | | | | | | | | Introduces initial widgets API for the Chromium BrowserContext. Adds API for controlling cookie jar policy, user-agent string and cache and persistent data paths. Similar QML API will follow in another patch. [ChangeLog][QtWebEngineWidgets][QWebEngineProfile] New API for profiles applying to groups of QWebEnginePages. Change-Id: I3c4ef4053fde7564af29178c91a0aca8a2b61a5f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Use in-memory caches for off-the-record browsingAllan Sandfeld Jensen2014-12-031-3/+4
| | | | | | | | | Off the record should leave no record, which means we should not use disk storage for cookies and cache but instead trigger memory caching. Change-Id: I3e14ed0f91f925bc65675d2e7d9f07eb379a30b0 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Cache to QStandardPaths::CacheLocationAllan Sandfeld Jensen2014-11-071-2/+3
| | | | | | | | | We should save our cache in the configured CacheLocation, and ensure we are prepared for multiple BrowserContext by caching to a Default subdir. This matches how chromium caches on linux. Change-Id: Ibe914fca35435ea1658565be87747cfabc71e97b Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Update License Headers for Qt WebEngine to LGPLv3.Zeno Albisser2014-08-211-15/+11
| | | | | | | Change-Id: Idbe0eafb51d77cc00e3a93179b81770724d5bfaa Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix Google Maps not showing tiles when panning/zoomingJocelyn Turcotte2014-05-091-4/+5
| | | | | | | | | | | | The issue is that the web worker that fetches and pre-process the map tiles couldn't be started successfully from a Blob. We were missing the blob: scheme handler that was passed to us in the ignored protocol_handlers argument of BrowserContextQt::CreateRequestContext. Change-Id: I24b726a1577e7092d53b1821efd3e4aa2a66c7d9 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Moving sources to src part 1: Move files.Jocelyn Turcotte2013-11-281-0/+83
This only move files without adjusting any paths. This moves: - lib/quick -> src/webengine/api (API files) lib/quick -> src/webengine (other files) This contains the main QtWebEngine module library since <ec7b2ee70a8b2db7fb87f50671a001ddd54697b0>. - lib/widgets -> src/webenginewidgets Also rename this directory to match its module name and rename Api to api. - lib -> src/core - process -> src/process - resources -> src/core/resources - tools/* -> tools/scripts/ The build directory is spread as follow: - build/build.pro -> src/core/gyp_run.pro - build/qmake_extras/* -> src/core/ (for the host and target .pro files) - build/qmake -> tools/qmake - Build related scripts -> tools/buildscripts Change-Id: I0cded1de772c99c0c1da6536c9afea353236b4a1 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>