Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3885)

Unified Diff: chrome/browser/chromeos/arc/arc_auth_service.cc

Issue 2642783003: Move more utility functions to arc_util. (Closed)
Patch Set: address comments Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/BUILD.gn ('k') | chrome/browser/chromeos/arc/arc_session_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b765ba6573cb5089d4248811087ed757671c2011..195c2ec539f8acfed17bb503d7c755283d6afb8b 100644
--- a/chrome/browser/chromeos/arc/arc_auth_service.cc
+++ b/chrome/browser/chromeos/arc/arc_auth_service.cc
@@ -20,6 +20,7 @@
#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 {
@@ -60,9 +61,8 @@ ProvisioningResult ConvertArcSignInFailureReasonToProvisioningResult(
}
mojom::ChromeAccountType GetAccountType() {
- return ArcSessionManager::IsArcKioskMode()
- ? mojom::ChromeAccountType::ROBOT_ACCOUNT
- : mojom::ChromeAccountType::USER_ACCOUNT;
+ return IsArcKioskMode() ? mojom::ChromeAccountType::ROBOT_ACCOUNT
+ : mojom::ChromeAccountType::USER_ACCOUNT;
}
} // namespace
@@ -188,7 +188,7 @@ void ArcAuthService::GetAuthCodeDeprecated(
const GetAuthCodeDeprecatedCallback& callback) {
// For robot account we must use RequestAccountInfo because it allows
// to specify account type.
- DCHECK(!ArcSessionManager::IsArcKioskMode());
+ DCHECK(!IsArcKioskMode());
RequestAccountInfoInternal(
base::MakeUnique<ArcAuthService::AccountInfoNotifier>(callback));
}
@@ -213,7 +213,7 @@ void ArcAuthService::RequestAccountInfoInternal(
DCHECK(!notifier_);
DCHECK(!fetcher_);
- if (ArcSessionManager::IsOptInVerificationDisabled()) {
+ if (IsArcOptInVerificationDisabled()) {
notifier->Notify(
false /* = is_enforced */, std::string(), GetAccountType(),
policy_util::IsAccountManaged(ArcSessionManager::Get()->profile()));
@@ -223,7 +223,7 @@ void ArcAuthService::RequestAccountInfoInternal(
// Hereafter asynchronous operation. Remember the notifier.
notifier_ = std::move(notifier);
- if (ArcSessionManager::IsArcKioskMode()) {
+ if (IsArcKioskMode()) {
// In Kiosk mode, use Robot auth code fetching.
fetcher_ = base::MakeUnique<ArcRobotAuthCodeFetcher>();
} else if (base::FeatureList::IsEnabled(arc::kArcUseAuthEndpointFeature)) {
@@ -237,7 +237,7 @@ void ArcAuthService::RequestAccountInfoInternal(
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) IsOptInVerificationDisabled() is true or 2)
+ // not created is when 1) IsArcOptInVerificationDisabled() is true or 2)
// IsArcKioskMode() is true. Both cases are handled above.
fetcher_ = base::MakeUnique<ArcManualAuthCodeFetcher>(
ArcSessionManager::Get()->auth_context(),
@@ -258,8 +258,7 @@ void ArcAuthService::OnAuthCodeFetched(const std::string& auth_code) {
}
notifier_->Notify(
- !ArcSessionManager::IsOptInVerificationDisabled(), auth_code,
- GetAccountType(),
+ !IsArcOptInVerificationDisabled(), auth_code, GetAccountType(),
policy_util::IsAccountManaged(ArcSessionManager::Get()->profile()));
notifier_.reset();
}
« no previous file with comments | « chrome/browser/chromeos/BUILD.gn ('k') | chrome/browser/chromeos/arc/arc_session_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698