Commit 22d089da authored by Kush Sinha's avatar Kush Sinha Committed by Commit Bot

Fix Active Directory reconcilor delegate's creation

Active Directory's account reconcilor currently gets instantiated for
all Active Directory enrolled devices for which Chrome OS Account
Manager has been turned on. But we have a pending bug
(https://crbug.com/1008349) which makes the usage of Chrome OS Account
Manager on Active Directory devices a bit buggy.

Fix the initialization condition to check whether Chrome OS Account
Manager is available for the session, instead of checking for the flag.

Bug: 1008349, 993317, 1009960
Change-Id: I50725523a8315ae07ae6ce04cbc30414cd7cca1a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1832268
Commit-Queue: Kush Sinha <sinhak@chromium.org>
Reviewed-by: default avatarBoris Sazonov <bsazonov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#701547}
parent 8d24de75
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "base/metrics/histogram_macros.h" #include "base/metrics/histogram_macros.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "chrome/browser/chromeos/account_manager/account_manager_migrator.h" #include "chrome/browser/chromeos/account_manager/account_manager_migrator.h"
#include "chrome/browser/chromeos/account_manager/account_manager_util.h"
#include "chrome/browser/chromeos/account_manager/account_migration_runner.h" #include "chrome/browser/chromeos/account_manager/account_migration_runner.h"
#include "chrome/browser/lifetime/application_lifetime.h" #include "chrome/browser/lifetime/application_lifetime.h"
#include "chromeos/constants/chromeos_features.h" #include "chromeos/constants/chromeos_features.h"
...@@ -171,7 +172,10 @@ AccountReconcilorFactory::CreateAccountReconcilorDelegate(Profile* profile) { ...@@ -171,7 +172,10 @@ AccountReconcilorFactory::CreateAccountReconcilorDelegate(Profile* profile) {
} }
// Only for Active Directory accounts on Chrome OS. // Only for Active Directory accounts on Chrome OS.
if (chromeos::features::IsAccountManagerEnabled() && // TODO(https://crbug.com/993317): Remove the check for
// |IsAccountManagerAvailable| after fixing https://crbug.com/1008349 and
// https://crbug.com/993317.
if (chromeos::IsAccountManagerAvailable(profile) &&
chromeos::InstallAttributes::Get()->IsActiveDirectoryManaged()) { chromeos::InstallAttributes::Get()->IsActiveDirectoryManaged()) {
return std::make_unique< return std::make_unique<
signin::ActiveDirectoryAccountReconcilorDelegate>(); signin::ActiveDirectoryAccountReconcilorDelegate>();
......
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