chromium/components/enterprise/data_controls/core/browser/conditions/attributes_condition.h

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

#ifndef COMPONENTS_ENTERPRISE_DATA_CONTROLS_CORE_BROWSER_CONDITIONS_ATTRIBUTES_CONDITION_H_
#define COMPONENTS_ENTERPRISE_DATA_CONTROLS_CORE_BROWSER_CONDITIONS_ATTRIBUTES_CONDITION_H_

#include <memory>

#include "base/values.h"
#include "components/enterprise/data_controls/core/browser/conditions/condition.h"
#include "components/url_matcher/url_matcher.h"

#if BUILDFLAG(IS_CHROMEOS)
#include <set>

#include "components/enterprise/data_controls/core/browser/component.h"
#endif  // BUILDFLAG(IS_CHROMEOS)

namespace data_controls {

// Implementation of the "root" level condition of a Data Control policy, which
// evaluates all the attributes in an `ActionContext`. This class is a
// representation of the following JSON:
// {
//   urls: [string],
//   incognito: bool,
//   os_clipboard: bool,
//   components: [ARC|CROSTINI|PLUGIN_VM|DRIVE|USB], <= CrOS only
// }
// This can represent either the `sources` or `destinations` fields of the
// DataLeakPreventionRulesList policy (see sub-classes below).
class AttributesCondition {};

// Source-only AttributeCondition that also implement the `Condition` interface.
class SourceAttributesCondition : public AttributesCondition, public Condition {};

// Destination-only AttributeCondition that also implement the `Condition`
// interface.
class DestinationAttributesCondition : public AttributesCondition,
                                       public Condition {};

}  // namespace data_controls

#endif  // COMPONENTS_ENTERPRISE_DATA_CONTROLS_CORE_BROWSER_CONDITIONS_ATTRIBUTES_CONDITION_H_