Reland: Remove SyncConsentOptional and OsSyncFeatureEnabled

This relands https://crrev.com/c/3307058 which was reverted due to test
failures. These test failures are addressed by the second patchset.

Removes the code gated by SyncConsentOptional feature flag, as well as
OsSyncFeatureEnabled pref (that becomes redundant without
SyncConsentOptional). Two main reasons for this removal are:
1. There are no immediate plans to launch SyncConsentOptional and
   keeping this code around creates additional maintenance costs.
2. Without SyncConsentOptional OsSyncFeatureEnabled should always be
   true, which is hard to guarantee in all possible code paths.

[email protected],[email protected]

Bug: 1274802
Change-Id: Ia8e97b9752b968c9970c860fb7b4b0cc6e347662
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3350767
Reviewed-by: James Cook <[email protected]>
Reviewed-by: Vasilii Sukhanov <[email protected]>
Reviewed-by: Rushan Suleymanov <[email protected]>
Commit-Queue: Boris Sazonov <[email protected]>
Cr-Commit-Position: refs/heads/main@{#954432}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 6d2ec81..048b846 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -696,6 +696,9 @@
 
 // Deprecated 12/2021.
 const char kArcAppReinstallState[] = "arc_app_reinstall_state";
+
+// Deprecated 12/2021.
+const char kOsSyncFeatureEnabled[] = "sync.os_sync_feature_enabled";
 #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
 
 // Deprecated 12/2021.
@@ -918,6 +921,8 @@
   registry->RegisterBooleanPref(kSyncFirstRunCompleted, false);
 
   registry->RegisterDictionaryPref(kArcAppReinstallState);
+
+  registry->RegisterBooleanPref(kOsSyncFeatureEnabled, false);
 #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
 
 #if defined(OS_ANDROID)
@@ -1801,6 +1806,8 @@
 
   // Added 12/2021.
   profile_prefs->ClearPref(kArcAppReinstallState);
+
+  profile_prefs->ClearPref(kOsSyncFeatureEnabled);
 #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
 
 // Added 12/2021.