summaryrefslogtreecommitdiffstats
path: root/src/core/network_delegate_qt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/network_delegate_qt.cpp')
-rw-r--r--src/core/network_delegate_qt.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/core/network_delegate_qt.cpp b/src/core/network_delegate_qt.cpp
index 90d4e6ce2..f82d47fa1 100644
--- a/src/core/network_delegate_qt.cpp
+++ b/src/core/network_delegate_qt.cpp
@@ -238,10 +238,25 @@ bool NetworkDelegateQt::OnCanSetCookie(const net::URLRequest& request,
const std::string& cookie_line,
net::CookieOptions*)
{
+ return canSetCookies(request.first_party_for_cookies(), request.url(), cookie_line);
+}
+
+bool NetworkDelegateQt::OnCanGetCookies(const net::URLRequest& request, const net::CookieList&)
+{
+ return canGetCookies(request.first_party_for_cookies(), request.url());
+}
+
+bool NetworkDelegateQt::canSetCookies(const GURL &first_party, const GURL &url, const std::string &cookie_line) const
+{
Q_ASSERT(m_requestContextGetter);
- return m_requestContextGetter->m_cookieDelegate->canSetCookie(toQt(request.first_party_for_cookies()), QByteArray::fromStdString(cookie_line), toQt(request.url()));
+ return m_requestContextGetter->m_cookieDelegate->canSetCookie(toQt(first_party), QByteArray::fromStdString(cookie_line), toQt(url));
}
+bool NetworkDelegateQt::canGetCookies(const GURL &first_party, const GURL &url) const
+{
+ Q_ASSERT(m_requestContextGetter);
+ return m_requestContextGetter->m_cookieDelegate->canGetCookies(toQt(first_party), toQt(url));
+}
int NetworkDelegateQt::OnBeforeStartTransaction(net::URLRequest *request, const net::CompletionCallback &callback, net::HttpRequestHeaders *headers)
{
@@ -291,11 +306,6 @@ net::NetworkDelegate::AuthRequiredResponse NetworkDelegateQt::OnAuthRequired(net
return AUTH_REQUIRED_RESPONSE_NO_ACTION;
}
-bool NetworkDelegateQt::OnCanGetCookies(const net::URLRequest&, const net::CookieList&)
-{
- return true;
-}
-
bool NetworkDelegateQt::OnCanAccessFile(const net::URLRequest&, const base::FilePath&, const base::FilePath&) const
{
return true;