diff options
Diffstat (limited to 'src/core/cookie_monster_delegate_qt.h')
-rw-r--r-- | src/core/cookie_monster_delegate_qt.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/cookie_monster_delegate_qt.h b/src/core/cookie_monster_delegate_qt.h index 4625eb264..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(); @@ -83,7 +84,10 @@ public: void setClient(QWebEngineCookieStore *client); bool canSetCookie(const QUrl &firstPartyUrl, const QByteArray &cookieLine, const QUrl &url); - void OnCookieChanged(const net::CanonicalCookie& cookie, bool removed, net::CookieStore::ChangeCause cause) override; + bool canGetCookies(const QUrl &firstPartyUrl, const QUrl &url); + + void AddStore(net::CookieStore *store); + void OnCookieChanged(const net::CanonicalCookie &cookie, net::CookieStore::ChangeCause cause); private: void GetAllCookiesOnIOThread(net::CookieMonster::GetCookieListCallback callback); |