mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision 66afc5e5 (#540276)
This commit is contained in:
@@ -11,6 +11,32 @@
|
||||
#include "base/logging.h"
|
||||
#include "net/url_request/url_request_context.h"
|
||||
|
||||
namespace {
|
||||
|
||||
class NullCookieChangeDispatcher : public net::CookieChangeDispatcher {
|
||||
public:
|
||||
NullCookieChangeDispatcher() {}
|
||||
~NullCookieChangeDispatcher() override {}
|
||||
|
||||
// net::CookieChangeDispatcher
|
||||
std::unique_ptr<net::CookieChangeSubscription> AddCallbackForCookie(
|
||||
const GURL& url,
|
||||
const std::string& name,
|
||||
net::CookieChangeCallback callback) override WARN_UNUSED_RESULT {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<net::CookieChangeSubscription> AddCallbackForAllChanges(
|
||||
net::CookieChangeCallback callback) override WARN_UNUSED_RESULT {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(NullCookieChangeDispatcher);
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
CefCookieStoreProxy::CefCookieStoreProxy(
|
||||
CefURLRequestContextImpl* parent,
|
||||
CefRefPtr<CefRequestContextHandler> handler)
|
||||
@@ -53,18 +79,6 @@ void CefCookieStoreProxy::SetCanonicalCookieAsync(
|
||||
}
|
||||
}
|
||||
|
||||
void CefCookieStoreProxy::GetCookiesWithOptionsAsync(
|
||||
const GURL& url,
|
||||
const net::CookieOptions& options,
|
||||
GetCookiesCallback callback) {
|
||||
net::CookieStore* cookie_store = GetCookieStore();
|
||||
if (cookie_store) {
|
||||
cookie_store->GetCookiesWithOptionsAsync(url, options, std::move(callback));
|
||||
} else if (!callback.is_null()) {
|
||||
std::move(callback).Run(std::string());
|
||||
}
|
||||
}
|
||||
|
||||
void CefCookieStoreProxy::GetCookieListWithOptionsAsync(
|
||||
const GURL& url,
|
||||
const net::CookieOptions& options,
|
||||
@@ -154,26 +168,14 @@ void CefCookieStoreProxy::FlushStore(base::OnceClosure callback) {
|
||||
}
|
||||
}
|
||||
|
||||
std::unique_ptr<net::CookieStore::CookieChangedSubscription>
|
||||
CefCookieStoreProxy::AddCallbackForCookie(
|
||||
const GURL& url,
|
||||
const std::string& name,
|
||||
const CookieChangedCallback& callback) {
|
||||
net::CookieChangeDispatcher& CefCookieStoreProxy::GetChangeDispatcher() {
|
||||
net::CookieStore* cookie_store = GetCookieStore();
|
||||
if (cookie_store) {
|
||||
return cookie_store->AddCallbackForCookie(url, name, callback);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
if (cookie_store)
|
||||
return cookie_store->GetChangeDispatcher();
|
||||
|
||||
std::unique_ptr<net::CookieStore::CookieChangedSubscription>
|
||||
CefCookieStoreProxy::AddCallbackForAllChanges(
|
||||
const CookieChangedCallback& callback) {
|
||||
net::CookieStore* cookie_store = GetCookieStore();
|
||||
if (cookie_store) {
|
||||
return cookie_store->AddCallbackForAllChanges(callback);
|
||||
}
|
||||
return nullptr;
|
||||
if (!null_dispatcher_)
|
||||
null_dispatcher_.reset(new NullCookieChangeDispatcher());
|
||||
return *null_dispatcher_;
|
||||
}
|
||||
|
||||
bool CefCookieStoreProxy::IsEphemeral() {
|
||||
|
Reference in New Issue
Block a user