diff --git a/app/feature_defaults_unittest.cc b/app/feature_defaults_unittest.cc index fa77bf761b3a..56ff413426fe 100644 --- a/app/feature_defaults_unittest.cc +++ b/app/feature_defaults_unittest.cc @@ -279,6 +279,9 @@ TEST(FeatureDefaultsTest, EnabledFeatures) { &blink::features::kReduceUserAgentMinorVersion, &blink::features::kUACHOverrideBlank, &features::kCertificateTransparencyAskBeforeEnabling, +#if !BUILDFLAG(IS_ANDROID) + &features::kLocationProviderManager, +#endif &media::kEnableTabMuting, &net::features::kPartitionConnectionsByNetworkIsolationKey, #if !BUILDFLAG(IS_ANDROID) @@ -290,3 +293,10 @@ TEST(FeatureDefaultsTest, EnabledFeatures) { EXPECT_TRUE(base::FeatureList::IsEnabled(*feature)) << feature->name; } } + +TEST(FeatureDefaultsTest, DefaultFeatureParameters) { +#if !BUILDFLAG(IS_ANDROID) + EXPECT_EQ(features::kLocationProviderManagerParam.default_value, + device::mojom::LocationProviderManagerMode::kPlatformOnly); +#endif +} diff --git a/chromium_src/services/device/public/cpp/device_features.cc b/chromium_src/services/device/public/cpp/device_features.cc new file mode 100644 index 000000000000..3d6f028a7387 --- /dev/null +++ b/chromium_src/services/device/public/cpp/device_features.cc @@ -0,0 +1,26 @@ +/* Copyright (c) 2024 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at https://mozilla.org/MPL/2.0/. */ + +#include "services/device/public/cpp/device_features.h" + +#define kLocationProviderManagerParam kLocationProviderManagerParamUnused +#include "src/services/device/public/cpp/device_features.cc" +#undef kLocationProviderManagerParam + +#include "base/feature_override.h" + +namespace features { + +OVERRIDE_FEATURE_DEFAULT_STATES({{ + {kLocationProviderManager, base::FEATURE_ENABLED_BY_DEFAULT}, +}}); + +const base::FeatureParam + kLocationProviderManagerParam{ + &kLocationProviderManager, "LocationProviderManagerMode", + device::mojom::LocationProviderManagerMode::kPlatformOnly, + &location_provider_manager_mode_options}; + +} // namespace features