summaryrefslogtreecommitdiffstats
path: root/src/core/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/net')
-rw-r--r--src/core/net/client_cert_override.cpp4
-rw-r--r--src/core/net/cookie_monster_delegate_qt.cpp34
-rw-r--r--src/core/net/cookie_monster_delegate_qt.h7
-rw-r--r--src/core/net/network_delegate_qt.cpp2
-rw-r--r--src/core/net/webui_controller_factory_qt.cpp3
5 files changed, 34 insertions, 16 deletions
diff --git a/src/core/net/client_cert_override.cpp b/src/core/net/client_cert_override.cpp
index 305f0cef0..ed1572596 100644
--- a/src/core/net/client_cert_override.cpp
+++ b/src/core/net/client_cert_override.cpp
@@ -145,9 +145,9 @@ void ClientCertOverrideStore::GetClientCerts(const net::SSLCertRequestInfo &cert
if (base::PostTaskWithTraitsAndReplyWithResult(
FROM_HERE, { content::BrowserThread::UI },
base::BindOnce(&ClientCertOverrideStore::GetClientCertsOnUIThread,
- base::Unretained(this), base::ConstRef(cert_request_info)),
+ base::Unretained(this), std::cref(cert_request_info)),
base::BindOnce(&ClientCertOverrideStore::GetClientCertsReturn,
- base::Unretained(this), base::ConstRef(cert_request_info), callback))
+ base::Unretained(this), std::cref(cert_request_info), callback))
) {
return;
}
diff --git a/src/core/net/cookie_monster_delegate_qt.cpp b/src/core/net/cookie_monster_delegate_qt.cpp
index 3253b08b9..5f7b75f57 100644
--- a/src/core/net/cookie_monster_delegate_qt.cpp
+++ b/src/core/net/cookie_monster_delegate_qt.cpp
@@ -140,10 +140,29 @@ void CookieMonsterDelegateQt::deleteCookie(const QNetworkCookie &cookie, const Q
void CookieMonsterDelegateQt::DeleteCookieOnIOThread(const GURL& url, const std::string& cookie_name)
{
- if (m_cookieMonster)
- m_cookieMonster->DeleteCookieAsync(url, cookie_name, base::Closure());
+ if (m_cookieMonster) {
+ net::CookieMonster::GetCookieListCallback callback =
+ base::BindOnce(&CookieMonsterDelegateQt::GetCookiesToDeleteCallback, this, cookie_name);
+ m_cookieMonster->GetAllCookiesForURLAsync(url, std::move(callback));
+ }
}
+void CookieMonsterDelegateQt::GetCookiesToDeleteCallback(const std::string& cookie_name, const net::CookieList &cookies, const net::CookieStatusList &statusList)
+{
+ Q_UNUSED(statusList);
+ if (!m_cookieMonster)
+ return;
+
+ net::CookieList cookiesToDelete;
+ for (auto cookie : cookies) {
+ if (cookie.Name() == cookie_name)
+ cookiesToDelete.push_back(cookie);
+ }
+ for (auto cookie : cookiesToDelete)
+ m_cookieMonster->DeleteCanonicalCookieAsync(cookie, base::DoNothing());
+}
+
+
void CookieMonsterDelegateQt::deleteSessionCookies(quint64 callbackId)
{
Q_ASSERT(hasCookieMonster());
@@ -234,7 +253,7 @@ void CookieMonsterDelegateQt::OnCookieChanged(const net::CanonicalCookie& cookie
m_client->d_func()->onCookieChanged(toQt(cookie), cause != net::CookieChangeCause::INSERTED);
}
-void CookieMonsterDelegateQt::GetAllCookiesCallbackOnIOThread(qint64 callbackId, const net::CookieList &cookies)
+void CookieMonsterDelegateQt::GetAllCookiesCallbackOnIOThread(qint64 callbackId, const net::CookieList &cookies, const net::CookieStatusList &statusList)
{
QByteArray rawCookies;
for (auto &&cookie : cookies)
@@ -245,11 +264,11 @@ void CookieMonsterDelegateQt::GetAllCookiesCallbackOnIOThread(qint64 callbackId,
base::BindOnce(&CookieMonsterDelegateQt::GetAllCookiesCallbackOnUIThread, this, callbackId, rawCookies));
}
-void CookieMonsterDelegateQt::SetCookieCallbackOnIOThread(qint64 callbackId, bool success)
+void CookieMonsterDelegateQt::SetCookieCallbackOnIOThread(qint64 callbackId, net::CanonicalCookie::CookieInclusionStatus status)
{
base::PostTaskWithTraits(
FROM_HERE, {content::BrowserThread::UI},
- base::BindOnce(&CookieMonsterDelegateQt::SetCookieCallbackOnUIThread, this, callbackId, success));
+ base::BindOnce(&CookieMonsterDelegateQt::SetCookieCallbackOnUIThread, this, callbackId, status));
}
void CookieMonsterDelegateQt::DeleteCookiesCallbackOnIOThread(qint64 callbackId, uint numCookies)
@@ -265,10 +284,11 @@ void CookieMonsterDelegateQt::GetAllCookiesCallbackOnUIThread(qint64 callbackId,
m_client->d_func()->onGetAllCallbackResult(callbackId, cookies);
}
-void CookieMonsterDelegateQt::SetCookieCallbackOnUIThread(qint64 callbackId, bool success)
+void CookieMonsterDelegateQt::SetCookieCallbackOnUIThread(qint64 callbackId, net::CanonicalCookie::CookieInclusionStatus status)
{
if (m_client)
- m_client->d_func()->onSetCallbackResult(callbackId, success);
+ m_client->d_func()->onSetCallbackResult(callbackId,
+ status == net::CanonicalCookie::CookieInclusionStatus::INCLUDE);
}
void CookieMonsterDelegateQt::DeleteCookiesCallbackOnUIThread(qint64 callbackId, uint numCookies)
diff --git a/src/core/net/cookie_monster_delegate_qt.h b/src/core/net/cookie_monster_delegate_qt.h
index 88e92b560..2ac04acb4 100644
--- a/src/core/net/cookie_monster_delegate_qt.h
+++ b/src/core/net/cookie_monster_delegate_qt.h
@@ -107,12 +107,13 @@ private:
void DeleteSessionCookiesOnIOThread(net::CookieMonster::DeleteCallback callback);
void DeleteAllOnIOThread(net::CookieMonster::DeleteCallback callback);
- void GetAllCookiesCallbackOnIOThread(qint64 callbackId, const net::CookieList &cookies);
- void SetCookieCallbackOnIOThread(qint64 callbackId, bool success);
+ void GetCookiesToDeleteCallback(const std::string& cookie_name, const net::CookieList &cookies, const net::CookieStatusList &statusList);
+ void GetAllCookiesCallbackOnIOThread(qint64 callbackId, const net::CookieList &cookies, const net::CookieStatusList &statusList);
+ void SetCookieCallbackOnIOThread(qint64 callbackId, net::CanonicalCookie::CookieInclusionStatus status);
void DeleteCookiesCallbackOnIOThread(qint64 callbackId, uint numCookies);
void GetAllCookiesCallbackOnUIThread(qint64 callbackId, const QByteArray &cookies);
- void SetCookieCallbackOnUIThread(qint64 callbackId, bool success);
+ void SetCookieCallbackOnUIThread(qint64 callbackId, net::CanonicalCookie::CookieInclusionStatus status);
void DeleteCookiesCallbackOnUIThread(qint64 callbackId, uint numCookies);
};
diff --git a/src/core/net/network_delegate_qt.cpp b/src/core/net/network_delegate_qt.cpp
index c0e936cd7..20addefb2 100644
--- a/src/core/net/network_delegate_qt.cpp
+++ b/src/core/net/network_delegate_qt.cpp
@@ -109,7 +109,7 @@ int NetworkDelegateQt::OnBeforeURLRequest(net::URLRequest *request, net::Complet
{
Q_ASSERT(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
Q_ASSERT(m_profileIOData);
- const content::ResourceRequestInfo *resourceInfo = content::ResourceRequestInfo::ForRequest(request);
+ content::ResourceRequestInfo *resourceInfo = content::ResourceRequestInfo::ForRequest(request);
content::ResourceType resourceType = content::RESOURCE_TYPE_LAST_TYPE;
WebContentsAdapterClient::NavigationType navigationType = WebContentsAdapterClient::OtherNavigation;
diff --git a/src/core/net/webui_controller_factory_qt.cpp b/src/core/net/webui_controller_factory_qt.cpp
index ec36e70d9..92bb8854f 100644
--- a/src/core/net/webui_controller_factory_qt.cpp
+++ b/src/core/net/webui_controller_factory_qt.cpp
@@ -52,7 +52,6 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/devtools_ui.h"
#include "chrome/browser/ui/webui/quota_internals/quota_internals_ui.h"
-#include "chrome/browser/ui/webui/task_scheduler_internals/task_scheduler_internals_ui.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
@@ -129,8 +128,6 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI *web_ui, Profile *profile, co
// after the host name.
if (url.host() == chrome::kChromeUIQuotaInternalsHost)
return &NewWebUI<QuotaInternalsUI>;
- if (url.host_piece() == chrome::kChromeUITaskSchedulerInternalsHost)
- return &NewWebUI<TaskSchedulerInternalsUI>;
if (url.SchemeIs(content::kChromeDevToolsScheme)) {
// if (!DevToolsUIBindings::IsValidFrontendURL(url))