Skip to content

Commit

Permalink
Uplift of #24658 (squashed) to beta
Browse files Browse the repository at this point in the history
  • Loading branch information
brave-builds committed Jul 15, 2024
1 parent 04a7c5d commit a9f7df5
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/feature_defaults_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
}
26 changes: 26 additions & 0 deletions chromium_src/services/device/public/cpp/device_features.cc
Original file line number Diff line number Diff line change
@@ -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<device::mojom::LocationProviderManagerMode>
kLocationProviderManagerParam{
&kLocationProviderManager, "LocationProviderManagerMode",
device::mojom::LocationProviderManagerMode::kPlatformOnly,
&location_provider_manager_mode_options};

} // namespace features

0 comments on commit a9f7df5

Please sign in to comment.