Roll out diacritics on by default to NZ

Quite a bit of blast radius to pass the country as a parameter from chrome->ash

BUG:b:286314257

Change-Id: Id509ad2a089a0b14944e3647b4dcdb7a397dd012
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4651009
Reviewed-by: Xiaoqian Dai <[email protected]>
Reviewed-by: Hidehiko Abe <[email protected]>
Reviewed-by: Zentaro Kavanagh <[email protected]>
Commit-Queue: John Palmer <[email protected]>
Reviewed-by: Dominic Battre <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1183476}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 0f55529..04ffa22 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/prefs/browser_prefs.h"
 
 #include <string>
+#include <string_view>
 
 #include "ash/constants/ash_constants.h"
 #include "base/time/time.h"
@@ -1392,6 +1393,16 @@
 
 }  // namespace
 
+std::string GetCountry() {
+  if (!g_browser_process || !g_browser_process->variations_service()) {
+    // This should only happen in tests. Ideally this would be guarded by
+    // CHECK_IS_TEST, but that is not set on Android, so no specific guard.
+    return std::string();
+  }
+  return std::string(
+      g_browser_process->variations_service()->GetStoredPermanentCountry());
+}
+
 void RegisterLocalState(PrefRegistrySimple* registry) {
   // Call outs to individual subsystems that register Local State (browser-wide)
   // prefs en masse. See RegisterProfilePrefs for per-profile prefs. Please
@@ -2051,7 +2062,7 @@
   ::android::RegisterUserProfilePrefs(registry);
 #endif
 #if BUILDFLAG(IS_CHROMEOS_ASH)
-  ash::RegisterUserProfilePrefs(registry);
+  ash::RegisterUserProfilePrefs(registry, locale);
 #endif
 }
 
@@ -2060,9 +2071,10 @@
 }
 
 #if BUILDFLAG(IS_CHROMEOS_ASH)
-void RegisterSigninProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
+void RegisterSigninProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
+                                std::string_view country) {
   RegisterProfilePrefs(registry, g_browser_process->GetApplicationLocale());
-  ash::RegisterSigninProfilePrefs(registry);
+  ash::RegisterSigninProfilePrefs(registry, country);
 }
 
 #endif