// 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_FEATURE_ENGAGEMENT_INTERNAL_BLOCKED_IPH_FEATURES_H_ #define COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_BLOCKED_IPH_FEATURES_H_ #include <map> #include <string> #include "base/synchronization/lock.h" namespace base { class CommandLine; template <typename T> class NoDestructor; } // namespace base namespace feature_engagement { namespace test { class ScopedIphFeatureList; } // Stores information about whether IPH is globally blocked by default, and if // so, what if any IPH are being allowed. This is primarily used by tests via // `ScopedIphFeatureList` (of which both browser_tests and interactive_ui_tests // automatically create one to suppress IPH) but can be required if a test // launches a vanilla chrome process that also must suppress or only allow // certain IPH. // // Whether a feature is blocked or not is independent of whether the feature // flag is actually enabled. // // This object is a per-process singleton; get with `GetInstance()`. // // This object is thread-safe. Because this object can be accessed during test // setup and on the browser main thread and test threads (and because it could // be lazily created on any thread), it uses a lock rather than a sequence // checker. Accesses should be short and fairly inconsequential, so there is // little harm in the extra security. class BlockedIphFeatures { … }; } // namespace feature_engagement #endif // COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_BLOCKED_IPH_FEATURES_H_