From df982a547c5e88777a6134e5d18a1482d933f1cf Mon Sep 17 00:00:00 2001 From: Stephan Hartmann Date: Wed, 27 May 2020 10:38:26 +0000 Subject: [PATCH] libstdc++: std::vector must have non-const value_type Bug: 957519 Change-Id: I535b3bcf318f98cecbf4be1520ffe4126abcacd8 --- diff --git a/extensions/common/features/feature_flags.cc b/extensions/common/features/feature_flags.cc index 5b63764..7efa308 100644 --- a/extensions/common/features/feature_flags.cc +++ b/extensions/common/features/feature_flags.cc @@ -19,7 +19,7 @@ constexpr base::Feature kFeatureFlags[] = { {"DeclarativeNetRequest", base::FEATURE_ENABLED_BY_DEFAULT}}; -const std::vector* g_feature_flags_test_override = nullptr; +const std::vector* g_feature_flags_test_override = nullptr; template const base::Feature* GetFeature(T begin, @@ -52,8 +52,8 @@ } ScopedFeatureFlagsOverride CreateScopedFeatureFlagsOverrideForTesting( - const std::vector* features) { - return base::AutoReset*>( + const std::vector* features) { + return base::AutoReset*>( &g_feature_flags_test_override, features); } diff --git a/extensions/common/features/feature_flags.h b/extensions/common/features/feature_flags.h index d1a5dd3..b57740b 100644 --- a/extensions/common/features/feature_flags.h +++ b/extensions/common/features/feature_flags.h @@ -25,9 +25,9 @@ // in scope. Clients must ensure that |features| remains alive (non-dangling) // while the returned value is in scope. using ScopedFeatureFlagsOverride = - base::AutoReset*>; + base::AutoReset*>; ScopedFeatureFlagsOverride CreateScopedFeatureFlagsOverrideForTesting( - const std::vector* features); + const std::vector* features); } // namespace extensions