summaryrefslogtreecommitdiffstats
path: root/src/core/cookie_monster_delegate_qt.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-06-01 11:00:10 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2016-06-01 16:56:16 +0000
commit533a256a734526c634a76a3e6bcff3e06fc00b99 (patch)
tree1f8be23d370d69397de77cf9f6e08d8f1aa7c9c6 /src/core/cookie_monster_delegate_qt.h
parentd45aaebdd22f19f5a9b52595b2256eee5d6a0b9d (diff)
Fix CookieMonster assertions
With CookieMonster now being the CookieStore, it must only be accessed from the IO thread like the CookieStore, so we need to pass calls to the IO thread and back. Change-Id: Icb6d6008c08cfe006c4c1bc2324824223cb82fba Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'src/core/cookie_monster_delegate_qt.h')
-rw-r--r--src/core/cookie_monster_delegate_qt.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/cookie_monster_delegate_qt.h b/src/core/cookie_monster_delegate_qt.h
index 2ff5eeaa6..f47dc86df 100644
--- a/src/core/cookie_monster_delegate_qt.h
+++ b/src/core/cookie_monster_delegate_qt.h
@@ -66,7 +66,7 @@ static const char* const kCookieableSchemes[] =
class QWEBENGINE_EXPORT CookieMonsterDelegateQt: public net::CookieMonsterDelegate {
QPointer<QWebEngineCookieStore> m_client;
- scoped_refptr<net::CookieMonster> m_cookieMonster;
+ net::CookieMonster *m_cookieMonster;
public:
CookieMonsterDelegateQt();
~CookieMonsterDelegateQt();
@@ -84,6 +84,13 @@ public:
bool canSetCookie(const QUrl &firstPartyUrl, const QByteArray &cookieLine, const QUrl &url);
void OnCookieChanged(const net::CanonicalCookie& cookie, bool removed, ChangeCause cause) override;
+
+private:
+ void GetAllCookiesOnIOThread(const net::CookieMonster::GetCookieListCallback& callback);
+ void SetCookieOnIOThread(const GURL& url, const std::string& cookie_line, const net::CookieMonster::SetCookiesCallback& callback);
+ void DeleteCookieOnIOThread(const GURL& url, const std::string& cookie_name);
+ void DeleteSessionCookiesOnIOThread(const net::CookieMonster::DeleteCallback& callback);
+ void DeleteAllOnIOThread(const net::CookieMonster::DeleteCallback& callback);
};
}