blob: 9312823971b2d230feaab617b6e660a60fe1738b [file] [log] [blame]
Dana Friedcb6b1572023-08-18 21:32:011// Copyright 2023 The Chromium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_USER_EDUCATION_USER_EDUCATION_CONFIGURATION_PROVIDER_H_
6#define CHROME_BROWSER_USER_EDUCATION_USER_EDUCATION_CONFIGURATION_PROVIDER_H_
7
8#include "components/feature_engagement/public/configuration.h"
9#include "components/feature_engagement/public/configuration_provider.h"
10#include "components/feature_engagement/public/feature_list.h"
11#include "components/feature_engagement/public/group_list.h"
12#include "components/user_education/common/feature_promo_registry.h"
13
14// Provides feature engagement configuration based on IPH registered in the
15// browser.
16class UserEducationConfigurationProvider
17 : public feature_engagement::ConfigurationProvider {
18 public:
19 UserEducationConfigurationProvider();
20 ~UserEducationConfigurationProvider() override;
21
22 // feature_engagement::ConfigurationProvider:
23 bool MaybeProvideFeatureConfiguration(
24 const base::Feature& feature,
25 feature_engagement::FeatureConfig& config,
26 const feature_engagement::FeatureVector& known_features,
27 const feature_engagement::GroupVector& known_groups) const override;
28 const char* GetConfigurationSourceDescription() const override;
29
30 private:
31 user_education::FeaturePromoRegistry registry_;
32};
33
34#endif // CHROME_BROWSER_USER_EDUCATION_USER_EDUCATION_CONFIGURATION_PROVIDER_H_