Commit c14e5428 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Revert "Convert startup_tab_provider.cc to IdentityManager"

This reverts commit ec18ec70.

Reason for revert: the conversion was incorrect as the new API
is not yet implemented. This probably causes regressions (sad
that no tests caught this) and spam logs (see crbug.com/909712).

Original change's description:
> Convert startup_tab_provider.cc to IdentityManager
> 
> It was using the SigninManager API to check whether the primary
> account was authenticated and an authentication was in progress. We
> can use the IdentityManager and PrimaryAccountMutator APIs to perform
> the same operations.
> 
> Bug: 890801
> Change-Id: Ia2567a567481a4d67b68eee6b714aab72c537b5a
> Reviewed-on: https://chromium-review.googlesource.com/c/1346467
> Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
> Reviewed-by: Colin Blundell <blundell@chromium.org>
> Commit-Queue: Sergio Villar <svillar@igalia.com>
> Cr-Commit-Position: refs/heads/master@{#610389}

TBR=ellyjones@chromium.org,blundell@chromium.org,svillar@igalia.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 890801
Change-Id: I8df5a79a40c503abd6dd74974a84eded8f69472a
Reviewed-on: https://chromium-review.googlesource.com/c/1353980Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611769}
parent 3f77735f
......@@ -8,7 +8,7 @@
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/profile_resetter/triggered_profile_resetter.h"
#include "chrome/browser/profile_resetter/triggered_profile_resetter_factory.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/signin/signin_util.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
......@@ -18,9 +18,8 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "components/prefs/pref_service.h"
#include "components/signin/core/browser/signin_manager.h"
#include "net/base/url_util.h"
#include "services/identity/public/cpp/identity_manager.h"
#include "services/identity/public/cpp/primary_account_mutator.h"
#if defined(OS_WIN)
#include "base/win/windows_version.h"
......@@ -74,13 +73,11 @@ StartupTabs StartupTabProviderImpl::GetOnboardingTabs(Profile* profile) const {
standard_params.has_seen_welcome_page =
prefs && prefs->GetBoolean(prefs::kHasSeenWelcomePage);
standard_params.is_signin_allowed = profile->IsSyncAllowed();
auto* identity_manager = IdentityManagerFactory::GetForProfile(profile);
SigninManager* signin_manager = SigninManagerFactory::GetForProfile(profile);
standard_params.is_signed_in =
identity_manager && identity_manager->HasPrimaryAccount();
signin_manager && signin_manager->IsAuthenticated();
standard_params.is_signin_in_progress =
identity_manager && identity_manager->GetPrimaryAccountMutator() &&
identity_manager->GetPrimaryAccountMutator()
->LegacyIsPrimaryAccountAuthInProgress();
signin_manager && signin_manager->AuthInProgress();
standard_params.is_supervised_user = profile->IsSupervised();
standard_params.is_force_signin_enabled = signin_util::IsForceSigninEnabled();
......
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