Cleaning up 1+ year old prefs migrated in browser_prefs.cc
Fixed: b/202492163
Change-Id: If42993bf0f6af9f6ed7fd7dd8f297ce73320f508
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3961715
Reviewed-by: Anthony Cui <[email protected]>
Reviewed-by: Dan H <[email protected]>
Commit-Queue: Jonathan Freed <[email protected]>
Reviewed-by: Dominic Battré <[email protected]>
Reviewed-by: Roman Sorokin <[email protected]>
Reviewed-by: Nicolas Ouellet-Payeur <[email protected]>
Reviewed-by: Douglas Stockwell <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1067102}
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/feed/FeedSurfaceMediatorTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/feed/FeedSurfaceMediatorTest.java
index 0170ee4e..3502421c 100644
--- a/chrome/android/junit/src/org/chromium/chrome/browser/feed/FeedSurfaceMediatorTest.java
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/feed/FeedSurfaceMediatorTest.java
@@ -138,7 +138,6 @@
// We want to make the feed service bridge ignore the ablation flag.
when(mFeedServiceBridgeJniMock.isEnabled())
.thenAnswer(invocation -> mPrefService.getBoolean(Pref.ENABLE_SNIPPETS));
- when(mPrefService.getBoolean(Pref.ENABLE_WEB_FEED_UI)).thenReturn(true);
when(mIdentityService.getSigninManager(any(Profile.class))).thenReturn(mSigninManager);
when(mSigninManager.getIdentityManager()).thenReturn(mIdentityManager);
when(mIdentityManager.hasPrimaryAccount(anyInt())).thenReturn(true);
diff --git a/chrome/browser/ash/login/users/chrome_user_manager_impl.cc b/chrome/browser/ash/login/users/chrome_user_manager_impl.cc
index cc4acf9..5c2c8197 100644
--- a/chrome/browser/ash/login/users/chrome_user_manager_impl.cc
+++ b/chrome/browser/ash/login/users/chrome_user_manager_impl.cc
@@ -68,7 +68,6 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/extensions/permissions_updater.h"
-#include "chrome/browser/policy/networking/policy_cert_service_factory.h"
#include "chrome/browser/policy/networking/user_network_configuration_updater_ash.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_attributes_storage.h"
@@ -932,9 +931,6 @@
multi_profile_user_controller_->RemoveCachedValues(account_id.GetUserEmail());
- policy::PolicyCertServiceFactory::ClearUsedPolicyCertificates(
- account_id.GetUserEmail());
-
EasyUnlockService::ResetLocalStateForUser(account_id);
ChromeUserManager::RemoveNonCryptohomeData(account_id);
diff --git a/chrome/browser/ash/web_applications/help_app/help_app_notification_controller.cc b/chrome/browser/ash/web_applications/help_app/help_app_notification_controller.cc
index c0e09ea8..091ee81 100644
--- a/chrome/browser/ash/web_applications/help_app/help_app_notification_controller.cc
+++ b/chrome/browser/ash/web_applications/help_app/help_app_notification_controller.cc
@@ -54,24 +54,6 @@
namespace ash {
-namespace help_app {
-namespace prefs {
-
-// Deprecated 06/2021.
-// Obsolete pref that used to store the last milestone on which release notes
-// notification was shown.
-const char kObsoleteReleaseNotesLastShownMilestone[] =
- "last_release_notes_shown_milestone";
-
-// Deprecated 06/2021.
-// Obsolete pref that used to store the last milestone on which the Discover Tab
-// notification was shown.
-const char kObsoleteDiscoverTabNotificationLastShownMilestone[] =
- "discover_tab_notification_last_shown_milestone";
-
-} // namespace prefs
-} // namespace help_app
-
void HelpAppNotificationController::RegisterProfilePrefs(
PrefRegistrySimple* registry) {
registry->RegisterIntegerPref(prefs::kHelpAppNotificationLastShownMilestone,
@@ -80,52 +62,6 @@
prefs::kDiscoverTabSuggestionChipTimesLeftToShow, 0);
}
-void HelpAppNotificationController::RegisterObsoletePrefsForMigration(
- PrefRegistrySimple* registry) {
- registry->RegisterIntegerPref(
- help_app::prefs::kObsoleteReleaseNotesLastShownMilestone, -10);
- registry->RegisterIntegerPref(
- help_app::prefs::kObsoleteDiscoverTabNotificationLastShownMilestone, -10);
-}
-
-void HelpAppNotificationController::MigrateObsoleteNotificationPrefs(
- PrefService* pref_service) {
- // If kHelpAppNotificationLastShownMilestone already has a value, migration
- // already happened, or we wrote to the new pref directly.
- if (pref_service->GetUserPrefValue(
- prefs::kHelpAppNotificationLastShownMilestone) != nullptr) {
- return;
- }
-
- // Choose the latest milestone when either a Release Notes or Discover tab
- // notification was shown.
- using help_app::prefs::kObsoleteDiscoverTabNotificationLastShownMilestone;
- using help_app::prefs::kObsoleteReleaseNotesLastShownMilestone;
-
- // If no user value is defined, these values default to -10.
- int release_notes_last_shown_milestone =
- pref_service->GetInteger(kObsoleteReleaseNotesLastShownMilestone);
- int discover_tab_notification_last_shown_milestone = pref_service->GetInteger(
- kObsoleteDiscoverTabNotificationLastShownMilestone);
- int latest_milestone =
- std::max(release_notes_last_shown_milestone,
- discover_tab_notification_last_shown_milestone);
-
- // Only set the new pref's value if any of the previous values were defined.
- if (latest_milestone > 0) {
- pref_service->SetInteger(prefs::kHelpAppNotificationLastShownMilestone,
- latest_milestone);
- }
-}
-
-void HelpAppNotificationController::ClearObsoleteNotificationPrefs(
- PrefService* pref_service) {
- pref_service->ClearPref(
- help_app::prefs::kObsoleteReleaseNotesLastShownMilestone);
- pref_service->ClearPref(
- help_app::prefs::kObsoleteDiscoverTabNotificationLastShownMilestone);
-}
-
HelpAppNotificationController::HelpAppNotificationController(Profile* profile)
: profile_(profile) {}
diff --git a/chrome/browser/ash/web_applications/help_app/help_app_notification_controller.h b/chrome/browser/ash/web_applications/help_app/help_app_notification_controller.h
index 6add0ce..16871602 100644
--- a/chrome/browser/ash/web_applications/help_app/help_app_notification_controller.h
+++ b/chrome/browser/ash/web_applications/help_app/help_app_notification_controller.h
@@ -11,19 +11,9 @@
class Profile;
class PrefRegistrySimple;
-class PrefService;
namespace ash {
-namespace help_app {
-namespace prefs {
-
-extern const char kObsoleteReleaseNotesLastShownMilestone[];
-extern const char kObsoleteDiscoverTabNotificationLastShownMilestone[];
-
-} // namespace prefs
-} // namespace help_app
-
class HelpAppDiscoverTabNotification;
class ReleaseNotesNotification;
@@ -32,9 +22,6 @@
public:
// Registers profile prefs.
static void RegisterProfilePrefs(PrefRegistrySimple* registry);
- static void RegisterObsoletePrefsForMigration(PrefRegistrySimple* registry);
- static void MigrateObsoleteNotificationPrefs(PrefService* pref_service);
- static void ClearObsoleteNotificationPrefs(PrefService* pref_service);
explicit HelpAppNotificationController(Profile* profile);
HelpAppNotificationController(const HelpAppNotificationController&) = delete;
diff --git a/chrome/browser/ash/web_applications/help_app/help_app_notification_controller_unittest.cc b/chrome/browser/ash/web_applications/help_app/help_app_notification_controller_unittest.cc
index e659584..dadee5a0 100644
--- a/chrome/browser/ash/web_applications/help_app/help_app_notification_controller_unittest.cc
+++ b/chrome/browser/ash/web_applications/help_app/help_app_notification_controller_unittest.cc
@@ -73,8 +73,6 @@
scoped_refptr<user_prefs::PrefRegistrySyncable> registry(
new user_prefs::PrefRegistrySyncable());
HelpAppNotificationController::RegisterProfilePrefs(registry.get());
- HelpAppNotificationController::RegisterObsoletePrefsForMigration(
- registry.get());
PrefServiceFactory factory;
factory.set_user_prefs(base::MakeRefCounted<TestingPrefStore>());
return factory.Create(registry);
@@ -144,111 +142,6 @@
std::unique_ptr<PrefService> pref_service_;
};
-// Tests for pref migration.
-TEST_F(HelpAppNotificationControllerTest,
- PrefMigrationCopiesLatestMilestoneWhenNotificationLastShown) {
- ASSERT_EQ(-10, pref_service()->GetInteger(
- prefs::kHelpAppNotificationLastShownMilestone));
-
- pref_service()->SetInteger(
- help_app::prefs::kObsoleteReleaseNotesLastShownMilestone, 80);
- pref_service()->SetInteger(
- help_app::prefs::kObsoleteDiscoverTabNotificationLastShownMilestone, 90);
-
- HelpAppNotificationController::MigrateObsoleteNotificationPrefs(
- pref_service());
-
- ASSERT_EQ(90, pref_service()->GetInteger(
- prefs::kHelpAppNotificationLastShownMilestone));
-}
-
-TEST_F(HelpAppNotificationControllerTest,
- PrefMigrationWhenOnlyReleaseNotesPrefWasSet) {
- ASSERT_EQ(-10, pref_service()->GetInteger(
- prefs::kHelpAppNotificationLastShownMilestone));
- ASSERT_EQ(-10, pref_service()->GetInteger(
- help_app::prefs::kObsoleteReleaseNotesLastShownMilestone));
- ASSERT_EQ(
- -10,
- pref_service()->GetInteger(
- help_app::prefs::kObsoleteDiscoverTabNotificationLastShownMilestone));
-
- pref_service()->SetInteger(
- help_app::prefs::kObsoleteReleaseNotesLastShownMilestone, 80);
-
- HelpAppNotificationController::MigrateObsoleteNotificationPrefs(
- pref_service());
-
- ASSERT_EQ(80, pref_service()->GetInteger(
- prefs::kHelpAppNotificationLastShownMilestone));
-}
-
-TEST_F(HelpAppNotificationControllerTest,
- PrefMigrationWhenOnlyDiscoverTabPrefWasSet) {
- ASSERT_EQ(-10, pref_service()->GetInteger(
- prefs::kHelpAppNotificationLastShownMilestone));
- ASSERT_EQ(-10, pref_service()->GetInteger(
- help_app::prefs::kObsoleteReleaseNotesLastShownMilestone));
- ASSERT_EQ(
- -10,
- pref_service()->GetInteger(
- help_app::prefs::kObsoleteDiscoverTabNotificationLastShownMilestone));
-
- pref_service()->SetInteger(
- help_app::prefs::kObsoleteDiscoverTabNotificationLastShownMilestone, 90);
-
- HelpAppNotificationController::MigrateObsoleteNotificationPrefs(
- pref_service());
-
- ASSERT_EQ(90, pref_service()->GetInteger(
- prefs::kHelpAppNotificationLastShownMilestone));
-}
-
-TEST_F(HelpAppNotificationControllerTest,
- PrefMigrationWhenNoObsoletePrefWasSet) {
- ASSERT_EQ(-10, pref_service()->GetInteger(
- prefs::kHelpAppNotificationLastShownMilestone));
- ASSERT_EQ(-10, pref_service()->GetInteger(
- help_app::prefs::kObsoleteReleaseNotesLastShownMilestone));
- ASSERT_EQ(
- -10,
- pref_service()->GetInteger(
- help_app::prefs::kObsoleteDiscoverTabNotificationLastShownMilestone));
-
- HelpAppNotificationController::MigrateObsoleteNotificationPrefs(
- pref_service());
-
- ASSERT_EQ(-10, pref_service()->GetInteger(
- prefs::kHelpAppNotificationLastShownMilestone));
- ASSERT_EQ(pref_service()->GetUserPrefValue(
- prefs::kHelpAppNotificationLastShownMilestone),
- nullptr);
-}
-
-TEST_F(HelpAppNotificationControllerTest, PrefMigrationHappensOnlyOnce) {
- pref_service()->SetInteger(
- help_app::prefs::kObsoleteReleaseNotesLastShownMilestone, 20);
- pref_service()->SetInteger(
- help_app::prefs::kObsoleteDiscoverTabNotificationLastShownMilestone, 30);
-
- HelpAppNotificationController::MigrateObsoleteNotificationPrefs(
- pref_service());
-
- ASSERT_EQ(30, pref_service()->GetInteger(
- prefs::kHelpAppNotificationLastShownMilestone));
-
- pref_service()->SetInteger(
- help_app::prefs::kObsoleteReleaseNotesLastShownMilestone, 80);
- pref_service()->SetInteger(
- help_app::prefs::kObsoleteDiscoverTabNotificationLastShownMilestone, 90);
-
- HelpAppNotificationController::MigrateObsoleteNotificationPrefs(
- pref_service());
-
- ASSERT_EQ(30, pref_service()->GetInteger(
- prefs::kHelpAppNotificationLastShownMilestone));
-}
-
// Tests for regular profiles.
TEST_F(HelpAppNotificationControllerTest,
DoesNotShowAnyNotificationIfNewRegularProfile) {
diff --git a/chrome/browser/policy/BUILD.gn b/chrome/browser/policy/BUILD.gn
index 8b53c25..4fdd61c 100644
--- a/chrome/browser/policy/BUILD.gn
+++ b/chrome/browser/policy/BUILD.gn
@@ -433,10 +433,7 @@
}
if (is_chromeos_ash) {
- sources += [
- "networking/network_configuration_updater_ash_unittest.cc",
- "networking/policy_cert_service_factory_ash_unittest.cc",
- ]
+ sources += [ "networking/network_configuration_updater_ash_unittest.cc" ]
}
deps = []
diff --git a/chrome/browser/policy/networking/policy_cert_service_factory.cc b/chrome/browser/policy/networking/policy_cert_service_factory.cc
index fec54ab..7e808f6 100644
--- a/chrome/browser/policy/networking/policy_cert_service_factory.cc
+++ b/chrome/browser/policy/networking/policy_cert_service_factory.cc
@@ -63,9 +63,6 @@
if (!user)
return nullptr;
- PolicyCertServiceFactory::MigrateLocalStatePrefIntoProfilePref(
- user->GetAccountId().GetUserEmail(), profile);
-
// Only allow trusted policy-provided certificates for non-guest primary
// users. Guest users don't have user policy, but set
// `may_use_profile_wide_trust_anchors`=false for them out of caution against
@@ -97,31 +94,6 @@
} // namespace
-#if BUILDFLAG(IS_CHROMEOS_ASH)
-// static
-bool PolicyCertServiceFactory::MigrateLocalStatePrefIntoProfilePref(
- const std::string& user_email,
- Profile* profile) {
- base::Value user_email_value(user_email);
- const base::Value::List& list =
- g_browser_process->local_state()->GetList(prefs::kUsedPolicyCertificates);
-
- if (base::Contains(list, user_email_value)) {
- profile->GetPrefs()->SetBoolean(prefs::kUsedPolicyCertificates, true);
- return PolicyCertServiceFactory::ClearUsedPolicyCertificates(user_email);
- }
- return false;
-}
-
-// static
-bool PolicyCertServiceFactory::ClearUsedPolicyCertificates(
- const std::string& user_email) {
- ScopedListPrefUpdate update(g_browser_process->local_state(),
- prefs::kUsedPolicyCertificates);
- return (update->EraseValue(base::Value(user_email)) > 0);
-}
-#endif // BUILDFLAG(IS_CHROMEOS_ASH)
-
// static
PolicyCertService* PolicyCertServiceFactory::GetForProfile(Profile* profile) {
return static_cast<PolicyCertService*>(
diff --git a/chrome/browser/policy/networking/policy_cert_service_factory.h b/chrome/browser/policy/networking/policy_cert_service_factory.h
index dc81847..d6c0f09 100644
--- a/chrome/browser/policy/networking/policy_cert_service_factory.h
+++ b/chrome/browser/policy/networking/policy_cert_service_factory.h
@@ -5,9 +5,6 @@
#ifndef CHROME_BROWSER_POLICY_NETWORKING_POLICY_CERT_SERVICE_FACTORY_H_
#define CHROME_BROWSER_POLICY_NETWORKING_POLICY_CERT_SERVICE_FACTORY_H_
-#include <memory>
-#include <string>
-
#include "build/chromeos_buildflags.h"
#include "chrome/browser/profiles/profile_keyed_service_factory.h"
@@ -44,24 +41,6 @@
PolicyCertServiceFactory(const PolicyCertServiceFactory&) = delete;
PolicyCertServiceFactory& operator=(const PolicyCertServiceFactory&) = delete;
-#if BUILDFLAG(IS_CHROMEOS_ASH)
- // Migrates the `prefs::kUsedPolicyCertificates` preference from local state
- // into per-profile pref storage. Returns true if the local pref was present
- // and was successfully migrated.
- // TODO(b/202492163): The migration started in October 2021. According to
- // chrome/browser/prefs/README.md it should go for at least a year. Also note
- // that Lacros-Chrome can never have this preference in local state.
- static bool MigrateLocalStatePrefIntoProfilePref(
- const std::string& user_email,
- Profile* profile);
- // Used to clear |user_email| as having used certificates pushed by
- // policy before. Returns true if the flag was present and was successfully
- // cleared.
- // TODO(b/202492163) This can be deleted after the local state -> profile pref
- // migration is finished.
- static bool ClearUsedPolicyCertificates(const std::string& user_email);
-#endif // BUILDFLAG(IS_CHROMEOS_ASH)
-
private:
friend struct base::DefaultSingletonTraits<PolicyCertServiceFactory>;
diff --git a/chrome/browser/policy/networking/policy_cert_service_factory_ash_unittest.cc b/chrome/browser/policy/networking/policy_cert_service_factory_ash_unittest.cc
deleted file mode 100644
index 7630d48..0000000
--- a/chrome/browser/policy/networking/policy_cert_service_factory_ash_unittest.cc
+++ /dev/null
@@ -1,132 +0,0 @@
-// Copyright 2021 The Chromium Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/policy/networking/policy_cert_service_factory.h"
-
-#include <memory>
-#include <string>
-#include <utility>
-#include <vector>
-
-#include "base/values.h"
-#include "chrome/browser/policy/networking/policy_cert_service.h"
-#include "chrome/common/pref_names.h"
-#include "chrome/test/base/testing_browser_process.h"
-#include "chrome/test/base/testing_profile.h"
-#include "chrome/test/base/testing_profile_manager.h"
-#include "components/sync_preferences/pref_service_syncable.h"
-#include "content/public/test/browser_task_environment.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace {
-
-constexpr char kUserEmail[] = "[email protected]";
-
-class PolicyCertServiceFactoryMigrationTest : public testing::Test {
- public:
- PolicyCertServiceFactoryMigrationTest()
- : local_state_(TestingBrowserProcess::GetGlobal()),
- profile_manager_(TestingBrowserProcess::GetGlobal(), &local_state_) {}
- ~PolicyCertServiceFactoryMigrationTest() override = default;
-
- void SetUp() override {
- ASSERT_TRUE(profile_manager_.SetUp());
- profile_ = profile_manager_.CreateTestingProfile(kUserEmail);
- ASSERT_TRUE(profile_);
- }
-
- void SetLocalState(std::vector<std::string> values) {
- base::Value::List local_pref_value;
- for (auto&& value : values) {
- local_pref_value.Append(std::move(value));
- }
- local_state_.Get()->SetList(prefs::kUsedPolicyCertificates,
- std::move(local_pref_value));
- }
-
- bool LocalStateContains(const char* value) {
- return base::Contains(
- local_state_.Get()->GetList(prefs::kUsedPolicyCertificates),
- base::Value(value));
- }
-
- protected:
- content::BrowserTaskEnvironment task_environment_;
- ScopedTestingLocalState local_state_;
- TestingProfileManager profile_manager_;
- TestingProfile* profile_ = nullptr;
-};
-
-TEST_F(PolicyCertServiceFactoryMigrationTest, ExistingPrefMigrated) {
- SetLocalState({kUserEmail});
- ASSERT_TRUE(LocalStateContains(kUserEmail));
-
- ASSERT_TRUE(
- policy::PolicyCertServiceFactory::MigrateLocalStatePrefIntoProfilePref(
- kUserEmail, profile_));
-
- auto policy_cert_service =
- policy::PolicyCertService::CreateForTesting(profile_);
- EXPECT_TRUE(policy_cert_service->UsedPolicyCertificates());
-
- EXPECT_FALSE(LocalStateContains(kUserEmail));
-}
-
-TEST_F(PolicyCertServiceFactoryMigrationTest, ManyUsersOneMigrated) {
- constexpr char email_1[] = "[email protected]";
- constexpr char email_2[] = "[email protected]";
-
- SetLocalState({email_1, kUserEmail, email_2});
- ASSERT_TRUE(LocalStateContains(email_1));
- ASSERT_TRUE(LocalStateContains(kUserEmail));
- ASSERT_TRUE(LocalStateContains(email_2));
-
- ASSERT_TRUE(
- policy::PolicyCertServiceFactory::MigrateLocalStatePrefIntoProfilePref(
- kUserEmail, profile_));
-
- auto policy_cert_service =
- policy::PolicyCertService::CreateForTesting(profile_);
- EXPECT_TRUE(policy_cert_service->UsedPolicyCertificates());
-
- ASSERT_TRUE(LocalStateContains(email_1));
- ASSERT_FALSE(LocalStateContains(kUserEmail));
- ASSERT_TRUE(LocalStateContains(email_2));
-}
-
-TEST_F(PolicyCertServiceFactoryMigrationTest, LocalStatePrefEmpty) {
- ASSERT_FALSE(LocalStateContains(kUserEmail));
-
- // Returns false if the user is not found in the local-state
- // kUsedPolicyCertificates preference.
- ASSERT_FALSE(
- policy::PolicyCertServiceFactory::MigrateLocalStatePrefIntoProfilePref(
- kUserEmail, profile_));
-
- auto policy_cert_service =
- policy::PolicyCertService::CreateForTesting(profile_);
- EXPECT_FALSE(policy_cert_service->UsedPolicyCertificates());
-}
-
-TEST_F(PolicyCertServiceFactoryMigrationTest, UserNotInLocalStatePref) {
- constexpr char email_1[] = "[email protected]";
- SetLocalState({email_1});
- ASSERT_TRUE(LocalStateContains(email_1));
- ASSERT_FALSE(LocalStateContains(kUserEmail));
-
- // Returns false if the user is not found in the local-state
- // kUsedPolicyCertificates preference.
- ASSERT_FALSE(
- policy::PolicyCertServiceFactory::MigrateLocalStatePrefIntoProfilePref(
- kUserEmail, profile_));
-
- auto policy_cert_service =
- policy::PolicyCertService::CreateForTesting(profile_);
- EXPECT_FALSE(policy_cert_service->UsedPolicyCertificates());
-
- ASSERT_TRUE(LocalStateContains(email_1));
- ASSERT_FALSE(LocalStateContains(kUserEmail));
-}
-
-} // namespace
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index c6fc5783..0cf1a1a 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -493,23 +493,6 @@
// Please keep the list of deprecated prefs in chronological order. i.e. Add to
// the bottom of the list, not here at the top.
-// Deprecated 10/2021.
-const char kAppCacheForceEnabled[] = "app_cache_force_enabled";
-
-// Deprecated 10/2021
-const char kTabStripStackedLayout[] = "tab-strip-stacked-layout";
-
-#if BUILDFLAG(IS_CHROMEOS_ASH)
-// Deprecated 10/2021
-const char kHasCameraAppMigratedToSWA[] = "camera.has_migrated_to_swa";
-
-// Deprecated 10/2021
-const char kTimesHIDDialogShown[] = "HIDDialog.shown_how_many_times";
-
-// Deprecated 10/2021
-const char kSplitSettingsSyncTrialGroup[] = "split_settings_sync.trial_group";
-#endif // BUILDFLAG(IS_CHROMEOS_ASH)
-
// Deprecated 11/2021.
const char kWasPreviouslySetUpPrefName[] = "android_sms.was_previously_set_up";
@@ -787,15 +770,7 @@
// Register local state used only for migration (clearing or moving to a new
// key).
void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
- registry->RegisterBooleanPref(kTabStripStackedLayout, false);
-
-#if BUILDFLAG(IS_CHROMEOS_ASH)
- registry->RegisterIntegerPref(kTimesHIDDialogShown, 0);
- registry->RegisterStringPref(kSplitSettingsSyncTrialGroup, std::string());
- // Deprecated 10/2021.
- registry->RegisterListPref(prefs::kUsedPolicyCertificates);
-#endif // BUILDFLAG(IS_CHROMEOS_ASH)
-
+ // Deprecated 12/2021.
registry->RegisterIntegerPref(kStabilityRendererHangCount, 0);
registry->RegisterIntegerPref(kStabilityIncompleteSessionEndCount, 0);
registry->RegisterBooleanPref(kStabilitySessionEndCompleted, true);
@@ -861,9 +836,6 @@
#if BUILDFLAG(IS_CHROMEOS_ASH)
registry->RegisterBooleanPref(kCanShowFolderSelectionNudge,
/*default_value=*/true);
- ash::HelpAppNotificationController::RegisterObsoletePrefsForMigration(
- registry);
- registry->RegisterBooleanPref(kHasCameraAppMigratedToSWA, false);
registry->RegisterIntegerPref(kImprovedShortcutsNotificationShownCount, 0);
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
@@ -890,7 +862,6 @@
prefs::kManagedProfileSerialAllowUsbDevicesForUrlsDeprecated);
#endif
- registry->RegisterBooleanPref(kAppCacheForceEnabled, false);
registry->RegisterBooleanPref(kWasPreviouslySetUpPrefName, false);
registry->RegisterDictionaryPref(kAvailabilityProberOriginCheck);
@@ -1690,15 +1661,6 @@
// BEGIN_MIGRATE_OBSOLETE_LOCAL_STATE_PREFS
// Please don't delete the preceding line. It is used by PRESUBMIT.py.
- // Added 10/2021.
- local_state->ClearPref(kTabStripStackedLayout);
-
-#if BUILDFLAG(IS_CHROMEOS_ASH)
- // Added 10/2021
- local_state->ClearPref(kTimesHIDDialogShown);
- local_state->ClearPref(kSplitSettingsSyncTrialGroup);
-#endif // BUILDFLAG(IS_CHROMEOS_ASH)
-
// Added 12/2021.
local_state->ClearPref(kStabilityRendererHangCount);
local_state->ClearPref(kStabilityIncompleteSessionEndCount);
@@ -1801,31 +1763,12 @@
chrome_browser_net::secure_dns::MigrateProbesSettingToOrFromBackup(
profile_prefs);
-#if BUILDFLAG(IS_CHROMEOS_ASH)
- // Added 06/2021.
- ash::HelpAppNotificationController::MigrateObsoleteNotificationPrefs(
- profile_prefs);
- ash::HelpAppNotificationController::ClearObsoleteNotificationPrefs(
- profile_prefs);
-#endif // BUILDFLAG(IS_CHROMEOS_ASH)
-
-#if BUILDFLAG(IS_ANDROID)
- // Added 06/2021
- feed::MigrateObsoleteProfilePrefsJune_2021(profile_prefs);
-#endif // BUILDFLAG(IS_ANDROID)
-
// Added 10/2021.
+ // TODO(crbug.com/1303963): Remove once number of clients migrating is
+ // negligible.
translate::TranslatePrefs::MigrateObsoleteProfilePrefs(profile_prefs);
translate::TranslatePrefs::ClearObsoleteProfilePrefs(profile_prefs);
- // Added 10/2021.
- profile_prefs->ClearPref(kAppCacheForceEnabled);
-
-#if BUILDFLAG(IS_CHROMEOS_ASH)
- // Added 10/2021
- profile_prefs->ClearPref(kHasCameraAppMigratedToSWA);
-#endif // BUILDFLAG(IS_CHROMEOS_ASH)
-
// Added 11/2021.
syncer::ClearObsoleteKeystoreBootstrapTokenPref(profile_prefs);
profile_prefs->ClearPref(kWasPreviouslySetUpPrefName);