[profiles] Delete unused experimental code for signin interception
These features were enabled with the default parameters:
* Delete the base::Feature
* Delete the chrome flags and description
* Remove the logic to suppress the profile switch, and delete the pref
* Remove _V2 and _V3 versions of the strings and use the _V1
Bug: 1166793
Change-Id: I13da2c3658b5f91f033f6be1f5d778a45afd0d9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3017997
Auto-Submit: David Roger <[email protected]>
Reviewed-by: Alex Ilin <[email protected]>
Commit-Queue: David Roger <[email protected]>
Cr-Commit-Position: refs/heads/master@{#900463}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 4312f60..b5e4a4d2 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -6521,13 +6521,6 @@
flag_descriptions::kPermissionQuietChipDescription, kOsDesktop,
FEATURE_VALUE_TYPE(permissions::features::kPermissionQuietChip)},
-#if BUILDFLAG(ENABLE_DICE_SUPPORT)
- {"dice-web-signin-interception",
- flag_descriptions::kDiceWebSigninInterceptionName,
- flag_descriptions::kDiceWebSigninInterceptionDescription,
- kOsMac | kOsWin | kOsLinux,
- FEATURE_VALUE_TYPE(kDiceWebSigninInterceptionFeature)},
-#endif // ENABLE_DICE_SUPPORT
{"canvas-2d-layers", flag_descriptions::kCanvas2DLayersName,
flag_descriptions::kCanvas2DLayersDescription, kOsAll,
SINGLE_VALUE_TYPE(switches::kEnableCanvas2DLayers)},
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
index e198f67..55d87e6 100644
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -1040,11 +1040,6 @@
"expiry_milestone": 99
},
{
- "name": "dice-web-signin-interception",
- "owners": [ "droger", "[email protected]" ],
- "expiry_milestone": 92
- },
- {
"name": "disable-accelerated-2d-canvas",
"owners": [ "fserb" ],
"expiry_milestone": -1
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index 919b4f7..fecc01c 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -5310,12 +5310,6 @@
"Adds image decoding support for the JPEG XL image format.";
#endif // BUILDFLAG(ENABLE_JXL_DECODER)
-#if BUILDFLAG(ENABLE_DICE_SUPPORT)
-const char kDiceWebSigninInterceptionName[] = "Dice Web-Signin Interception";
-const char kDiceWebSigninInterceptionDescription[] =
- "If enabled, Chrome may promote profile creation after signin on the web.";
-#endif
-
#if BUILDFLAG(ENABLE_NACL)
const char kNaclName[] = "Native Client";
const char kNaclDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
index a6a1e2d..9da2ec5 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -3091,11 +3091,6 @@
extern const char kEnableJXLDescription[];
#endif // BUILDFLAG(ENABLE_JXL_DECODER)
-#if BUILDFLAG(ENABLE_DICE_SUPPORT)
-extern const char kDiceWebSigninInterceptionName[];
-extern const char kDiceWebSigninInterceptionDescription[];
-#endif // ENABLE_DICE_SUPPORT
-
#if BUILDFLAG(ENABLE_NACL)
extern const char kNaclName[];
extern const char kNaclDescription[];
diff --git a/chrome/browser/password_manager/multi_profile_credentials_filter.cc b/chrome/browser/password_manager/multi_profile_credentials_filter.cc
index be31eec..79877450 100644
--- a/chrome/browser/password_manager/multi_profile_credentials_filter.cc
+++ b/chrome/browser/password_manager/multi_profile_credentials_filter.cc
@@ -4,10 +4,8 @@
#include "chrome/browser/password_manager/multi_profile_credentials_filter.h"
-#include "base/feature_list.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/signin/dice_web_signin_interceptor.h"
-#include "chrome/browser/signin/signin_features.h"
#include "components/password_manager/core/browser/password_sync_util.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
@@ -28,8 +26,6 @@
return true; // This happens in incognito.
if (!password_manager::sync_util::IsGaiaCredentialPage(form.signon_realm))
return true;
- if (!base::FeatureList::IsEnabled(kDiceWebSigninInterceptionFeature))
- return true;
// Note: this function is only called for "Save" bubbles, but not for "Update"
// bubbles.
diff --git a/chrome/browser/password_manager/multi_profile_credentials_filter_unittest.cc b/chrome/browser/password_manager/multi_profile_credentials_filter_unittest.cc
index 7d0e7cd6..2f2df4d 100644
--- a/chrome/browser/password_manager/multi_profile_credentials_filter_unittest.cc
+++ b/chrome/browser/password_manager/multi_profile_credentials_filter_unittest.cc
@@ -9,7 +9,6 @@
#include "base/bind.h"
#include "base/callback.h"
#include "base/callback_helpers.h"
-#include "base/test/scoped_feature_list.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile_attributes_entry.h"
#include "chrome/browser/profiles/profile_attributes_storage.h"
@@ -17,7 +16,6 @@
#include "chrome/browser/signin/chrome_signin_client_test_util.h"
#include "chrome/browser/signin/dice_web_signin_interceptor.h"
#include "chrome/browser/signin/identity_test_environment_profile_adaptor.h"
-#include "chrome/browser/signin/signin_features.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/browser_with_test_window_test.h"
@@ -74,7 +72,6 @@
public:
MultiProfileCredentialsFilterTest()
: sync_filter_(&test_password_manager_client_, GetSyncServiceCallback()) {
- feature_list_.InitAndEnableFeature(kDiceWebSigninInterceptionFeature);
}
password_manager::SyncCredentialsFilter::SyncServiceFactoryFunction
@@ -151,7 +148,6 @@
protected:
const syncer::SyncService* sync_service() { return &sync_service_; }
- base::test::ScopedFeatureList feature_list_;
network::TestURLLoaderFactory test_url_loader_factory_;
TestPasswordManagerClient test_password_manager_client_;
std::unique_ptr<IdentityTestEnvironmentProfileAdaptor>
diff --git a/chrome/browser/password_manager/password_manager_signin_intercept_test_helper.cc b/chrome/browser/password_manager/password_manager_signin_intercept_test_helper.cc
index 51438b8..5492d309 100644
--- a/chrome/browser/password_manager/password_manager_signin_intercept_test_helper.cc
+++ b/chrome/browser/password_manager/password_manager_signin_intercept_test_helper.cc
@@ -15,7 +15,6 @@
#include "chrome/browser/signin/dice_web_signin_interceptor.h"
#include "chrome/browser/signin/dice_web_signin_interceptor_factory.h"
#include "chrome/browser/signin/identity_manager_factory.h"
-#include "chrome/browser/signin/signin_features.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/common/pref_names.h"
@@ -46,7 +45,6 @@
PasswordManagerSigninInterceptTestHelper(
net::test_server::EmbeddedTestServer* https_test_server)
: https_test_server_(https_test_server) {
- feature_list_.InitAndEnableFeature(kDiceWebSigninInterceptionFeature);
}
PasswordManagerSigninInterceptTestHelper::
diff --git a/chrome/browser/password_manager/password_manager_signin_intercept_test_helper.h b/chrome/browser/password_manager/password_manager_signin_intercept_test_helper.h
index ed64dee..86e7b8bc 100644
--- a/chrome/browser/password_manager/password_manager_signin_intercept_test_helper.h
+++ b/chrome/browser/password_manager/password_manager_signin_intercept_test_helper.h
@@ -8,7 +8,6 @@
#include <string>
#include "base/memory/scoped_refptr.h"
-#include "base/test/scoped_feature_list.h"
#include "components/password_manager/core/browser/test_password_store.h"
#include "google_apis/gaia/core_account_id.h"
@@ -63,7 +62,6 @@
std::string gaia_id() const;
private:
- base::test::ScopedFeatureList feature_list_;
const net::test_server::EmbeddedTestServer* https_test_server_;
};
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 0266019..7686eabe 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -141,6 +141,7 @@
#include "components/security_interstitials/content/stateful_ssl_host_state_delegate.h"
#include "components/segmentation_platform/public/segmentation_platform_service.h"
#include "components/sessions/core/session_id_generator.h"
+#include "components/signin/public/base/signin_buildflags.h"
#include "components/signin/public/identity_manager/identity_manager.h"
#include "components/site_engagement/content/site_engagement_service.h"
#include "components/subresource_filter/content/browser/ruleset_service.h"
@@ -619,14 +620,16 @@
#if defined(OS_MAC)
const char kPasswordRecovery[] = "password_manager.password_recovery";
#endif
-
-// Deprecated 07/2021.
const char kWasSignInPasswordPromoClicked[] =
"profile.was_sign_in_password_promo_clicked";
const char kNumberSignInPasswordPromoShown[] =
"profile.number_sign_in_password_promo_shown";
const char kSignInPasswordPromoRevive[] =
"profile.sign_in_password_promo_revive";
+#if BUILDFLAG(ENABLE_DICE_SUPPORT)
+constexpr char kProfileSwitchInterceptionDeclinedPref[] =
+ "signin.ProfileSwitchInterceptionDeclinedPref";
+#endif
// Register local state used only for migration (clearing or moving to a new
// key).
@@ -800,6 +803,10 @@
registry->RegisterBooleanPref(kWasSignInPasswordPromoClicked, false);
registry->RegisterIntegerPref(kNumberSignInPasswordPromoShown, 0);
registry->RegisterBooleanPref(kSignInPasswordPromoRevive, false);
+
+#if BUILDFLAG(ENABLE_DICE_SUPPORT)
+ registry->RegisterDictionaryPref(kProfileSwitchInterceptionDeclinedPref);
+#endif
}
} // namespace
@@ -1572,11 +1579,12 @@
#if defined(OS_MAC)
profile_prefs->ClearPref(kPasswordRecovery);
#endif
-
- // Added 07/2021
profile_prefs->ClearPref(kWasSignInPasswordPromoClicked);
profile_prefs->ClearPref(kNumberSignInPasswordPromoShown);
profile_prefs->ClearPref(kSignInPasswordPromoRevive);
+#if BUILDFLAG(ENABLE_DICE_SUPPORT)
+ profile_prefs->ClearPref(kProfileSwitchInterceptionDeclinedPref);
+#endif
// Please don't delete the following line. It is used by PRESUBMIT.py.
// END_MIGRATE_OBSOLETE_PROFILE_PREFS
diff --git a/chrome/browser/signin/dice_web_signin_interceptor.cc b/chrome/browser/signin/dice_web_signin_interceptor.cc
index c82b404..f68f8d8 100644
--- a/chrome/browser/signin/dice_web_signin_interceptor.cc
+++ b/chrome/browser/signin/dice_web_signin_interceptor.cc
@@ -15,7 +15,6 @@
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
-#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/password_manager/chrome_password_manager_client.h"
#include "chrome/browser/policy/profile_policy_connector.h"
@@ -61,8 +60,6 @@
constexpr char kProfileCreationInterceptionDeclinedPref[] =
"signin.ProfileCreationInterceptionDeclinedPref";
-constexpr char kProfileSwitchInterceptionDeclinedPref[] =
- "signin.ProfileSwitchInterceptionDeclinedPref";
void RecordSigninInterceptionHeuristicOutcome(
SigninInterceptionHeuristicOutcome outcome) {
@@ -125,14 +122,11 @@
void DiceWebSigninInterceptor::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterDictionaryPref(kProfileCreationInterceptionDeclinedPref);
- registry->RegisterDictionaryPref(kProfileSwitchInterceptionDeclinedPref);
registry->RegisterBooleanPref(prefs::kSigninInterceptionEnabled, true);
-#if !defined(OS_ANDROID)
registry->RegisterStringPref(prefs::kManagedAccountsSigninRestriction,
std::string());
registry->RegisterBooleanPref(
prefs::kManagedAccountsSigninRestrictionScopeMachine, false);
-#endif
}
absl::optional<SigninInterceptionHeuristicOutcome>
@@ -170,10 +164,6 @@
email,
&g_browser_process->profile_manager()->GetProfileAttributesStorage());
if (switch_to_entry) {
- if (HasUserDeclinedProfileSwitch(email)) {
- return SigninInterceptionHeuristicOutcome::
- kAbortUserDeclinedProfileForAccount;
- }
if (entry)
*entry = switch_to_entry;
return SigninInterceptionHeuristicOutcome::kInterceptProfileSwitch;
@@ -208,9 +198,6 @@
CoreAccountId account_id,
bool is_new_account,
bool is_sync_signin) {
- if (!base::FeatureList::IsEnabled(kDiceWebSigninInterceptionFeature))
- return;
-
if (is_interception_in_progress_) {
// Multiple concurrent interceptions are not supported.
RecordSigninInterceptionHeuristicOutcome(
@@ -549,8 +536,6 @@
const base::FilePath& profile_path,
SigninInterceptionResult switch_profile) {
if (switch_profile != SigninInterceptionResult::kAccepted) {
- if (switch_profile == SigninInterceptionResult::kDeclined)
- RecordProfileSwitchDeclined(email);
Reset();
return;
}
@@ -694,31 +679,3 @@
return declined_count &&
declined_count.value() >= kMaxProfileCreationDeclinedCount;
}
-
-void DiceWebSigninInterceptor::RecordProfileSwitchDeclined(
- const std::string& email) {
- DictionaryPrefUpdate update(profile_->GetPrefs(),
- kProfileSwitchInterceptionDeclinedPref);
- std::string key = GetPersistentEmailHash(email);
- absl::optional<int> declined_count = update->FindIntKey(key);
- update->SetIntKey(key, declined_count.value_or(0) + 1);
-}
-
-bool DiceWebSigninInterceptor::HasUserDeclinedProfileSwitch(
- const std::string& email) const {
- const base::DictionaryValue* pref_data = profile_->GetPrefs()->GetDictionary(
- kProfileSwitchInterceptionDeclinedPref);
- absl::optional<int> declined_count =
- pref_data->FindIntKey(GetPersistentEmailHash(email));
-
- // The limit is controlled by an experiment. Zero value completely turns off
- // the profile switch bubble. Negative values mean there is no limit. By
- // default, there is no limit.
- int max_profile_switch_declined_count =
- base::GetFieldTrialParamByFeatureAsInt(
- kDiceWebSigninInterceptionFeature,
- "max_profile_switch_declined_count", -1);
-
- return max_profile_switch_declined_count >= 0 &&
- declined_count.value_or(0) >= max_profile_switch_declined_count;
-}
diff --git a/chrome/browser/signin/dice_web_signin_interceptor.h b/chrome/browser/signin/dice_web_signin_interceptor.h
index 1a6ad94..be8db648 100644
--- a/chrome/browser/signin/dice_web_signin_interceptor.h
+++ b/chrome/browser/signin/dice_web_signin_interceptor.h
@@ -322,23 +322,17 @@
// Returns a 8-bit hash of the email that can be persisted.
static std::string GetPersistentEmailHash(const std::string& email);
- // Should be called when the user declines profile creation or profile switch,
- // in order to remember their decision. This information is stored in prefs.
- // Only a hash of the email is saved, as Chrome does not need to store the
- // actual email, but only need to compare emails. The hash has low entropy to
- // ensure it cannot be reversed.
+ // Should be called when the user declines profile creation, in order to
+ // remember their decision. This information is stored in prefs. Only a hash
+ // of the email is saved, as Chrome does not need to store the actual email,
+ // but only need to compare emails. The hash has low entropy to ensure it
+ // cannot be reversed.
void RecordProfileCreationDeclined(const std::string& email);
- void RecordProfileSwitchDeclined(const std::string& email);
// Checks if the user previously declined 2 times creating a new profile for
// this account.
bool HasUserDeclinedProfileCreation(const std::string& email) const;
- // Checks if the user previously declined more than a threshold number of
- // times switching to a new profile for this account. The limit is set up
- // via an experiment parameter.
- bool HasUserDeclinedProfileSwitch(const std::string& email) const;
-
Profile* const profile_;
signin::IdentityManager* const identity_manager_;
std::unique_ptr<Delegate> delegate_;
diff --git a/chrome/browser/signin/dice_web_signin_interceptor_browsertest.cc b/chrome/browser/signin/dice_web_signin_interceptor_browsertest.cc
index c1011b3c..3fe1a23 100644
--- a/chrome/browser/signin/dice_web_signin_interceptor_browsertest.cc
+++ b/chrome/browser/signin/dice_web_signin_interceptor_browsertest.cc
@@ -224,8 +224,7 @@
class DiceWebSigninInterceptorBrowserTest : public InProcessBrowserTest {
public:
- DiceWebSigninInterceptorBrowserTest()
- : feature_list_(kDiceWebSigninInterceptionFeature) {}
+ DiceWebSigninInterceptorBrowserTest() = default;
Profile* profile() { return browser()->profile(); }
@@ -253,9 +252,6 @@
return interceptor_delegate;
}
- protected:
- base::test::ScopedFeatureList feature_list_;
-
private:
// InProcessBrowserTest:
void SetUpOnMainThread() override {
diff --git a/chrome/browser/signin/dice_web_signin_interceptor_unittest.cc b/chrome/browser/signin/dice_web_signin_interceptor_unittest.cc
index ebc4acd..3c5475dd 100644
--- a/chrome/browser/signin/dice_web_signin_interceptor_unittest.cc
+++ b/chrome/browser/signin/dice_web_signin_interceptor_unittest.cc
@@ -176,20 +176,9 @@
EXPECT_TRUE(interceptor()->is_interception_in_progress());
}
- protected:
- virtual void InitFeatures() {
- InitWithEnabledFeatures({kDiceWebSigninInterceptionFeature});
- }
-
- void InitWithEnabledFeatures(
- const std::vector<base::Feature>& enabled_features) {
- feature_list_.InitWithFeatures(enabled_features, {});
- }
-
private:
// testing::Test:
void SetUp() override {
- InitFeatures();
BrowserWithTestWindowTest::SetUp();
identity_test_env_profile_adaptor_ =
@@ -224,7 +213,6 @@
return factories;
}
- base::test::ScopedFeatureList feature_list_;
network::TestURLLoaderFactory test_url_loader_factory_;
std::unique_ptr<IdentityTestEnvironmentProfileAdaptor>
identity_test_env_profile_adaptor_;
@@ -385,11 +373,12 @@
}
class DiceWebSigninInterceptorReauthTest : public DiceWebSigninInterceptorTest {
- protected:
- void InitFeatures() override {
- InitWithEnabledFeatures(
- {kDiceWebSigninInterceptionFeature, kAccountPoliciesLoadedWithoutSync});
- }
+ public:
+ DiceWebSigninInterceptorReauthTest()
+ : feature_list_(kAccountPoliciesLoadedWithoutSync) {}
+
+ private:
+ base::test::ScopedFeatureList feature_list_;
};
TEST_F(DiceWebSigninInterceptorReauthTest,
@@ -790,110 +779,6 @@
}
}
-TEST_F(DiceWebSigninInterceptorTest,
- DeclineSwitchRepeatedly_LimitedByExperiment) {
- const int kMaxProfileSwitchDeclinedCount = 3;
- base::test::ScopedFeatureList feature_list;
- feature_list.InitAndEnableFeatureWithParameters(
- kDiceWebSigninInterceptionFeature,
- {{"max_profile_switch_declined_count",
- base::NumberToString(kMaxProfileSwitchDeclinedCount)}});
-
- base::HistogramTester histogram_tester;
- // Setup for profile switch interception.
- std::string email = "[email protected]";
- AccountInfo account_info = identity_test_env()->MakeAccountAvailable(email);
- Profile* profile_2 = CreateTestingProfile("Profile 2");
- ProfileAttributesEntry* entry =
- profile_attributes_storage()->GetProfileAttributesWithPath(
- profile_2->GetPath());
- ASSERT_NE(entry, nullptr);
- entry->SetAuthInfo(account_info.gaia, base::UTF8ToUTF16(email),
- /*is_consented_primary_account=*/false);
-
- // Decline the interception kMaxProfileSwitchDeclinedCount times.
- DiceWebSigninInterceptor::Delegate::BubbleParameters expected_parameters = {
- DiceWebSigninInterceptor::SigninInterceptionType::kProfileSwitch,
- account_info, AccountInfo(), SkColor()};
- for (int i = 0; i < kMaxProfileSwitchDeclinedCount; ++i) {
- EXPECT_CALL(*mock_delegate(),
- ShowSigninInterceptionBubble(
- web_contents(), MatchBubbleParameters(expected_parameters),
- testing::_))
- .WillOnce(testing::WithArg<2>(testing::Invoke(
- [](base::OnceCallback<void(SigninInterceptionResult)> callback) {
- std::move(callback).Run(SigninInterceptionResult::kDeclined);
- return nullptr;
- })));
- MaybeIntercept(account_info.account_id);
- EXPECT_EQ(interceptor()->is_interception_in_progress(), false);
- histogram_tester.ExpectUniqueSample(
- "Signin.Intercept.HeuristicOutcome",
- SigninInterceptionHeuristicOutcome::kInterceptProfileSwitch, i + 1);
- }
-
- // Next time the interception is not shown again.
- MaybeIntercept(account_info.account_id);
- EXPECT_EQ(interceptor()->is_interception_in_progress(), false);
- histogram_tester.ExpectBucketCount(
- "Signin.Intercept.HeuristicOutcome",
- SigninInterceptionHeuristicOutcome::kAbortUserDeclinedProfileForAccount,
- 1);
-
- // Another account can still be intercepted.
- account_info.email = "[email protected]";
- identity_test_env()->UpdateAccountInfoForAccount(account_info);
- Profile* profile_3 = CreateTestingProfile("Profile 3");
- ProfileAttributesEntry* entry_2 =
- profile_attributes_storage()->GetProfileAttributesWithPath(
- profile_3->GetPath());
- ASSERT_NE(entry_2, nullptr);
- entry_2->SetAuthInfo(account_info.gaia, base::UTF8ToUTF16(account_info.email),
- /*is_consented_primary_account=*/false);
-
- expected_parameters = {
- DiceWebSigninInterceptor::SigninInterceptionType::kProfileSwitch,
- account_info, AccountInfo(), SkColor()};
- EXPECT_CALL(*mock_delegate(),
- ShowSigninInterceptionBubble(
- web_contents(), MatchBubbleParameters(expected_parameters),
- testing::_));
- MaybeIntercept(account_info.account_id);
- histogram_tester.ExpectBucketCount(
- "Signin.Intercept.HeuristicOutcome",
- SigninInterceptionHeuristicOutcome::kInterceptProfileSwitch,
- kMaxProfileSwitchDeclinedCount + 1);
- EXPECT_EQ(interceptor()->is_interception_in_progress(), true);
-}
-
-TEST_F(DiceWebSigninInterceptorTest,
- DeclineSwitchRepeatedly_DisabledByExperiment) {
- base::test::ScopedFeatureList feature_list;
- feature_list.InitAndEnableFeatureWithParameters(
- kDiceWebSigninInterceptionFeature,
- {{"max_profile_switch_declined_count", "0"}});
-
- base::HistogramTester histogram_tester;
- // Setup for profile switch interception.
- std::string email = "[email protected]";
- AccountInfo account_info = identity_test_env()->MakeAccountAvailable(email);
- Profile* profile_2 = CreateTestingProfile("Profile 2");
- ProfileAttributesEntry* entry =
- profile_attributes_storage()->GetProfileAttributesWithPath(
- profile_2->GetPath());
- ASSERT_NE(entry, nullptr);
- entry->SetAuthInfo(account_info.gaia, base::UTF8ToUTF16(email),
- /*is_consented_primary_account=*/false);
-
- // The interception is not shown even at first attempt.
- MaybeIntercept(account_info.account_id);
- EXPECT_EQ(interceptor()->is_interception_in_progress(), false);
- histogram_tester.ExpectBucketCount(
- "Signin.Intercept.HeuristicOutcome",
- SigninInterceptionHeuristicOutcome::kAbortUserDeclinedProfileForAccount,
- 1);
-}
-
TEST_F(DiceWebSigninInterceptorTest, PersistentHash) {
// The hash is persistent (the value should never change).
EXPECT_EQ("email_174",
diff --git a/chrome/browser/signin/signin_features.cc b/chrome/browser/signin/signin_features.cc
index f31e4ae..f1be00be 100644
--- a/chrome/browser/signin/signin_features.cc
+++ b/chrome/browser/signin/signin_features.cc
@@ -4,11 +4,6 @@
#include "chrome/browser/signin/signin_features.h"
-#if BUILDFLAG(ENABLE_DICE_SUPPORT)
-const base::Feature kDiceWebSigninInterceptionFeature{
- "DiceWebSigninInterception", base::FEATURE_ENABLED_BY_DEFAULT};
-#endif // ENABLE_DICE_SUPPORT
-
// Enables the client-side processing of the HTTP response header
// Google-Accounts-RemoveLocalAccount.
const base::Feature kProcessGaiaRemoveLocalAccountHeader{
diff --git a/chrome/browser/signin/signin_features.h b/chrome/browser/signin/signin_features.h
index b27cf7d..311e4040 100644
--- a/chrome/browser/signin/signin_features.h
+++ b/chrome/browser/signin/signin_features.h
@@ -6,11 +6,6 @@
#define CHROME_BROWSER_SIGNIN_SIGNIN_FEATURES_H_
#include "base/feature_list.h"
-#include "components/signin/public/base/signin_buildflags.h"
-
-#if BUILDFLAG(ENABLE_DICE_SUPPORT)
-extern const base::Feature kDiceWebSigninInterceptionFeature;
-#endif // ENABLE_DICE_SUPPORT
extern const base::Feature kProcessGaiaRemoveLocalAccountHeader;
diff --git a/chrome/browser/ui/webui/signin/dice_web_signin_intercept_handler.cc b/chrome/browser/ui/webui/signin/dice_web_signin_intercept_handler.cc
index b0811a5..0d7d8eb 100644
--- a/chrome/browser/ui/webui/signin/dice_web_signin_intercept_handler.cc
+++ b/chrome/browser/ui/webui/signin/dice_web_signin_intercept_handler.cc
@@ -15,7 +15,6 @@
#include "chrome/browser/profiles/profile_avatar_icon_util.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/signin/identity_manager_factory.h"
-#include "chrome/browser/signin/signin_features.h"
#include "chrome/browser/ui/signin/profile_colors_util.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
@@ -228,33 +227,8 @@
return l10n_util::GetStringUTF8(
IDS_SIGNIN_DICE_WEB_INTERCEPT_SWITCH_BUBBLE_TITLE);
}
-
- // For profile creations, the title is controlled by an experiment. Expected
- // values for the parameter are 1, 2 or 3.
- // The version 3 is specific to the "consumer" bubble and is not supported by
- // the enterprise bubble (which defaults to version 1 in that case).
- int string_version = base::GetFieldTrialParamByFeatureAsInt(
- kDiceWebSigninInterceptionFeature, "title_version",
- /*default_value=*/1);
-
- int string_id = IDS_SIGNIN_DICE_WEB_INTERCEPT_CREATE_BUBBLE_TITLE_V1;
- switch (string_version) {
- case 2:
- string_id = IDS_SIGNIN_DICE_WEB_INTERCEPT_CREATE_BUBBLE_TITLE_V2;
- break;
- case 3:
- // Only use version 3 for consumer bubble.
- if (bubble_parameters_.interception_type ==
- DiceWebSigninInterceptor::SigninInterceptionType::kMultiUser) {
- string_id = IDS_SIGNIN_DICE_WEB_INTERCEPT_CREATE_BUBBLE_TITLE_V3;
- }
- break;
- default:
- // For default or invalid parameters, there is nothing to do.
- break;
- }
-
- return l10n_util::GetStringUTF8(string_id);
+ return l10n_util::GetStringUTF8(
+ IDS_SIGNIN_DICE_WEB_INTERCEPT_CREATE_BUBBLE_TITLE);
}
std::string DiceWebSigninInterceptHandler::GetBodyText() {