Deprecate kAccessibilityPdfOcrAlwaysActive pref.
PDF OCR is now always enabled and pref is no longer needed.
Bug: 341856144
Change-Id: I0ce5865ec5bd7255002578139327bb69aed833cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5604489
Reviewed-by: Dominic Battré <[email protected]>
Reviewed-by: Rushan Suleymanov <[email protected]>
Commit-Queue: Rushan Suleymanov <[email protected]>
Auto-Submit: Ramin Halavati <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1311820}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index c1eda09..e55f7c4 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -1120,6 +1120,12 @@
"settings.a11y.read_anything.omnibox_icon_label_shown_count";
#endif
+// Deprecated 06/2024.
+#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
+inline constexpr char kAccessibilityPdfOcrAlwaysActive[] =
+ "settings.a11y.pdf_ocr_always_active";
+#endif
+
// Register local state used only for migration (clearing or moving to a new
// key).
void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
@@ -1624,6 +1630,11 @@
registry->RegisterIntegerPref(
kAccessibilityReadAnythingOmniboxIconLabelShownCount, 0);
#endif
+
+// Deprecated 06/2024.
+#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
+ registry->RegisterBooleanPref(kAccessibilityPdfOcrAlwaysActive, true);
+#endif
}
void ClearSyncRequestedPrefAndMaybeMigrate(PrefService* profile_prefs) {
@@ -2346,7 +2357,6 @@
registry->RegisterBooleanPref(
prefs::kAccessibilityMainNodeAnnotationsEnabled, false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
- registry->RegisterBooleanPref(prefs::kAccessibilityPdfOcrAlwaysActive, true);
#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
#if BUILDFLAG(IS_CHROMEOS_ASH)
@@ -3013,6 +3023,11 @@
kAccessibilityReadAnythingOmniboxIconLabelShownCount);
#endif
+// Added 06/2024.
+#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
+ profile_prefs->ClearPref(kAccessibilityPdfOcrAlwaysActive);
+#endif
+
// Please don't delete the following line. It is used by PRESUBMIT.py.
// END_MIGRATE_OBSOLETE_PROFILE_PREFS
diff --git a/chrome/browser/sync/prefs/chrome_syncable_prefs_database.cc b/chrome/browser/sync/prefs/chrome_syncable_prefs_database.cc
index 8309bac..dbe6d627 100644
--- a/chrome/browser/sync/prefs/chrome_syncable_prefs_database.cc
+++ b/chrome/browser/sync/prefs/chrome_syncable_prefs_database.cc
@@ -198,7 +198,7 @@
kTabDiscardingExceptions = 100141,
kAccessibilityImageLabelsEnabled = 100142,
kAccessibilityImageLabelsOptInAccepted = 100143,
- kAccessibilityPdfOcrAlwaysActive = 100144,
+ // kAccessibilityPdfOcrAlwaysActive = 100144,(deprecated)
// kApplyPageColorsOnlyOnIncreasedContrast = 100145, (no longer synced)
kDefaultCharset = 100146,
kDefaultTasksByMimeType = 100147,
@@ -1181,10 +1181,6 @@
{syncable_prefs_ids::kAccessibilityImageLabelsOptInAccepted,
syncer::PREFERENCES, sync_preferences::PrefSensitivity::kNone,
sync_preferences::MergeBehavior::kNone}},
- {prefs::kAccessibilityPdfOcrAlwaysActive,
- {syncable_prefs_ids::kAccessibilityPdfOcrAlwaysActive, syncer::PREFERENCES,
- sync_preferences::PrefSensitivity::kNone,
- sync_preferences::MergeBehavior::kNone}},
{prefs::kAccessibilityMainNodeAnnotationsEnabled,
{syncable_prefs_ids::kAccessibilityMainNodeAnnotationsEnabled,
syncer::PREFERENCES, sync_preferences::PrefSensitivity::kNone,