summaryrefslogtreecommitdiffstats
path: root/src/core/cookie_monster_delegate_qt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/cookie_monster_delegate_qt.h')
-rw-r--r--src/core/cookie_monster_delegate_qt.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/cookie_monster_delegate_qt.h b/src/core/cookie_monster_delegate_qt.h
index 941992a7b..8aceca9c9 100644
--- a/src/core/cookie_monster_delegate_qt.h
+++ b/src/core/cookie_monster_delegate_qt.h
@@ -64,9 +64,10 @@ namespace QtWebEngineCore {
static const char* const kCookieableSchemes[] =
{ "http", "https", "qrc", "ws", "wss" };
-class QWEBENGINE_EXPORT CookieMonsterDelegateQt: public net::CookieMonsterDelegate {
+class QWEBENGINE_EXPORT CookieMonsterDelegateQt : public base::RefCountedThreadSafe<CookieMonsterDelegateQt> {
QPointer<QWebEngineCookieStore> m_client;
net::CookieMonster *m_cookieMonster;
+ std::vector<std::unique_ptr<net::CookieStore::CookieChangedSubscription>> m_subscriptions;
public:
CookieMonsterDelegateQt();
~CookieMonsterDelegateQt();
@@ -84,7 +85,9 @@ public:
bool canSetCookie(const QUrl &firstPartyUrl, const QByteArray &cookieLine, const QUrl &url);
bool canGetCookies(const QUrl &firstPartyUrl, const QUrl &url);
- void OnCookieChanged(const net::CanonicalCookie& cookie, bool removed, net::CookieStore::ChangeCause cause) override;
+
+ void AddStore(net::CookieStore *store);
+ void OnCookieChanged(const net::CanonicalCookie &cookie, net::CookieStore::ChangeCause cause);
private:
void GetAllCookiesOnIOThread(net::CookieMonster::GetCookieListCallback callback);