diff options
author | Michal Klocek <michal.klocek@theqtcompany.com> | 2015-12-03 15:29:48 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@theqtcompany.com> | 2016-01-15 22:07:06 +0000 |
commit | 7ae7b58955b018aa7294aa07d6ff7754af336f4c (patch) | |
tree | 0eaee11e15c5eb5cb59a9bf072237deb0524cc26 /src/core/api/qwebenginecookiestore.cpp | |
parent | 09ff58b1a91a1472b4aa4c644686fb2e46a3b1ca (diff) |
Remove FilterRequest from qwebenginecookiestore
OnCanSetCookie and OnCanGetCookies should
both be mapped to API. Since the other
call is missing (filter cookies which should
be send) remove existing one from 5.6
Change-Id: I4f42c4a1fee6add7a5efffaf4c38877a1f35ce61
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/core/api/qwebenginecookiestore.cpp')
-rw-r--r-- | src/core/api/qwebenginecookiestore.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/core/api/qwebenginecookiestore.cpp b/src/core/api/qwebenginecookiestore.cpp index ab2612803..c0a3f3208 100644 --- a/src/core/api/qwebenginecookiestore.cpp +++ b/src/core/api/qwebenginecookiestore.cpp @@ -175,20 +175,6 @@ void QWebEngineCookieStorePrivate::onCookieChanged(const QNetworkCookie &cookie, Q_EMIT q->cookieAdded(cookie); } -bool QWebEngineCookieStorePrivate::canSetCookie(const QUrl &firstPartyUrl, const QByteArray &cookieLine, const QUrl &url) -{ - if (filterCallback) { - QWebEngineCookieStore::FilterRequest request; - request.accepted = true; - request.firstPartyUrl = firstPartyUrl; - request.cookieLine = cookieLine; - request.cookieSource = url; - callbackDirectory.invokeDirectly<QWebEngineCookieStore::FilterRequest&>(filterCallback, request); - return request.accepted; - } - return true; -} - /*! \class QWebEngineCookieStore \inmodule QtWebEngineCore @@ -350,22 +336,4 @@ void QWebEngineCookieStore::deleteAllCookies() d->deleteAllCookies(); } -/*! - \fn void QWebEngineCookieStore::setCookieFilter(FunctorOrLambda filterCallback) - - Installs a cookie filter that can reject cookies before they are added to the cookie store. - The \a filterCallback must be a lambda or functor taking FilterRequest structure. If the - cookie is to be rejected, the filter can set FilterRequest::accepted to \c false. - - The callback should not be used to execute heavy tasks since it is running on the - IO thread and therefore blocks the Chromium networking. - - \sa deleteAllCookies(), loadAllCookies() -*/ -void QWebEngineCookieStore::setCookieFilter(const QWebEngineCallback<QWebEngineCookieStore::FilterRequest&> &filter) -{ - Q_D(QWebEngineCookieStore); - d->filterCallback = filter; -} - QT_END_NAMESPACE |