diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-05-03 18:46:06 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-06-26 08:17:25 +0000 |
commit | 57c49df9c6fcbaaffc66900e191312d4e0a0edfa (patch) | |
tree | a067be82e9c367673b3f8efdbcf0a21a780b5451 /src/core/net | |
parent | 8d752cab84d437244ef0c2318b70d6516e99a044 (diff) |
Adaptations for Chromium 66
Change-Id: Iee88721a50036d4ef85a23dd1708d4fb84218708
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/net')
-rw-r--r-- | src/core/net/cookie_monster_delegate_qt.cpp | 8 | ||||
-rw-r--r-- | src/core/net/cookie_monster_delegate_qt.h | 5 | ||||
-rw-r--r-- | src/core/net/network_delegate_qt.cpp | 4 | ||||
-rw-r--r-- | src/core/net/network_delegate_qt.h | 2 | ||||
-rw-r--r-- | src/core/net/proxy_config_service_qt.cpp | 8 | ||||
-rw-r--r-- | src/core/net/proxy_config_service_qt.h | 4 |
6 files changed, 16 insertions, 15 deletions
diff --git a/src/core/net/cookie_monster_delegate_qt.cpp b/src/core/net/cookie_monster_delegate_qt.cpp index 335c7fae5..88e200287 100644 --- a/src/core/net/cookie_monster_delegate_qt.cpp +++ b/src/core/net/cookie_monster_delegate_qt.cpp @@ -68,8 +68,8 @@ CookieMonsterDelegateQt::~CookieMonsterDelegateQt() void CookieMonsterDelegateQt::AddStore(net::CookieStore *store) { - std::unique_ptr<net::CookieStore::CookieChangedSubscription> sub = - store->AddCallbackForAllChanges( + std::unique_ptr<net::CookieChangeSubscription> sub = + store->GetChangeDispatcher().AddCallbackForAllChanges( base::Bind(&CookieMonsterDelegateQt::OnCookieChanged, // this object's destruction will deregister the subscription. base::Unretained(this))); @@ -225,11 +225,11 @@ bool CookieMonsterDelegateQt::canGetCookies(const QUrl &firstPartyUrl, const QUr return m_client->d_func()->canAccessCookies(firstPartyUrl, url); } -void CookieMonsterDelegateQt::OnCookieChanged(const net::CanonicalCookie& cookie, net::CookieStore::ChangeCause cause) +void CookieMonsterDelegateQt::OnCookieChanged(const net::CanonicalCookie& cookie, net::CookieChangeCause cause) { if (!m_client) return; - m_client->d_func()->onCookieChanged(toQt(cookie), cause != net::CookieStore::ChangeCause::INSERTED); + m_client->d_func()->onCookieChanged(toQt(cookie), cause != net::CookieChangeCause::INSERTED); } void CookieMonsterDelegateQt::GetAllCookiesCallbackOnIOThread(qint64 callbackId, const net::CookieList &cookies) diff --git a/src/core/net/cookie_monster_delegate_qt.h b/src/core/net/cookie_monster_delegate_qt.h index fc7e7a49d..d7cd0f33b 100644 --- a/src/core/net/cookie_monster_delegate_qt.h +++ b/src/core/net/cookie_monster_delegate_qt.h @@ -58,6 +58,7 @@ QT_WARNING_PUSH // effect with clang, so use a pragma for these dirty chromium headers QT_WARNING_DISABLE_CLANG("-Wunused-parameter") #include "base/memory/ref_counted.h" +#include "net/cookies/cookie_change_dispatcher.h" #include "net/cookies/cookie_monster.h" QT_WARNING_POP @@ -78,7 +79,7 @@ static const char* const kCookieableSchemes[] = class QWEBENGINECORE_PRIVATE_EXPORT CookieMonsterDelegateQt : public base::RefCountedThreadSafe<CookieMonsterDelegateQt> { QPointer<QWebEngineCookieStore> m_client; net::CookieMonster *m_cookieMonster; - std::vector<std::unique_ptr<net::CookieStore::CookieChangedSubscription>> m_subscriptions; + std::vector<std::unique_ptr<net::CookieChangeSubscription>> m_subscriptions; public: CookieMonsterDelegateQt(); ~CookieMonsterDelegateQt(); @@ -98,7 +99,7 @@ public: bool canGetCookies(const QUrl &firstPartyUrl, const QUrl &url); void AddStore(net::CookieStore *store); - void OnCookieChanged(const net::CanonicalCookie &cookie, net::CookieStore::ChangeCause cause); + void OnCookieChanged(const net::CanonicalCookie &cookie, net::CookieChangeCause cause); private: void GetAllCookiesOnIOThread(net::CookieMonster::GetCookieListCallback callback); diff --git a/src/core/net/network_delegate_qt.cpp b/src/core/net/network_delegate_qt.cpp index 2373fa180..a67baf96f 100644 --- a/src/core/net/network_delegate_qt.cpp +++ b/src/core/net/network_delegate_qt.cpp @@ -372,9 +372,9 @@ bool NetworkDelegateQt::OnCanQueueReportingReport(const url::Origin& origin) con return false; } -bool NetworkDelegateQt::OnCanSendReportingReport(const url::Origin& origin) const +void NetworkDelegateQt::OnCanSendReportingReports(std::set<url::Origin> origins, base::OnceCallback<void(std::set<url::Origin>)> result_callback) const { - return false; + std::move(result_callback).Run(std::set<url::Origin>()); } bool NetworkDelegateQt::OnCanSetReportingClient(const url::Origin& origin, const GURL& endpoint) const diff --git a/src/core/net/network_delegate_qt.h b/src/core/net/network_delegate_qt.h index 4677fc158..8f11c4628 100644 --- a/src/core/net/network_delegate_qt.h +++ b/src/core/net/network_delegate_qt.h @@ -82,7 +82,7 @@ public: bool OnCancelURLRequestWithPolicyViolatingReferrerHeader(const net::URLRequest&, const GURL&, const GURL&) const override; bool OnCanQueueReportingReport(const url::Origin& origin) const override; - bool OnCanSendReportingReport(const url::Origin& origin) const override; + void OnCanSendReportingReports(std::set<url::Origin> origins, base::OnceCallback<void(std::set<url::Origin>)> result_callback) const override; bool OnCanSetReportingClient(const url::Origin& origin, const GURL& endpoint) const override; bool OnCanUseReportingClient(const url::Origin& origin, const GURL& endpoint) const override; diff --git a/src/core/net/proxy_config_service_qt.cpp b/src/core/net/proxy_config_service_qt.cpp index 7fca18eb6..bf1ff6e14 100644 --- a/src/core/net/proxy_config_service_qt.cpp +++ b/src/core/net/proxy_config_service_qt.cpp @@ -124,19 +124,19 @@ net::ProxyConfigService::ConfigAvailability ProxyConfigServiceQt::GetLatestProxy switch (qtProxy.type()) { case QNetworkProxy::HttpProxy: case QNetworkProxy::Socks5Proxy: - qtRules.type = net::ProxyConfig::ProxyRules::TYPE_SINGLE_PROXY; + qtRules.type = net::ProxyConfig::ProxyRules::Type::PROXY_LIST; qtRules.single_proxies.SetSingleProxyServer(server); break; case QNetworkProxy::HttpCachingProxy: - qtRules.type = net::ProxyConfig::ProxyRules::TYPE_PROXY_PER_SCHEME; + qtRules.type = net::ProxyConfig::ProxyRules::Type::PROXY_LIST_PER_SCHEME; qtRules.proxies_for_http.SetSingleProxyServer(server); break; case QNetworkProxy::FtpCachingProxy: - qtRules.type = net::ProxyConfig::ProxyRules::TYPE_PROXY_PER_SCHEME; + qtRules.type = net::ProxyConfig::ProxyRules::Type::PROXY_LIST_PER_SCHEME; qtRules.proxies_for_ftp.SetSingleProxyServer(server); break; default: - qtRules.type = net::ProxyConfig::ProxyRules::TYPE_NO_RULES; + qtRules.type = net::ProxyConfig::ProxyRules::Type::EMPTY; } qtRules.bypass_rules.AddRuleToBypassLocal(); // don't use proxy for connections to localhost diff --git a/src/core/net/proxy_config_service_qt.h b/src/core/net/proxy_config_service_qt.h index 7be3289d0..f50a9a5d5 100644 --- a/src/core/net/proxy_config_service_qt.h +++ b/src/core/net/proxy_config_service_qt.h @@ -43,8 +43,8 @@ #include "base/memory/ref_counted.h" #include "base/observer_list.h" -#include "net/proxy/proxy_config.h" -#include "net/proxy/proxy_config_service.h" +#include "net/proxy_resolution/proxy_config.h" +#include "net/proxy_resolution/proxy_config_service.h" #include <QNetworkProxy> |