modernize base::Feature

This commit is contained in:
Carmelo Messina
2023-04-16 15:40:01 +02:00
parent 221f190cc8
commit 3837c1ce5e
@@ -102,7 +102,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
components/user_scripts/common/user_script.cc | 329 +++++++
components/user_scripts/common/user_script.h | 403 +++++++++
.../common/user_scripts_features.cc | 32 +
.../common/user_scripts_features.h | 34 +
.../common/user_scripts_features.h | 36 +
components/user_scripts/common/view_type.cc | 39 +
components/user_scripts/common/view_type.h | 48 ++
components/user_scripts/renderer/BUILD.gn | 65 ++
@@ -135,7 +135,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
.../renderer/web_ui_injection_host.h | 27 +
.../strings/userscripts_strings.grdp | 54 ++
tools/gritsettings/resource_ids.spec | 6 +
108 files changed, 9427 insertions(+), 1 deletion(-)
108 files changed, 9429 insertions(+), 1 deletion(-)
create mode 100644 components/user_scripts/README.md
create mode 100755 components/user_scripts/android/BUILD.gn
create mode 100644 components/user_scripts/android/java/res/layout/accept_script_item.xml
@@ -344,7 +344,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
#include "components/version_info/version_info.h"
#include "components/viz/common/features.h"
#include "components/viz/common/switches.h"
@@ -7330,6 +7331,10 @@ const FeatureEntry kFeatureEntries[] = {
@@ -7333,6 +7334,10 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(ash::features::kClipboardHistoryNudgeSessionReset)},
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
@@ -7157,19 +7157,18 @@ new file mode 100644
+
+namespace features {
+
+const base::Feature kEnableLoggingUserScripts =
+ {"EnableLoggingUserScripts",
+ base::FEATURE_DISABLED_BY_DEFAULT};
+BASE_FEATURE(kEnableLoggingUserScripts,
+ "EnableLoggingUserScripts",
+ base::FEATURE_DISABLED_BY_DEFAULT);
+
+}
+
+}
\ No newline at end of file
diff --git a/components/user_scripts/common/user_scripts_features.h b/components/user_scripts/common/user_scripts_features.h
new file mode 100644
--- /dev/null
+++ b/components/user_scripts/common/user_scripts_features.h
@@ -0,0 +1,34 @@
@@ -0,0 +1,36 @@
+/*
+ This file is part of Bromite.
+
@@ -7198,13 +7197,14 @@ new file mode 100644
+namespace user_scripts {
+
+namespace features {
+ extern const base::Feature kEnableLoggingUserScripts;
+
+BASE_DECLARE_FEATURE(kEnableLoggingUserScripts);
+
+}
+
+}
+
+#endif
\ No newline at end of file
diff --git a/components/user_scripts/common/view_type.cc b/components/user_scripts/common/view_type.cc
new file mode 100755
--- /dev/null