Commit ce66e015 authored by Mario Sanchez Prada's avatar Mario Sanchez Prada Committed by Commit Bot

Convert CustodianProfileDownloaderService to the Identity service

Migrate usage of SigninManagerBase::IsAuthenticated() to the
IdentityManager's API.

Bug: 903882
Change-Id: Ib452442d5eff692eed54c7c690845005c9b1717c
Reviewed-on: https://chromium-review.googlesource.com/c/1331399Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Mario Sanchez Prada <mario@igalia.com>
Cr-Commit-Position: refs/heads/master@{#607521}
parent 82320bd1
......@@ -5,11 +5,11 @@
#include "chrome/browser/supervised_user/legacy/custodian_profile_downloader_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/common/pref_names.h"
#include "components/prefs/pref_service.h"
#include "components/signin/core/browser/signin_manager.h"
#include "google_apis/gaia/gaia_auth_util.h"
#include "services/identity/public/cpp/identity_manager.h"
CustodianProfileDownloaderService::CustodianProfileDownloaderService(
Profile* custodian_profile)
......@@ -25,8 +25,8 @@ void CustodianProfileDownloaderService::Shutdown() {
void CustodianProfileDownloaderService::DownloadProfile(
const DownloadProfileCallback& callback) {
// The user must be logged in.
if (!SigninManagerFactory::GetForProfile(custodian_profile_)
->IsAuthenticated()) {
if (!IdentityManagerFactory::GetForProfile(custodian_profile_)
->HasPrimaryAccount()) {
return;
}
......
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