Update to Chromium revision 66afc5e5 (#540276)

This commit is contained in:
Marshall Greenblatt
2018-03-20 16:15:08 -04:00
parent 4fb6e1ba29
commit 7a59914f97
128 changed files with 1921 additions and 1477 deletions

View File

@@ -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() {