blob: e8f1ca5f52649ba8f2ee6b5996f1710276d334dd [file] [log] [blame]
Ehimare Okoyomon2eccb6072020-05-12 12:22:271// Copyright 2020 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Olesia Marukhno46ccd432021-12-03 08:50:275#include "components/page_info/core/features.h"
Ehimare Okoyomon2eccb6072020-05-12 12:22:276
7#include "base/feature_list.h"
8#include "base/metrics/field_trial_params.h"
Xiaohan Wangd9e3b1f02022-01-14 14:48:359#include "build/build_config.h"
Christian Dullweber329dad32022-04-20 17:45:3810#include "ui/base/l10n/l10n_util.h"
Ehimare Okoyomon2eccb6072020-05-12 12:22:2711
12namespace page_info {
13
Xiaohan Wangd9e3b1f02022-01-14 14:48:3514#if BUILDFLAG(IS_ANDROID)
Jordan Oroshiba244e9ff2021-02-04 22:20:3915const base::Feature kPageInfoHistory{"PageInfoHistory",
Ehimare Okoyomon8bfbe7772021-11-15 15:40:5716 base::FEATURE_ENABLED_BY_DEFAULT};
Zhiyuan Caiabef3402021-09-23 19:15:3217const base::Feature kPageInfoStoreInfo{"PageInfoStoreInfo",
18 base::FEATURE_DISABLED_BY_DEFAULT};
Christian Dullweber2b2f02a2022-02-08 19:06:0819
20const base::Feature kPageInfoDiscoverability{"PageInfoDiscoverability",
21 base::FEATURE_ENABLED_BY_DEFAULT};
Christian Dullweber3f91c90c82020-09-09 10:48:2622#endif
Ehimare Okoyomon2eccb6072020-05-12 12:22:2723
Christian Dullweber329dad32022-04-20 17:45:3824extern bool IsAboutThisSiteFeatureEnabled(const std::string& locale) {
25 if (l10n_util::GetLanguage(locale) == "en") {
26 return base::FeatureList::IsEnabled(kPageInfoAboutThisSiteEn);
27 } else {
28 return base::FeatureList::IsEnabled(kPageInfoAboutThisSiteNonEn);
29 }
30}
Olesia Marukhno0fc754b2021-09-17 15:05:0631
Christian Dullweber329dad32022-04-20 17:45:3832const base::Feature kPageInfoAboutThisSiteEn{"PageInfoAboutThisSiteEn",
33 base::FEATURE_ENABLED_BY_DEFAULT};
34const base::Feature kPageInfoAboutThisSiteNonEn{
35 "PageInfoAboutThisSiteNonEn", base::FEATURE_DISABLED_BY_DEFAULT};
36
37const base::FeatureParam<bool> kShowSampleContent{&kPageInfoAboutThisSiteEn,
Christian Dullweber8303ced2022-01-28 13:53:2238 "ShowSampleContent", false};
Christian Dullweberd933ad52021-10-28 09:31:2339
Christian Dullweber88c9192f2022-04-21 12:33:5440const base::Feature kPageInfoAboutThisSiteUrlGranularity{
41 "PageInfoAboutThisSiteUrlGranularity", base::FEATURE_DISABLED_BY_DEFAULT};
42
43const base::Feature kPageInfoAboutThisSiteMoreInfo{
44 "PageInfoAboutThisSiteMoreInfo", base::FEATURE_DISABLED_BY_DEFAULT};
45
Christian Dullweber0897f512022-03-22 11:59:4346const base::Feature kAboutThisSiteBanner{"AboutThisSiteBanner",
47 base::FEATURE_DISABLED_BY_DEFAULT};
48
Xiaohan Wangd9e3b1f02022-01-14 14:48:3549#if !BUILDFLAG(IS_ANDROID)
Olesia Marukhno72f47472021-12-13 16:53:3750const base::Feature kPageInfoHistoryDesktop{"PageInfoHistoryDesktop",
51 base::FEATURE_DISABLED_BY_DEFAULT};
52#endif
53
Olesia Marukhno4d09c9072021-04-08 09:43:2354} // namespace page_info