|
6558 | 6558 | } else if (ShouldSigninAllowedPrefAffectPrimaryAccount(
|
6559 | 6559 | pref_consented_to_sync)) {
|
6560 | 6560 | 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 |
6562 | 6575 | // Go ahead and update the last signed in account info here as well. Once a
|
6563 | 6576 | // user is signed in the corresponding preferences should match. Doing it here
|
6564 | 6577 | // as opposed to on signin allows us to catch the upgrade scenario.
|
|
6569 | 6582 | }
|
6570 | 6583 |
|
6571 | 6584 | void PrimaryAccountManager::SetPrimaryAccountInternal(
|
6572 |
| -@@ -560,22 +428,6 @@ void PrimaryAccountManager::SetPrimaryAc |
| 6585 | +@@ -560,22 +427,6 @@ void PrimaryAccountManager::SetPrimaryAc |
6573 | 6586 | // 'account_info' might be a reference to the contents of `primary_account_`.
|
6574 | 6587 | // Create a PrimaryAccount object before calling emplace to avoid crashes.
|
6575 | 6588 | primary_account_.emplace(PrimaryAccount(account_info, consented_to_sync));
|
|
6592 | 6605 | }
|
6593 | 6606 |
|
6594 | 6607 | void PrimaryAccountManager::RecordHadPreviousSyncAccount() const {
|
6595 |
| -@@ -585,7 +437,7 @@ void PrimaryAccountManager::RecordHadPre |
| 6608 | +@@ -585,7 +436,7 @@ void PrimaryAccountManager::RecordHadPre |
6596 | 6609 | }
|
6597 | 6610 |
|
6598 | 6611 | const std::string& last_gaia_id_with_sync_enabled =
|
|
6601 | 6614 | const bool existed_primary_account_with_sync =
|
6602 | 6615 | !last_gaia_id_with_sync_enabled.empty();
|
6603 | 6616 |
|
6604 |
| -@@ -735,38 +587,6 @@ PrimaryAccountChangeEvent::State Primary |
| 6617 | +@@ -735,38 +586,6 @@ PrimaryAccountChangeEvent::State Primary |
6605 | 6618 | void PrimaryAccountManager::ComputeExplicitBrowserSignin(
|
6606 | 6619 | const PrimaryAccountChangeEvent& event_details,
|
6607 | 6620 | ScopedPrefCommit& scoped_pref_commit) {
|
|
6640 | 6653 | }
|
6641 | 6654 |
|
6642 | 6655 | void PrimaryAccountManager::FirePrimaryAccountChanged(
|
6643 |
| -@@ -850,7 +670,6 @@ void PrimaryAccountManager::OnSigninAllo |
| 6656 | +@@ -850,7 +669,6 @@ void PrimaryAccountManager::OnSigninAllo |
6644 | 6657 | bool PrimaryAccountManager::ShouldSigninAllowedPrefAffectPrimaryAccount(
|
6645 | 6658 | bool is_sync_consent) {
|
6646 | 6659 | return switches::IsExplicitBrowserSigninUIOnDesktopEnabled() &&
|
|
0 commit comments