Add cromite flags support: Added ability to signal a modified default during build
This commit is contained in:
@@ -17,7 +17,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
base/android/feature_map.cc | 5 +
|
||||
.../base/cached_flags/ValuesReturned.java | 2 +-
|
||||
base/feature_list.cc | 76 ++++++++
|
||||
base/feature_list.h | 72 +++++++-
|
||||
base/feature_list.h | 80 +++++++-
|
||||
build/android/gyp/java_cpp_features.py | 17 ++
|
||||
chrome/android/java/res/values/values.xml | 3 +
|
||||
.../java/res/xml/privacy_preferences.xml | 4 +
|
||||
@@ -107,7 +107,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
third_party/blink/public/common/features.h | 1 +
|
||||
ui/base/ui_base_features.cc | 1 +
|
||||
ui/base/ui_base_features.h | 1 +
|
||||
94 files changed, 826 insertions(+), 31 deletions(-)
|
||||
94 files changed, 834 insertions(+), 31 deletions(-)
|
||||
create mode 100644 chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/cromite/include_all_directory.java
|
||||
create mode 100644 chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/cromite/java_template/CromiteCachedFlag.java.tmpl
|
||||
create mode 100644 chrome/browser/ui/android/strings/cromite_android_chrome_strings_grd/Add-cromite-flags-support.grdp
|
||||
@@ -327,7 +327,7 @@ diff --git a/base/feature_list.h b/base/feature_list.h
|
||||
// Some characters are not allowed to appear in feature names or the
|
||||
// associated field trial names, as they are used as special characters for
|
||||
// command-line serialization. This function checks that the strings are ASCII
|
||||
@@ -754,4 +764,62 @@ class BASE_EXPORT FeatureList {
|
||||
@@ -754,4 +764,70 @@ class BASE_EXPORT FeatureList {
|
||||
|
||||
} // namespace base
|
||||
|
||||
@@ -388,6 +388,14 @@ diff --git a/base/feature_list.h b/base/feature_list.h
|
||||
+ g_feature_default_state_overrider_ ##feature {namespace_value::feature, base::FEATURE_DISABLED_BY_DEFAULT}; \
|
||||
+ _Pragma("clang diagnostic pop") \
|
||||
+ static_assert(true, "") /* for a semicolon requirement */
|
||||
+
|
||||
+#define BASE_FEATURE_DISABLED(feature, name, default_state) \
|
||||
+ BASE_FEATURE(feature, name, default_state); \
|
||||
+ static_assert(default_state == base::FEATURE_DISABLED_BY_DEFAULT, "Check default state")
|
||||
+
|
||||
+#define BASE_FEATURE_ENABLED(feature, name, default_state) \
|
||||
+ BASE_FEATURE(feature, name, default_state); \
|
||||
+ static_assert(default_state == base::FEATURE_ENABLED_BY_DEFAULT, "Check default state")
|
||||
+
|
||||
#endif // BASE_FEATURE_LIST_H_
|
||||
diff --git a/build/android/gyp/java_cpp_features.py b/build/android/gyp/java_cpp_features.py
|
||||
|
||||
Reference in New Issue
Block a user