Use helper macros to define base::Features in //sql
This allows:
- features to be defined with a consistent set of qualifiers, and for
that set of qualifiers to be updated over time as appropriate.
- better PRESUBMIT checks to ensure that base::Features are not defined
in headers.
- simplifies things for scripts trying to extract feature definitions
out of C++ code.
The primary CL was generated using a script that automatically rewrites
base::Feature declarations and definitions to the macro form. Changes to
any files with known incompatibilities with the macros (base::Features
without static storage duration and base::Features declared as static
class members) were then fully reverted; those changes will be manually
handled in followups.
This CL was uploaded by git cl split.
[email protected]
Bug: 1364289
Change-Id: Ib72314440a729540f22a58022fab85cab5dc6a19
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3923023
Auto-Submit: Daniel Cheng <[email protected]>
Reviewed-by: Austin Sullivan <[email protected]>
Commit-Queue: Austin Sullivan <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1052139}
diff --git a/sql/sql_features.cc b/sql/sql_features.cc
index 9a1939f..56736f5e 100644
--- a/sql/sql_features.cc
+++ b/sql/sql_features.cc
@@ -9,8 +9,9 @@
namespace features {
// Enable WAL mode for all SQLite databases.
-const base::Feature kEnableWALModeByDefault{"EnableWALModeByDefault",
- base::FEATURE_DISABLED_BY_DEFAULT};
+BASE_FEATURE(kEnableWALModeByDefault,
+ "EnableWALModeByDefault",
+ base::FEATURE_DISABLED_BY_DEFAULT);
} // namespace features