0

cros-geo-apikey: Create a feature flag

Create a new feature flag - `CrosGeoApiKey`. Behind this flag will be
developed the changes to migrate ChromeOS system services and
Chrome-on-ChromeOS to use a different GCP endpoint for location
resolution.

For more details go/new-api-keys-for-cros-geo.

Bug: 403537535
Change-Id: I0fac327f97ee47f5e97669144c6bab75e88e2d65
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6355829
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Zauri Meshveliani <zauri@chromium.org>
Auto-Submit: Zauri Meshveliani <zauri@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1436027}
This commit is contained in:
Zauri Meshveliani
2025-03-21 07:34:48 -07:00
committed by Chromium LUCI CQ
parent bd29a2bd89
commit 94b8a91bf9
8 changed files with 47 additions and 0 deletions

@ -465,6 +465,12 @@ BASE_FEATURE(kCrosPrivacyHub,
"CrosPrivacyHub",
base::FEATURE_ENABLED_BY_DEFAULT);
// If enabled, ChromeOS system services and Chrome-on-ChromeOS will use separate
// API keys for Geolocation resolution.
BASE_FEATURE(kCrosSeparateGeoApiKey,
"CrosSeparateGeoApiKey",
base::FEATURE_DISABLED_BY_DEFAULT);
// Enables cros safety service for trust and safety filtering for the text/image
// output of on-device gen ai models.
BASE_FEATURE(kCrosSafetyService,
@ -3461,6 +3467,10 @@ bool IsCrosPrivacyHubLocationEnabled() {
return base::FeatureList::IsEnabled(kCrosPrivacyHub);
}
bool IsCrosSeparateGeoApiKeyEnabled() {
return base::FeatureList::IsEnabled(kCrosSeparateGeoApiKey);
}
bool IsCrosSafetyServiceEnabled() {
return base::FeatureList::IsEnabled(kCrosSafetyService) ||
switches::IsMantisSecretKeyMatched() || IsCoralFeatureEnabled();

@ -142,6 +142,7 @@ BASE_DECLARE_FEATURE(kCopyClientKeysCertsToChaps);
COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kCoralFeature);
COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kCoralFeatureAllowed);
COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kCrosPrivacyHub);
COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kCrosSeparateGeoApiKey);
COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kCrosSafetyService);
COMPONENT_EXPORT(ASH_CONSTANTS)
BASE_DECLARE_FEATURE(kCryptauthAttestationSyncing);
@ -1073,6 +1074,7 @@ bool IsContinuousOverviewScrollAnimationEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsCoralFeatureEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsCopyClientKeysCertsToChapsEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsCrosPrivacyHubLocationEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsCrosSeparateGeoApiKeyEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsCrosSafetyServiceEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsCrossDeviceFeatureSuiteAllowed();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsCrosSwitcherEnabled();

@ -4855,6 +4855,10 @@ const FeatureEntry kFeatureEntries[] = {
{"enable-cros-privacy-hub", flag_descriptions::kCrosPrivacyHubName,
flag_descriptions::kCrosPrivacyHubDescription, kOsCrOS,
FEATURE_VALUE_TYPE(ash::features::kCrosPrivacyHub)},
{"enable-cros-separate-geo-api-key",
flag_descriptions::kCrosSeparateGeoApiKeyName,
flag_descriptions::kCrosSeparateGeoApiKeyDescription, kOsCrOS,
FEATURE_VALUE_TYPE(ash::features::kCrosSeparateGeoApiKey)},
{"cros-components", flag_descriptions::kCrosComponentsName,
flag_descriptions::kCrosComponentsDescription, kOsCrOS,
FEATURE_VALUE_TYPE(chromeos::features::kCrosComponents)},

@ -2794,6 +2794,11 @@
"owners": [ "chromeos-privacyhub@google.com" ],
"expiry_milestone": 140
},
{
"name": "enable-cros-separate-geo-api-key",
"owners": [ "zauri@google.com", "cros-privacy-features-dev@google.com"],
"expiry_milestone": 140
},
{
"name": "enable-cros-system-japanese-physical-typing",
"owners": [ "jhtin@chromium.org", "essential-inputs-team@google.com" ],

@ -7490,6 +7490,12 @@ const char kCrosMallUrlDescription[] =
const char kCrosPrivacyHubName[] = "Enable ChromeOS Privacy Hub";
const char kCrosPrivacyHubDescription[] = "Enables ChromeOS Privacy Hub.";
const char kCrosSeparateGeoApiKeyName[] =
"Use ChromeOS-specific API keys for location resolution";
const char kCrosSeparateGeoApiKeyDescription[] =
"If enabled, ChromeOS system services and Chrome-on-ChromeOS will use "
"different API keys and GCP endpoint to resolve location.";
const char kDisableIdleSocketsCloseOnMemoryPressureName[] =
"Disable closing idle sockets on memory pressure";
const char kDisableIdleSocketsCloseOnMemoryPressureDescription[] =

@ -4380,6 +4380,9 @@ extern const char kCrosMallUrlDescription[];
extern const char kCrosPrivacyHubName[];
extern const char kCrosPrivacyHubDescription[];
extern const char kCrosSeparateGeoApiKeyName[];
extern const char kCrosSeparateGeoApiKeyDescription[];
extern const char kCrOSEnforceMonoAudioCaptureName[];
extern const char kCrOSEnforceMonoAudioCaptureDescription[];

@ -7078,6 +7078,21 @@
]
}
],
"CrosSeparateGeoApiKey": [
{
"platforms": [
"chromeos"
],
"experiments": [
{
"name": "Enabled",
"enable_features": [
"CrosSeparateGeoApiKey"
]
}
]
}
],
"CrosSwitcher": [
{
"platforms": [

@ -12138,6 +12138,7 @@ from previous Chrome versions.
<int value="-770144964"
label="ExperimentalAccessibilityGoogleTtsHighQualityVoices:enabled"/>
<int value="-769865314" label="AutofillCacheQueryResponses:disabled"/>
<int value="-768338958" label="CrosSeparateGeoApiKey:enabled"/>
<int value="-768240392" label="CertificateTransparency2022Policy:enabled"/>
<int value="-767903409" label="EarlyBodyLoad:enabled"/>
<int value="-767460914"
@ -18095,6 +18096,7 @@ from previous Chrome versions.
<int value="1541446160" label="DisallowManagedProfileSignout:disabled"/>
<int value="1541723759" label="ServiceWorkerNavigationPreload:disabled"/>
<int value="1541729827" label="NtpBackgroundImageErrorDetection:enabled"/>
<int value="1542266641" label="CrosSeparateGeoApiKey:disabled"/>
<int value="1543027970" label="EnableDisplayZoomSetting:disabled"/>
<int value="1543349770" label="CastUseBlocklistForRemotingQuery:disabled"/>
<int value="1543776185"