Register Read Aloud prefs on startup, make syncable

Also switch to storing the language-to-voice map as a base::Value::Dict
rather than JSON. It was simpler to add native calls to ReadAloudPrefs
than to expose Dict methods in the Java PrefService.

This also allows voice settings to be mergeable
(https://source.chromium.org/chromium/chromium/src/+/main:components/sync_preferences/syncable_prefs_database.h;drc=e3cf2c143bd6187f181b8be2abf4d3f1705561b1;l=34)
which IIUC means better behavior if a user changes one language's
voice on one device and another language's voice on another.

Bug: b/304332488
Change-Id: I14902bfa02dc94f0ae12ac79fc77fbd0d9812778
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003082
Reviewed-by: Rushan Suleymanov <[email protected]>
Reviewed-by: Alex Ilin <[email protected]>
Code-Coverage: [email protected] <[email protected]>
Commit-Queue: Ian Wells <[email protected]>
Reviewed-by: Basia Zimirska <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1220995}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index e3bac46..bd71f8d 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -262,6 +262,7 @@
 #include "chrome/browser/lens/android/lens_prefs.h"
 #include "chrome/browser/media/android/cdm/media_drm_origin_id_manager.h"
 #include "chrome/browser/notifications/notification_channels_provider_android.h"
+#include "chrome/browser/readaloud/android/prefs.h"
 #include "chrome/browser/ssl/known_interception_disclosure_infobar_delegate.h"
 #include "components/cdm/browser/media_drm_storage_impl.h"  // nogncheck crbug.com/1125897
 #include "components/content_creation/notes/core/note_prefs.h"
@@ -1787,6 +1788,7 @@
   permissions::GeolocationPermissionContextAndroid::RegisterProfilePrefs(
       registry);
   query_tiles::RegisterPrefs(registry);
+  readaloud::RegisterProfilePrefs(registry);
   RecentTabsPagePrefs::RegisterProfilePrefs(registry);
   usage_stats::UsageStatsBridge::RegisterProfilePrefs(registry);
   variations::VariationsService::RegisterProfilePrefs(registry);