Commit 11c97852 authored by Monica Basta's avatar Monica Basta Committed by Commit Bot

[Signin]: Do not clear |kProfileUsingDefaultName| on signin events.

Remove code for clearing |prefs::kProfileUsingDefaultName| on
sign in/sign out events.

Bug: 1012182
Change-Id: I1dd916c059ace7f91d48b7bec1f1f92df8030ab0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1871552Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Commit-Queue: Monica Basta <msalama@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707775}
parent b4ca49f1
......@@ -63,7 +63,6 @@ void SigninProfileAttributesUpdater::UpdateProfileAttributes() {
!gaia::AreEmailsSame(account_info.email,
base::UTF16ToUTF8(entry->GetUserName()))) {
// Reset prefs. Note: this will also update the |ProfileAttributesEntry|.
prefs_->ClearPref(prefs::kProfileUsingDefaultName);
prefs_->ClearPref(prefs::kProfileUsingDefaultAvatar);
prefs_->ClearPref(prefs::kProfileUsingGAIAAvatar);
}
......
......@@ -28,20 +28,17 @@ const char kEmail[] = "example@email.com";
#if !defined(OS_CHROMEOS)
void CheckProfilePrefsReset(PrefService* pref_service) {
EXPECT_TRUE(pref_service->GetBoolean(prefs::kProfileUsingDefaultName));
EXPECT_TRUE(pref_service->GetBoolean(prefs::kProfileUsingDefaultAvatar));
EXPECT_FALSE(pref_service->GetBoolean(prefs::kProfileUsingGAIAAvatar));
}
void CheckProfilePrefsSet(PrefService* pref_service) {
EXPECT_FALSE(pref_service->GetBoolean(prefs::kProfileUsingDefaultName));
EXPECT_FALSE(pref_service->GetBoolean(prefs::kProfileUsingDefaultAvatar));
EXPECT_TRUE(pref_service->GetBoolean(prefs::kProfileUsingGAIAAvatar));
}
// Set the prefs to nondefault values.
void SetProfilePrefs(PrefService* pref_service) {
pref_service->SetBoolean(prefs::kProfileUsingDefaultName, false);
pref_service->SetBoolean(prefs::kProfileUsingDefaultAvatar, false);
pref_service->SetBoolean(prefs::kProfileUsingGAIAAvatar, true);
CheckProfilePrefsSet(pref_service);
......
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