Document that pref migration in browser_prefs.cc does not handle iOS.

See bug for more details. This should hopefully reduce the likelihood of
more bugs caused due to forgetting to migrate obsolete prefs on iOS.

Bug: 1295881
Change-Id: Ib195f3763bd48ea671a5ba7a69417f45a75749d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3447833
Reviewed-by: Dominic Battré <[email protected]>
Commit-Queue: Scott Little <[email protected]>
Auto-Submit: Scott Little <[email protected]>
Cr-Commit-Position: refs/heads/main@{#971337}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index d1d6494..41136277 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -1521,6 +1521,13 @@
 // This method should be periodically pruned of year+ old migrations.
 // See chrome/browser/prefs/README.md for details.
 void MigrateObsoleteLocalStatePrefs(PrefService* local_state) {
+  // IMPORTANT NOTE: This code is *not* run on iOS Chrome. If a pref is migrated
+  // or cleared here, and that pref is also used in iOS Chrome, it may also need
+  // to be migrated or cleared specifically for iOS as well. This could be by
+  // doing the migration in feature code that's called by all platforms instead
+  // of here, or by calling migration code in the appropriate place for iOS
+  // specifically, e.g. ios/chrome/browser/prefs/browser_prefs.mm.
+
   // BEGIN_MIGRATE_OBSOLETE_LOCAL_STATE_PREFS
   // Please don't delete the preceding line. It is used by PRESUBMIT.py.
 
@@ -1563,11 +1570,25 @@
 
   // Please don't delete the following line. It is used by PRESUBMIT.py.
   // END_MIGRATE_OBSOLETE_LOCAL_STATE_PREFS
+
+  // IMPORTANT NOTE: This code is *not* run on iOS Chrome. If a pref is migrated
+  // or cleared here, and that pref is also used in iOS Chrome, it may also need
+  // to be migrated or cleared specifically for iOS as well. This could be by
+  // doing the migration in feature code that's called by all platforms instead
+  // of here, or by calling migration code in the appropriate place for iOS
+  // specifically, e.g. ios/chrome/browser/prefs/browser_prefs.mm.
 }
 
 // This method should be periodically pruned of year+ old migrations.
 // See chrome/browser/prefs/README.md for details.
 void MigrateObsoleteProfilePrefs(Profile* profile) {
+  // IMPORTANT NOTE: This code is *not* run on iOS Chrome. If a pref is migrated
+  // or cleared here, and that pref is also used in iOS Chrome, it may also need
+  // to be migrated or cleared specifically for iOS as well. This could be by
+  // doing the migration in feature code that's called by all platforms instead
+  // of here, or by calling migration code in the appropriate place for iOS
+  // specifically, e.g. ios/chrome/browser/prefs/browser_prefs.mm.
+
   // BEGIN_MIGRATE_OBSOLETE_PROFILE_PREFS
   // Please don't delete the preceding line. It is used by PRESUBMIT.py.
 
@@ -1832,4 +1853,11 @@
 
   // Please don't delete the following line. It is used by PRESUBMIT.py.
   // END_MIGRATE_OBSOLETE_PROFILE_PREFS
+
+  // IMPORTANT NOTE: This code is *not* run on iOS Chrome. If a pref is migrated
+  // or cleared here, and that pref is also used in iOS Chrome, it may also need
+  // to be migrated or cleared specifically for iOS as well. This could be by
+  // doing the migration in feature code that's called by all platforms instead
+  // of here, or by calling migration code in the appropriate place for iOS
+  // specifically, e.g. ios/chrome/browser/prefs/browser_prefs.mm.
 }