Commit 53078c4b authored by Owen Min's avatar Owen Min Committed by Commit Bot

Revert of "Sign out user if it's not sign in during profile loaded"

This is the revert of crrev.com/b77864ad
Turns out that fix causes crbug.com/775526.
In the mean time, revert won't re-trigger the crbug.com/759007 as it's
fixed by crrev.com/9990e87e.

Bug: 759007
Bug: 775526
Change-Id: I2cd5acefb3d8588613629a99dde592f648650a93
Reviewed-on: https://chromium-review.googlesource.com/757718Reviewed-by: default avataranthonyvd <anthonyvd@chromium.org>
Commit-Queue: Owen Min <zmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515211}
parent 2bea3cfc
......@@ -1584,12 +1584,16 @@ void ProfileManager::AddProfileToStorage(Profile* profile) {
bool has_entry = storage.GetProfileAttributesWithPath(profile->GetPath(),
&entry);
if (has_entry) {
#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
bool was_authenticated_status = entry->IsAuthenticated();
#endif
// The ProfileAttributesStorage's info must match the Signin Manager.
entry->SetAuthInfo(account_info.gaia, username);
#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
// Sign out if force-sign-in policy is enabled and profile is not signed
// in.
if (signin_util::IsForceSigninEnabled() && !entry->IsAuthenticated()) {
if (signin_util::IsForceSigninEnabled() && was_authenticated_status &&
!entry->IsAuthenticated()) {
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::BindOnce(&SignOut,
......
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