#include "content/browser/interest_group/interest_group_k_anonymity_manager.h"
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/ranges/algorithm.h"
#include "base/time/time.h"
#include "content/browser/interest_group/interest_group_manager_impl.h"
#include "third_party/blink/public/common/interest_group/interest_group.h"
namespace content {
namespace {
constexpr base::TimeDelta kKAnonymityExpiration = …;
}
bool IsKAnonDataExpired(const base::Time last_updated, const base::Time now) { … }
InterestGroupKAnonymityManager::InterestGroupKAnonymityManager(
InterestGroupManagerImpl* interest_group_manager,
GetKAnonymityServiceDelegateCallback k_anonymity_service_callback)
: … { … }
InterestGroupKAnonymityManager::~InterestGroupKAnonymityManager() = default;
InterestGroupKAnonymityManager::InProgressQueryState::InProgressQueryState(
base::Time update_time,
bool replace_existing_values)
: … { … }
InterestGroupKAnonymityManager::InProgressQueryState::InProgressQueryState(
const InProgressQueryState&) = default;
InterestGroupKAnonymityManager::InProgressQueryState::~InProgressQueryState() =
default;
void InterestGroupKAnonymityManager::QueryKAnonymityData(
const blink::InterestGroupKey& interest_group_key,
const InterestGroupKanonUpdateParameter& k_anon_data) { … }
void InterestGroupKAnonymityManager::QuerySetsCallback(
std::vector<std::string> hashed_query,
base::Time update_time,
const blink::InterestGroupKey& interest_group_key,
std::vector<bool> status) { … }
void InterestGroupKAnonymityManager::RegisterAdKeysAsJoined(
base::flat_set<std::string> hashed_keys) { … }
void InterestGroupKAnonymityManager::RegisterIDAsJoined(
const std::string& hashed_key) { … }
void InterestGroupKAnonymityManager::OnGotLastReportedTime(
std::string hashed_key,
std::optional<base::Time> last_update_time) { … }
void InterestGroupKAnonymityManager::JoinSetCallback(std::string hashed_key,
bool status) { … }
}