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

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

Issue 2926893002: arc: Start ARC for Public Session users.
Patch Set: Hide Play Store Created 3 years, 3 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 | « no previous file | chrome/browser/chromeos/arc/arc_util_unittest.cc » ('j') | components/arc/arc_util.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/arc_session_manager.cc
diff --git a/chrome/browser/chromeos/arc/arc_session_manager.cc b/chrome/browser/chromeos/arc/arc_session_manager.cc
index ccfc46344f193da489a3672c2aa0ecc0eac030cf..383a1142acf88cafd346776e0efc042349f0a8e7 100644
--- a/chrome/browser/chromeos/arc/arc_session_manager.cc
+++ b/chrome/browser/chromeos/arc/arc_session_manager.cc
@@ -247,7 +247,8 @@ void ArcSessionManager::OnProvisioningFinished(ProvisioningResult result) {
scoped_opt_in_tracker_->TrackError();
if (result == ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR) {
- if (IsArcKioskMode()) {
+ // TODO(poromov): Consider PublicSession offline mode.
+ if (IsRobotAccountMode()) {
VLOG(1) << "Robot account auth code fetching error";
// Log out the user. All the cleanup will be done in Shutdown() method.
// The callback is not called because auth code is empty.
@@ -289,12 +290,17 @@ void ArcSessionManager::OnProvisioningFinished(ProvisioningResult result) {
// * In case ARC is enabled from OOBE.
// * In ARC Kiosk mode, because the only one UI in kiosk mode must be the
// kiosk app and device is not needed for opt-in;
+ // * In Public Session mode, because Play Store will be hidden from users
+ // and only apps configured by policy should be installed.
// * When ARC is managed and all OptIn preferences are managed/unused, too,
// because the whole OptIn flow should happen as seamless as possible for
// the user.
+ // For Active Directory users we always show a page notifying them that they
+ // have to authenticate with their identity provider (through SAML) to make
+ // it less weird that a browser window pops up.
const bool suppress_play_store_app =
!IsPlayStoreAvailable() || IsArcOptInVerificationDisabled() ||
- IsArcKioskMode() || oobe_start_ ||
+ IsRobotAccountMode() || oobe_start_ ||
(IsArcPlayStoreEnabledPreferenceManagedForProfile(profile_) &&
AreArcAllOptInPreferencesIgnorableForProfile(profile_));
if (!suppress_play_store_app) {
@@ -404,7 +410,7 @@ void ArcSessionManager::Initialize() {
// in typical use case there will be no one nearby the kiosk device, who can
// do some action to solve the problem be means of UI.
if (!g_disable_ui_for_testing && !IsArcOptInVerificationDisabled() &&
- !IsArcKioskMode()) {
+ !IsRobotAccountMode()) {
DCHECK(!support_host_);
support_host_ = base::MakeUnique<ArcSupportHost>(profile_);
support_host_->SetErrorDelegate(this);
@@ -604,11 +610,12 @@ bool ArcSessionManager::RequestEnableImpl() {
// set up to always start, then directly start ARC.
// For Kiosk mode, skip ToS because it is very likely that near the device
// there will be no one who is eligible to accept them.
- // If opt-in verification is disabled, skip negotiation, too. This is for
- // testing purpose.
- const bool start_arc_directly = prefs->GetBoolean(prefs::kArcSignedIn) ||
- ShouldArcAlwaysStart() || IsArcKioskMode() ||
- IsArcOptInVerificationDisabled();
+ // In Public Session mode ARC should be started silently without user
+ // interaction. If opt-in verification is disabled, skip negotiation, too.
+ // This is for testing purpose.
+ const bool start_arc_directly =
+ prefs->GetBoolean(prefs::kArcSignedIn) || ShouldArcAlwaysStart() ||
+ IsRobotAccountMode() || IsArcOptInVerificationDisabled();
// When ARC is blocked because of filesystem compatibility, do not proceed
// to starting ARC nor follow further state transitions.
@@ -705,9 +712,9 @@ void ArcSessionManager::MaybeStartTermsOfServiceNegotiation() {
DCHECK(profile_);
DCHECK(arc_session_runner_->IsStopped() || arc_session_runner_->IsStopping());
DCHECK(!terms_of_service_negotiator_);
- // In Kiosk-mode, Terms of Service negotiation should be skipped.
- // See also RequestEnableImpl().
- DCHECK(!IsArcKioskMode());
+ // In Kiosk and Public Session mode, Terms of Service negotiation should be
+ // skipped. See also RequestEnableImpl().
+ DCHECK(!IsRobotAccountMode());
// If opt-in verification is disabled, Terms of Service negotiation should
// be skipped, too. See also RequestEnableImpl().
DCHECK(!IsArcOptInVerificationDisabled());
@@ -870,9 +877,9 @@ void ArcSessionManager::StartBackgroundAndroidManagementCheck() {
DCHECK(!android_management_checker_);
// Skip Android management check for testing.
- // We also skip if Android management check for Kiosk mode,
- // because there are no managed human users for Kiosk exist.
- if (IsArcOptInVerificationDisabled() || IsArcKioskMode() ||
+ // We also skip if Android management check for Kiosk and Public Session mode,
+ // because there are no managed human users for them exist.
+ if (IsArcOptInVerificationDisabled() || IsRobotAccountMode() ||
(g_disable_ui_for_testing &&
!g_enable_check_android_management_for_testing)) {
return;
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_util_unittest.cc » ('j') | components/arc/arc_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698