#include "net/cookies/cookie_store_test_helpers.h"
#include <optional>
#include <string>
#include <utility>
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/strings/string_util.h"
#include "base/task/single_thread_task_runner.h"
#include "base/time/time.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "net/cookies/cookie_store.h"
#include "net/cookies/cookie_util.h"
#include "net/http/http_util.h"
#include "url/gurl.h"
GetDomainAndRegistry;
GetRegistryLength;
INCLUDE_PRIVATE_REGISTRIES;
INCLUDE_UNKNOWN_REGISTRIES;
TimeRange;
namespace {
std::string GetRegistry(const GURL& url) { … }
}
namespace net {
const int kDelayedTime = …;
DelayedCookieMonsterChangeDispatcher::DelayedCookieMonsterChangeDispatcher() =
default;
DelayedCookieMonsterChangeDispatcher::~DelayedCookieMonsterChangeDispatcher() =
default;
std::unique_ptr<CookieChangeSubscription>
DelayedCookieMonsterChangeDispatcher::AddCallbackForCookie(
const GURL& url,
const std::string& name,
const std::optional<CookiePartitionKey>& cookie_partition_key,
CookieChangeCallback callback) { … }
std::unique_ptr<CookieChangeSubscription>
DelayedCookieMonsterChangeDispatcher::AddCallbackForUrl(
const GURL& url,
const std::optional<CookiePartitionKey>& cookie_partition_key,
CookieChangeCallback callback) { … }
std::unique_ptr<CookieChangeSubscription>
DelayedCookieMonsterChangeDispatcher::AddCallbackForAllChanges(
CookieChangeCallback callback) { … }
DelayedCookieMonster::DelayedCookieMonster()
: … { … }
DelayedCookieMonster::~DelayedCookieMonster() = default;
void DelayedCookieMonster::SetCookiesInternalCallback(
CookieAccessResult result) { … }
void DelayedCookieMonster::GetCookieListWithOptionsInternalCallback(
const CookieAccessResultList& cookie_list,
const CookieAccessResultList& excluded_cookies) { … }
void DelayedCookieMonster::SetCanonicalCookieAsync(
std::unique_ptr<CanonicalCookie> cookie,
const GURL& source_url,
const CookieOptions& options,
SetCookiesCallback callback,
std::optional<CookieAccessResult> cookie_access_result) { … }
void DelayedCookieMonster::GetCookieListWithOptionsAsync(
const GURL& url,
const CookieOptions& options,
const CookiePartitionKeyCollection& cookie_partition_key_collection,
CookieMonster::GetCookieListCallback callback) { … }
void DelayedCookieMonster::GetAllCookiesAsync(GetAllCookiesCallback callback) { … }
void DelayedCookieMonster::InvokeSetCookiesCallback(
CookieMonster::SetCookiesCallback callback) { … }
void DelayedCookieMonster::InvokeGetCookieListCallback(
CookieMonster::GetCookieListCallback callback) { … }
void DelayedCookieMonster::DeleteCanonicalCookieAsync(
const CanonicalCookie& cookie,
DeleteCallback callback) { … }
void DelayedCookieMonster::DeleteAllCreatedInTimeRangeAsync(
const TimeRange& creation_range,
DeleteCallback callback) { … }
void DelayedCookieMonster::DeleteAllMatchingInfoAsync(
net::CookieDeletionInfo delete_info,
DeleteCallback callback) { … }
void DelayedCookieMonster::DeleteMatchingCookiesAsync(DeletePredicate,
DeleteCallback) { … }
void DelayedCookieMonster::DeleteSessionCookiesAsync(DeleteCallback) { … }
void DelayedCookieMonster::FlushStore(base::OnceClosure callback) { … }
CookieChangeDispatcher& DelayedCookieMonster::GetChangeDispatcher() { … }
void DelayedCookieMonster::SetCookieableSchemes(
const std::vector<std::string>& schemes,
SetCookieableSchemesCallback callback) { … }
CookieURLHelper::CookieURLHelper(const std::string& url_string)
: … { … }
const GURL CookieURLHelper::AppendPath(const std::string& path) const { … }
std::string CookieURLHelper::Format(const std::string& format_string) const { … }
FlushablePersistentStore::FlushablePersistentStore() = default;
void FlushablePersistentStore::Load(LoadedCallback loaded_callback,
const NetLogWithSource& ) { … }
void FlushablePersistentStore::LoadCookiesForKey(
const std::string& key,
LoadedCallback loaded_callback) { … }
void FlushablePersistentStore::AddCookie(const CanonicalCookie&) { … }
void FlushablePersistentStore::UpdateCookieAccessTime(const CanonicalCookie&) { … }
void FlushablePersistentStore::DeleteCookie(const CanonicalCookie&) { … }
void FlushablePersistentStore::SetForceKeepSessionState() { … }
void FlushablePersistentStore::SetBeforeCommitCallback(
base::RepeatingClosure callback) { … }
void FlushablePersistentStore::Flush(base::OnceClosure callback) { … }
int FlushablePersistentStore::flush_count() { … }
FlushablePersistentStore::~FlushablePersistentStore() = default;
CallbackCounter::CallbackCounter() = default;
void CallbackCounter::Callback() { … }
int CallbackCounter::callback_count() { … }
CallbackCounter::~CallbackCounter() = default;
std::string FutureCookieExpirationString() { … }
}