Skip to content

Commit d13162e

Browse files
authored
Clean up references to removed preference fields (#3009)
1 parent 20449ae commit d13162e

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

patches/core/ungoogled-chromium/remove-unused-preferences-fields.patch

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6558,7 +6558,20 @@
65586558
} else if (ShouldSigninAllowedPrefAffectPrimaryAccount(
65596559
pref_consented_to_sync)) {
65606560
SetPrimaryAccountInternal(CoreAccountInfo(), /*consented_to_sync=*/false,
6561-
@@ -545,10 +417,6 @@ void PrimaryAccountManager::SetSyncPrima
6561+
@@ -527,10 +399,9 @@ void PrimaryAccountManager::SetSyncPrima
6562+
6563+
#if DCHECK_IS_ON()
6564+
{
6565+
- std::string pref_account_id =
6566+
- client_->GetPrefs()->GetString(prefs::kGoogleServicesAccountId);
6567+
+ std::string pref_account_id;
6568+
bool consented_to_sync =
6569+
- client_->GetPrefs()->GetBoolean(prefs::kGoogleServicesConsentedToSync);
6570+
+ false;
6571+
6572+
DCHECK(pref_account_id.empty() || !consented_to_sync ||
6573+
pref_account_id == account_info.account_id.ToString())
6574+
@@ -545,10 +416,6 @@ void PrimaryAccountManager::SetSyncPrima
65626575
// Go ahead and update the last signed in account info here as well. Once a
65636576
// user is signed in the corresponding preferences should match. Doing it here
65646577
// as opposed to on signin allows us to catch the upgrade scenario.
@@ -6569,7 +6582,7 @@
65696582
}
65706583

65716584
void PrimaryAccountManager::SetPrimaryAccountInternal(
6572-
@@ -560,22 +428,6 @@ void PrimaryAccountManager::SetPrimaryAc
6585+
@@ -560,22 +427,6 @@ void PrimaryAccountManager::SetPrimaryAc
65736586
// 'account_info' might be a reference to the contents of `primary_account_`.
65746587
// Create a PrimaryAccount object before calling emplace to avoid crashes.
65756588
primary_account_.emplace(PrimaryAccount(account_info, consented_to_sync));
@@ -6592,7 +6605,7 @@
65926605
}
65936606

65946607
void PrimaryAccountManager::RecordHadPreviousSyncAccount() const {
6595-
@@ -585,7 +437,7 @@ void PrimaryAccountManager::RecordHadPre
6608+
@@ -585,7 +436,7 @@ void PrimaryAccountManager::RecordHadPre
65966609
}
65976610

65986611
const std::string& last_gaia_id_with_sync_enabled =
@@ -6601,7 +6614,7 @@
66016614
const bool existed_primary_account_with_sync =
66026615
!last_gaia_id_with_sync_enabled.empty();
66036616

6604-
@@ -735,38 +587,6 @@ PrimaryAccountChangeEvent::State Primary
6617+
@@ -735,38 +586,6 @@ PrimaryAccountChangeEvent::State Primary
66056618
void PrimaryAccountManager::ComputeExplicitBrowserSignin(
66066619
const PrimaryAccountChangeEvent& event_details,
66076620
ScopedPrefCommit& scoped_pref_commit) {
@@ -6640,7 +6653,7 @@
66406653
}
66416654

66426655
void PrimaryAccountManager::FirePrimaryAccountChanged(
6643-
@@ -850,7 +670,6 @@ void PrimaryAccountManager::OnSigninAllo
6656+
@@ -850,7 +669,6 @@ void PrimaryAccountManager::OnSigninAllo
66446657
bool PrimaryAccountManager::ShouldSigninAllowedPrefAffectPrimaryAccount(
66456658
bool is_sync_consent) {
66466659
return switches::IsExplicitBrowserSigninUIOnDesktopEnabled() &&

0 commit comments

Comments
 (0)