Commit 23628a6f authored by Mihai Sardarescu's avatar Mihai Sardarescu Committed by Commit Bot

Remove unnecessary ScopedAccountConsistencyDice.

This CL removes a few unnecessary usages of ScopedAccountConsistencyDice.

Change-Id: I756d99f16dacd05e348bb46578851fd193600d97
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1899870Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Commit-Queue: Mihai Sardarescu <msarda@chromium.org>
Cr-Commit-Position: refs/heads/master@{#713426}
parent 07098d98
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/signin/account_reconcilor_factory.h" #include "chrome/browser/signin/account_reconcilor_factory.h"
#include "chrome/browser/signin/identity_manager_factory.h" #include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/signin/scoped_account_consistency.h"
#include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
...@@ -587,9 +586,6 @@ class DiceBrowsingDataRemoverBrowserTest ...@@ -587,9 +586,6 @@ class DiceBrowsingDataRemoverBrowserTest
identity_manager->HasAccountWithRefreshToken(account_info.account_id)); identity_manager->HasAccountWithRefreshToken(account_info.account_id));
return account_info; return account_info;
} }
private:
ScopedAccountConsistencyDice dice_;
}; };
#endif #endif
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "chrome/browser/profiles/profile_attributes_storage.h" #include "chrome/browser/profiles/profile_attributes_storage.h"
#include "chrome/browser/signin/identity_manager_factory.h" #include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/signin/identity_test_environment_profile_adaptor.h" #include "chrome/browser/signin/identity_test_environment_profile_adaptor.h"
#include "chrome/browser/signin/scoped_account_consistency.h"
#include "chrome/browser/signin/signin_promo.h" #include "chrome/browser/signin/signin_promo.h"
#include "chrome/browser/ui/ui_features.h" #include "chrome/browser/ui/ui_features.h"
#include "chrome/test/base/browser_with_test_window_test.h" #include "chrome/test/base/browser_with_test_window_test.h"
...@@ -264,7 +263,6 @@ class DiceSigninUiUtilTest : public BrowserWithTestWindowTest { ...@@ -264,7 +263,6 @@ class DiceSigninUiUtilTest : public BrowserWithTestWindowTest {
} }
} }
const ScopedAccountConsistencyDice scoped_account_consistency_;
signin_metrics::AccessPoint access_point_ = signin_metrics::AccessPoint access_point_ =
signin_metrics::AccessPoint::ACCESS_POINT_BOOKMARK_BUBBLE; signin_metrics::AccessPoint::ACCESS_POINT_BOOKMARK_BUBBLE;
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include "chrome/browser/profiles/profile_metrics.h" #include "chrome/browser/profiles/profile_metrics.h"
#include "chrome/browser/profiles/profiles_state.h" #include "chrome/browser/profiles/profiles_state.h"
#include "chrome/browser/signin/identity_manager_factory.h" #include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/signin/scoped_account_consistency.h"
#include "chrome/browser/sync/profile_sync_service_factory.h" #include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
#include "chrome/browser/sync/test/integration/secondary_account_helper.h" #include "chrome/browser/sync/test/integration/secondary_account_helper.h"
...@@ -526,20 +525,9 @@ IN_PROC_BROWSER_TEST_P(ProfileMenuViewExtensionsParamTest, InvokeUi_Guest) { ...@@ -526,20 +525,9 @@ IN_PROC_BROWSER_TEST_P(ProfileMenuViewExtensionsParamTest, InvokeUi_Guest) {
ShowAndVerifyUi(); ShowAndVerifyUi();
} }
class ProfileMenuViewExtensionsParamTestWithScopedAccountConsistency
: public ProfileMenuViewExtensionsParamTest {
public:
ProfileMenuViewExtensionsParamTestWithScopedAccountConsistency() = default;
private:
ScopedAccountConsistencyDice scoped_dice_;
};
// Shows the |ProfileMenuView| during a Guest browsing session when the DICE // Shows the |ProfileMenuView| during a Guest browsing session when the DICE
// flag is enabled. // flag is enabled.
IN_PROC_BROWSER_TEST_P( IN_PROC_BROWSER_TEST_P(ProfileMenuViewExtensionsParamTest, InvokeUi_DiceGuest) {
ProfileMenuViewExtensionsParamTestWithScopedAccountConsistency,
InvokeUi_DiceGuest) {
ShowAndVerifyUi(); ShowAndVerifyUi();
} }
...@@ -564,20 +552,10 @@ IN_PROC_BROWSER_TEST_P(ProfileMenuViewExtensionsParamTest, ...@@ -564,20 +552,10 @@ IN_PROC_BROWSER_TEST_P(ProfileMenuViewExtensionsParamTest,
ShowAndVerifyUi(); ShowAndVerifyUi();
} }
class ProfileMenuViewExtensionsTestWithScopedAccountConsistency
: public ProfileMenuViewExtensionsTest {
public:
ProfileMenuViewExtensionsTestWithScopedAccountConsistency() = default;
private:
ScopedAccountConsistencyDice scoped_dice_;
};
// Open the profile chooser to increment the Dice sign-in promo show counter // Open the profile chooser to increment the Dice sign-in promo show counter
// below the threshold. // below the threshold.
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(ProfileMenuViewExtensionsTest,
ProfileMenuViewExtensionsTestWithScopedAccountConsistency, IncrementDiceSigninPromoShowCounter) {
IncrementDiceSigninPromoShowCounter) {
browser()->profile()->GetPrefs()->SetInteger( browser()->profile()->GetPrefs()->SetInteger(
prefs::kDiceSigninUserMenuPromoCount, 7); prefs::kDiceSigninUserMenuPromoCount, 7);
ASSERT_NO_FATAL_FAILURE(OpenProfileMenuView(browser())); ASSERT_NO_FATAL_FAILURE(OpenProfileMenuView(browser()));
...@@ -586,9 +564,8 @@ IN_PROC_BROWSER_TEST_F( ...@@ -586,9 +564,8 @@ IN_PROC_BROWSER_TEST_F(
// The DICE sync illustration is shown only the first 10 times. This test // The DICE sync illustration is shown only the first 10 times. This test
// ensures that the profile chooser is shown correctly above this threshold. // ensures that the profile chooser is shown correctly above this threshold.
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(ProfileMenuViewExtensionsTest,
ProfileMenuViewExtensionsTestWithScopedAccountConsistency, DiceSigninPromoWithoutIllustration) {
DiceSigninPromoWithoutIllustration) {
browser()->profile()->GetPrefs()->SetInteger( browser()->profile()->GetPrefs()->SetInteger(
prefs::kDiceSigninUserMenuPromoCount, 10); prefs::kDiceSigninUserMenuPromoCount, 10);
ASSERT_NO_FATAL_FAILURE(OpenProfileMenuView(browser())); ASSERT_NO_FATAL_FAILURE(OpenProfileMenuView(browser()));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment