chromium/chrome/browser/privacy_budget/surface_set_with_valuation.h

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_PRIVACY_BUDGET_SURFACE_SET_WITH_VALUATION_H_
#define CHROME_BROWSER_PRIVACY_BUDGET_SURFACE_SET_WITH_VALUATION_H_

#include "base/containers/flat_tree.h"
#include "base/memory/raw_ref.h"
#include "chrome/browser/privacy_budget/representative_surface_set.h"
#include "chrome/browser/privacy_budget/surface_set_equivalence.h"
#include "chrome/browser/privacy_budget/surface_set_valuation.h"
#include "chrome/common/privacy_budget/types.h"
#include "third_party/blink/public/common/privacy_budget/identifiable_surface.h"

// A set-like container for blink::IdentifiableSurface and RepresentativeSurface
// that maintains an aggregate surface cost (via SurfaceSetValuation).
//
// * The container only consumes representative surfaces (see
//   RepresentativeSurface).
//
// * Adding a RepresentativeSurface is the equivalent of adding all the
//   surfaces that are in the same equivalence class. I.e. contains(s) will
//   return true for all `s` that are in the same equivalence class as the
//   representative that was added.
//
// * Adding a IdentifiableSurface is the equivalent of adding its corresponding
//   RepresentativeSurface, and thus the equivalent of adding all the surfaces
//   in its equivalence class.
class SurfaceSetWithValuation {};

#endif  // CHROME_BROWSER_PRIVACY_BUDGET_SURFACE_SET_WITH_VALUATION_H_