| Index: chrome/browser/chromeos/arc/arc_auth_service.cc
|
| diff --git a/chrome/browser/chromeos/arc/arc_auth_service.cc b/chrome/browser/chromeos/arc/arc_auth_service.cc
|
| index 195c2ec539f8acfed17bb503d7c755283d6afb8b..b765ba6573cb5089d4248811087ed757671c2011 100644
|
| --- a/chrome/browser/chromeos/arc/arc_auth_service.cc
|
| +++ b/chrome/browser/chromeos/arc/arc_auth_service.cc
|
| @@ -20,7 +20,6 @@
|
| #include "chromeos/chromeos_switches.h"
|
| #include "components/arc/arc_bridge_service.h"
|
| #include "components/arc/arc_features.h"
|
| -#include "components/arc/arc_util.h"
|
| #include "content/public/browser/browser_thread.h"
|
|
|
| namespace arc {
|
| @@ -61,8 +60,9 @@
|
| }
|
|
|
| mojom::ChromeAccountType GetAccountType() {
|
| - return IsArcKioskMode() ? mojom::ChromeAccountType::ROBOT_ACCOUNT
|
| - : mojom::ChromeAccountType::USER_ACCOUNT;
|
| + return ArcSessionManager::IsArcKioskMode()
|
| + ? mojom::ChromeAccountType::ROBOT_ACCOUNT
|
| + : mojom::ChromeAccountType::USER_ACCOUNT;
|
| }
|
|
|
| } // namespace
|
| @@ -188,7 +188,7 @@
|
| const GetAuthCodeDeprecatedCallback& callback) {
|
| // For robot account we must use RequestAccountInfo because it allows
|
| // to specify account type.
|
| - DCHECK(!IsArcKioskMode());
|
| + DCHECK(!ArcSessionManager::IsArcKioskMode());
|
| RequestAccountInfoInternal(
|
| base::MakeUnique<ArcAuthService::AccountInfoNotifier>(callback));
|
| }
|
| @@ -213,7 +213,7 @@
|
| DCHECK(!notifier_);
|
| DCHECK(!fetcher_);
|
|
|
| - if (IsArcOptInVerificationDisabled()) {
|
| + if (ArcSessionManager::IsOptInVerificationDisabled()) {
|
| notifier->Notify(
|
| false /* = is_enforced */, std::string(), GetAccountType(),
|
| policy_util::IsAccountManaged(ArcSessionManager::Get()->profile()));
|
| @@ -223,7 +223,7 @@
|
| // Hereafter asynchronous operation. Remember the notifier.
|
| notifier_ = std::move(notifier);
|
|
|
| - if (IsArcKioskMode()) {
|
| + if (ArcSessionManager::IsArcKioskMode()) {
|
| // In Kiosk mode, use Robot auth code fetching.
|
| fetcher_ = base::MakeUnique<ArcRobotAuthCodeFetcher>();
|
| } else if (base::FeatureList::IsEnabled(arc::kArcUseAuthEndpointFeature)) {
|
| @@ -237,7 +237,7 @@
|
| UpdateSilentAuthCodeUMA(OptInSilentAuthCode::DISABLED);
|
| // Otherwise, show LSO page and let user click "Sign in" button.
|
| // Here, support_host should be available always. The case support_host is
|
| - // not created is when 1) IsArcOptInVerificationDisabled() is true or 2)
|
| + // not created is when 1) IsOptInVerificationDisabled() is true or 2)
|
| // IsArcKioskMode() is true. Both cases are handled above.
|
| fetcher_ = base::MakeUnique<ArcManualAuthCodeFetcher>(
|
| ArcSessionManager::Get()->auth_context(),
|
| @@ -258,7 +258,8 @@
|
| }
|
|
|
| notifier_->Notify(
|
| - !IsArcOptInVerificationDisabled(), auth_code, GetAccountType(),
|
| + !ArcSessionManager::IsOptInVerificationDisabled(), auth_code,
|
| + GetAccountType(),
|
| policy_util::IsAccountManaged(ArcSessionManager::Get()->profile()));
|
| notifier_.reset();
|
| }
|
|
|