#include "components/user_education/common/new_badge_policy.h"
#include <algorithm>
#include "base/feature_list.h"
#include "base/metrics/field_trial_params.h"
#include "base/metrics/histogram_functions.h"
#include "base/strings/strcat.h"
#include "base/time/time.h"
#include "components/user_education/common/feature_promo_data.h"
#include "components/user_education/common/feature_promo_storage_service.h"
#include "components/user_education/common/user_education_features.h"
namespace user_education {
NewBadgePolicy::NewBadgePolicy()
: … { … }
NewBadgePolicy::NewBadgePolicy(int times_shown_before_dismiss,
int uses_before_dismiss,
base::TimeDelta display_window,
base::TimeDelta new_profile_grace_period)
: … { … }
NewBadgePolicy::~NewBadgePolicy() = default;
bool NewBadgePolicy::ShouldShowNewBadge(
const NewBadgeData& data,
const FeaturePromoStorageService& storage_service) const { … }
void NewBadgePolicy::RecordNewBadgeShown(const base::Feature& feature,
int count) { … }
void NewBadgePolicy::RecordFeatureUsed(const base::Feature& feature,
int count) { … }
int NewBadgePolicy::GetFeatureUsedStorageCap() const { … }
}