Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f40f834 authored by Carmelo Messina's avatar Carmelo Messina Committed by Carl
Browse files

Use helper macros to define base::Features

parent 97ee58b5
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -30,9 +30,9 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 gpu/config/gpu_workaround_list.txt          |  1 +
 gpu/ipc/service/gpu_init.cc                 |  5 +++++
 gpu/ipc/service/stream_texture_android.cc   | 11 ++++++++++-
 media/base/media_switches.cc                |  4 ++++
 media/base/media_switches.cc                |  5 +++++
 media/base/media_switches.h                 |  1 +
 12 files changed, 65 insertions(+), 5 deletions(-)
 12 files changed, 66 insertions(+), 5 deletions(-)

diff --git a/base/android/android_image_reader_compat.cc b/base/android/android_image_reader_compat.cc
--- a/base/android/android_image_reader_compat.cc
@@ -231,13 +231,14 @@ diff --git a/gpu/ipc/service/stream_texture_android.cc b/gpu/ipc/service/stream_
diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
--- a/media/base/media_switches.cc
+++ b/media/base/media_switches.cc
@@ -750,6 +750,10 @@ BASE_FEATURE(kHardwareSecureDecryptionExperiment,
@@ -750,6 +750,11 @@ BASE_FEATURE(kHardwareSecureDecryptionExperiment,
 // Allows automatically disabling hardware secure Content Decryption Module
 // (CDM) after failures or crashes to fallback to software secure CDMs. If this
 // feature is disabled, the fallback will never happen and users could be stuck
+// Enables the Android Image Reader path for Video decoding(for AVDA and MCVD)
+const base::Feature kAImageReaderVideoOutput{"AImageReaderVideoOutput",
+                                             base::FEATURE_ENABLED_BY_DEFAULT};
+BASE_FEATURE(kAImageReaderVideoOutput,
+             "AImageReaderVideoOutput",
+             base::FEATURE_ENABLED_BY_DEFAULT);
+
 // in playback failures.
 BASE_FEATURE(kHardwareSecureDecryptionFallback,
@@ -249,7 +250,7 @@ diff --git a/media/base/media_switches.h b/media/base/media_switches.h
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp9kSVCHWEncoding);
 #endif  // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS)
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kVideoBlitColorAccuracy);
+MEDIA_EXPORT extern const base::Feature kAImageReaderVideoOutput;
+MEDIA_EXPORT BASE_DECLARE_FEATURE(kAImageReaderVideoOutput);
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kVp9kSVCHWDecoding);
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kWakeLockOptimisationHiddenMuted);
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kWebContentsCaptureHiDpi);
+7 −7
Original line number Diff line number Diff line
@@ -115,14 +115,14 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse
diff --git a/chrome/browser/flags/android/chrome_feature_list.h b/chrome/browser/flags/android/chrome_feature_list.h
--- a/chrome/browser/flags/android/chrome_feature_list.h
+++ b/chrome/browser/flags/android/chrome_feature_list.h
@@ -12,6 +12,7 @@
 namespace chrome {
 namespace android {
 
+extern const base::Feature kAllowUserCertificates;
 // Alphabetical:
 BASE_DECLARE_FEATURE(kAdaptiveButtonInTopToolbar);
@@ -17,6 +17,7 @@ BASE_DECLARE_FEATURE(kAdaptiveButtonInTopToolbar);
 BASE_DECLARE_FEATURE(kAdaptiveButtonInTopToolbarCustomizationV2);
 BASE_DECLARE_FEATURE(kAddToHomescreenIPH);
 BASE_DECLARE_FEATURE(kAllowNewIncognitoTabIntents);
+BASE_DECLARE_FEATURE(kAllowUserCertificates);
 BASE_DECLARE_FEATURE(kAndroidScrollOptimizations);
 BASE_DECLARE_FEATURE(kAndroidSearchEngineChoiceNotification);
 BASE_DECLARE_FEATURE(kAssistantConsentModal);
diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
--- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
+++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
+7 −6
Original line number Diff line number Diff line
@@ -8,10 +8,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 chrome/browser/about_flags.cc           | 4 ++++
 chrome/browser/flag_descriptions.cc     | 4 ++++
 chrome/browser/flag_descriptions.h      | 3 +++
 net/base/features.cc                    | 3 +++
 net/base/features.cc                    | 4 ++++
 net/base/features.h                     | 2 ++
 net/url_request/url_request_http_job.cc | 4 ++++
 6 files changed, 20 insertions(+)
 6 files changed, 21 insertions(+)

diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
@@ -57,12 +57,13 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
diff --git a/net/base/features.cc b/net/base/features.cc
--- a/net/base/features.cc
+++ b/net/base/features.cc
@@ -113,6 +113,9 @@ BASE_FEATURE(kPartitionNelAndReportingByNetworkIsolationKey,
@@ -113,6 +113,10 @@ BASE_FEATURE(kPartitionNelAndReportingByNetworkIsolationKey,
              "PartitionNelAndReportingByNetworkIsolationKey",         // must be enabled
              base::FEATURE_ENABLED_BY_DEFAULT);                       // in Bromite
 
+const base::Feature kIsCleartextPermitted{"IsCleartextPermitted",
+                                      base::FEATURE_ENABLED_BY_DEFAULT};
+BASE_FEATURE(kIsCleartextPermitted,
+             "IsCleartextPermitted",
+             base::FEATURE_ENABLED_BY_DEFAULT);
+
 BASE_FEATURE(kEnableDoubleKeyNetworkAnonymizationKey,
              "EnableDoubleKeyNetworkAnonymizationKey",
@@ -74,7 +75,7 @@ diff --git a/net/base/features.h b/net/base/features.h
 // origin requests are restricted to contain at most the source origin.
 NET_EXPORT BASE_DECLARE_FEATURE(kCapReferrerToOriginOnCrossOrigin);
 
+NET_EXPORT extern const base::Feature kIsCleartextPermitted;
+NET_EXPORT BASE_DECLARE_FEATURE(kIsCleartextPermitted);
+
 // Support for altering the parameters used for DNS transaction timeout. See
 // ResolveContext::SecureTransactionTimeout().
+1 −1
Original line number Diff line number Diff line
@@ -1306,7 +1306,7 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.h b/chrome/browser
 BASE_DECLARE_FEATURE(kTabStripRedesign);
 BASE_DECLARE_FEATURE(kTabSwitcherOnReturn);
 BASE_DECLARE_FEATURE(kTabToGTSAnimation);
+extern const base::Feature kBookmarksExportUseSaf;
+BASE_DECLARE_FEATURE(kBookmarksExportUseSaf);
 BASE_DECLARE_FEATURE(kTestDefaultDisabled);
 BASE_DECLARE_FEATURE(kTestDefaultEnabled);
 BASE_DECLARE_FEATURE(kToolbarMicIphAndroid);
+7 −8
Original line number Diff line number Diff line
@@ -9,8 +9,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 chrome/browser/flag_descriptions.h                        | 3 +++
 .../browser/loader/browser_initiated_resource_request.cc  | 8 ++++++++
 services/network/public/cpp/features.cc                   | 5 +++++
 services/network/public/cpp/features.h                    | 3 ++-
 6 files changed, 26 insertions(+), 2 deletions(-)
 services/network/public/cpp/features.h                    | 2 +-
 6 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
@@ -88,10 +88,10 @@ diff --git a/services/network/public/cpp/features.cc b/services/network/public/c
              "ExpectCTReporting",
              base::FEATURE_ENABLED_BY_DEFAULT);
 
+
+// Enable save-data header separately (without enabled data reduction service).
+const base::Feature kEnableSaveDataHeader{"EnableSaveDataHeader",
+                                           base::FEATURE_DISABLED_BY_DEFAULT};
+BASE_FEATURE(kEnableSaveDataHeader,
+             "EnableSaveDataHeader",
+             base::FEATURE_DISABLED_BY_DEFAULT);
+
 BASE_FEATURE(kNetworkErrorLogging,
              "NetworkErrorLogging",
@@ -99,13 +99,12 @@ diff --git a/services/network/public/cpp/features.cc b/services/network/public/c
diff --git a/services/network/public/cpp/features.h b/services/network/public/cpp/features.h
--- a/services/network/public/cpp/features.h
+++ b/services/network/public/cpp/features.h
@@ -51,7 +51,8 @@ extern const base::FeatureParam<TrustTokenOriginTrialSpec>
@@ -50,7 +50,7 @@ extern const base::FeatureParam<TrustTokenOriginTrialSpec>
     kTrustTokenOperationsRequiringOriginTrial;
 COMPONENT_EXPORT(NETWORK_CPP)
 extern const base::FeatureParam<bool> kPlatformProvidedTrustTokenIssuance;
-
+COMPONENT_EXPORT(NETWORK_CPP)
+extern const base::Feature kEnableSaveDataHeader;
+COMPONENT_EXPORT(NETWORK_CPP) BASE_DECLARE_FEATURE(kEnableSaveDataHeader);
 COMPONENT_EXPORT(NETWORK_CPP)
 BASE_DECLARE_FEATURE(kWebSocketReassembleShortMessages);
 
Loading