[Privacy Hub] Early support for geolocation policy

This patch introduces a new device preference, that is policy
controlled. This preference manages the geolocation access when no user
is logged in to the device (i.e. log-in screen). This level of
granularity is needed to accommodate the existing enterprise policies.
Using this policy, we achieve different log-in screen behavior for
regular and enterprise devices.
For unmanaged devices geolocation is disallowed on log-in screen.
For managed devices geolocation is allowed on log-in screen.

  policy_name = "DeviceLoginScreenGeolocationAccessLevel"
  pref_name = "kDeviceGeolocationAllowed"
  pref_storage = "local state"

The complete policy integration for the Privacy Hub is planned for v2.
The existing implementation is sufficient for the MVP. Before v2
integration, admins should be careful changing the value of this pref
from default as it might break other policies like
"SystemTimezoneAutomaticDetection".

Bug: b:240921313
TEST=testing/xvfb.py out/Default/browser_tests \
--gtest_filter=*PolicyPrefsTest.PolicyToPrefsMapping* \
--test_policy_to_pref_mappings_filter=DeviceLoginScreenGeolocationAccessLevel

Change-Id: I6648acc964b12537b6598354b0dde4b9224bb8c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4311945
Reviewed-by: Alex Newcomer <[email protected]>
Commit-Queue: Zauri Meshveliani‎ <[email protected]>
Auto-Submit: Zauri Meshveliani‎ <[email protected]>
Reviewed-by: Alexander Hendrich <[email protected]>
Reviewed-by: Denis Kuznetsov <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1126112}
diff --git a/ash/ash_prefs.cc b/ash/ash_prefs.cc
index f43b64a..b682556 100644
--- a/ash/ash_prefs.cc
+++ b/ash/ash_prefs.cc
@@ -158,6 +158,7 @@
   WallpaperPrefManager::RegisterLocalStatePrefs(registry);
   DetachableBaseHandler::RegisterPrefs(registry);
   PowerPrefs::RegisterLocalStatePrefs(registry);
+  PrivacyHubController::RegisterLocalStatePrefs(registry);
   DisplayPrefs::RegisterLocalStatePrefs(registry);
   LoginExpandedPublicAccountView::RegisterLocalStatePrefs(registry);
   LockStateController::RegisterPrefs(registry);