// Copyright 2017 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_FEATURE_ENGAGEMENT_INTERNAL_ONCE_CONDITION_VALIDATOR_H_ #define COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_ONCE_CONDITION_VALIDATOR_H_ #include <optional> #include <unordered_set> #include "base/feature_list.h" #include "components/feature_engagement/internal/condition_validator.h" #include "components/feature_engagement/public/feature_list.h" namespace feature_engagement { class AvailabilityModel; class DisplayLockController; class EventModel; class TimeProvider; // An ConditionValidator that will ensure that each base::Feature will meet // conditions maximum one time for any given session. // It has the following requirements: // - The EventModel is ready. // - No other in-product help is currently showing. // - FeatureConfig for the feature is valid. // - This is the first time the given base::Feature meets all above stated // conditions. // // NOTE: This ConditionValidator fully ignores whether the base::Feature is // enabled or not and any other configuration specified in the FeatureConfig. // In practice this leads this ConditionValidator to be well suited for a // demonstration mode of in-product help. class OnceConditionValidator : public ConditionValidator { … }; } // namespace feature_engagement #endif // COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_ONCE_CONDITION_VALIDATOR_H_