Add sharedStoragePrivate API

http://go/terminal-gnubby-ash-lacros

The sharedStoragePrivate API allows gnubbyd extension running in
ChromeOS (ash or lacros) to store small amounts of data in ash prefs.
This data is shared between ash and lacros versions of the extension.

Once Terminal SWA runs in lacros rather than ash, we can migrate
gnubbyd back to using chrome.storage.local and remove this private API.

Bug: b/231890240
Change-Id: I550b5f90d5d2c45164c874fe11bea8d60d5c684e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3665986
Auto-Submit: Joel Hockey <[email protected]>
Reviewed-by: Erik Chen <[email protected]>
Commit-Queue: Joel Hockey <[email protected]>
Reviewed-by: Ted Choc <[email protected]>
Reviewed-by: Dominick Ng <[email protected]>
Reviewed-by: Devlin Cronin <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1008455}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 8f3e3bc..336f8af 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -193,6 +193,7 @@
 #include "chrome/browser/ash/settings/stats_reporting_controller.h"
 #include "chrome/browser/chromeos/extensions/extensions_permissions_tracker.h"
 #include "chrome/browser/component_updater/metadata_table_chromeos.h"
+#include "chrome/browser/extensions/api/shared_storage/shared_storage_private_api.h"
 #include "chrome/browser/ui/ash/projector/projector_app_client_impl.h"
 #include "chrome/browser/ui/webui/chromeos/edu_coexistence/edu_coexistence_login_handler_chromeos.h"
 #include "chrome/browser/ui/webui/signin/inline_login_handler_chromeos.h"
@@ -1328,6 +1329,9 @@
   extensions::AudioAPI::RegisterUserPrefs(registry);
   extensions::ExtensionPrefs::RegisterProfilePrefs(registry);
   extensions::ExtensionsUI::RegisterProfilePrefs(registry);
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+  extensions::shared_storage::RegisterProfilePrefs(registry);
+#endif  // BUILDFLAG(IS_CHROMEOS_ASH)
   extensions::PermissionsManager::RegisterProfilePrefs(registry);
   extensions::RuntimeAPI::RegisterPrefs(registry);
   // TODO(devlin): This would be more inline with the other calls here if it