Commit 8d79e886 authored by Roman Sorokin's avatar Roman Sorokin Committed by Commit Bot

cros oobe: Remove Guest mode observer from wizard controller.

Covered by existing_user_controller observer.

Bug: none
Test: LoginScreenGuestButtonPolicyTest.*
Change-Id: I9d99a05b5b6e1ac7de08a848a426caafb79c9bde
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2231059
Commit-Queue: Roman Sorokin [CET] <rsorokin@chromium.org>
Commit-Queue: Denis Kuznetsov [CET] <antrim@chromium.org>
Reviewed-by: default avatarDenis Kuznetsov [CET] <antrim@chromium.org>
Auto-Submit: Roman Sorokin [CET] <rsorokin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#775113}
parent efb56c7d
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include <vector> #include <vector>
#include "ash/public/cpp/ash_switches.h" #include "ash/public/cpp/ash_switches.h"
#include "ash/public/cpp/login_screen.h"
#include "ash/public/cpp/tablet_mode.h" #include "ash/public/cpp/tablet_mode.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/callback_helpers.h" #include "base/callback_helpers.h"
...@@ -165,7 +164,6 @@ ...@@ -165,7 +164,6 @@
#include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h" #include "components/prefs/pref_service.h"
#include "components/session_manager/core/session_manager.h" #include "components/session_manager/core/session_manager.h"
#include "components/user_manager/user_manager.h"
#include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_types.h" #include "content/public/browser/notification_types.h"
...@@ -400,12 +398,6 @@ void WizardController::Init(OobeScreenId first_screen) { ...@@ -400,12 +398,6 @@ void WizardController::Init(OobeScreenId first_screen) {
weak_factory_.GetWeakPtr())); weak_factory_.GetWeakPtr()));
} }
} }
if (CrosSettings::IsInitialized()) {
guest_mode_policy_subscription_ = CrosSettings::Get()->AddSettingsObserver(
kAccountsPrefAllowGuest,
base::BindRepeating(&WizardController::OnGuestModePolicyUpdated,
weak_factory_.GetWeakPtr()));
}
// Use the saved screen preference from Local State. // Use the saved screen preference from Local State.
const std::string screen_pref = const std::string screen_pref =
...@@ -1614,11 +1606,6 @@ void WizardController::OnAccessibilityStatusChanged( ...@@ -1614,11 +1606,6 @@ void WizardController::OnAccessibilityStatusChanged(
} }
} }
void WizardController::OnGuestModePolicyUpdated() {
ash::LoginScreen::Get()->SetAllowLoginAsGuest(
user_manager::UserManager::Get()->IsGuestSessionAllowed());
}
void WizardController::AutoLaunchKioskApp(KioskAppType app_type) { void WizardController::AutoLaunchKioskApp(KioskAppType app_type) {
KioskAppId kiosk_app_id; KioskAppId kiosk_app_id;
switch (app_type) { switch (app_type) {
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
#include "chrome/browser/chromeos/login/screens/terms_of_service_screen.h" #include "chrome/browser/chromeos/login/screens/terms_of_service_screen.h"
#include "chrome/browser/chromeos/login/screens/update_screen.h" #include "chrome/browser/chromeos/login/screens/update_screen.h"
#include "chrome/browser/chromeos/policy/enrollment_config.h" #include "chrome/browser/chromeos/policy/enrollment_config.h"
#include "chrome/browser/chromeos/settings/cros_settings.h"
class PrefService; class PrefService;
...@@ -280,9 +279,6 @@ class WizardController { ...@@ -280,9 +279,6 @@ class WizardController {
void OnAccessibilityStatusChanged( void OnAccessibilityStatusChanged(
const AccessibilityStatusEventDetails& details); const AccessibilityStatusEventDetails& details);
// Notification of Guest Mode policy changes.
void OnGuestModePolicyUpdated();
// Switches from one screen to another. // Switches from one screen to another.
void SetCurrentScreen(BaseScreen* screen); void SetCurrentScreen(BaseScreen* screen);
...@@ -402,8 +398,6 @@ class WizardController { ...@@ -402,8 +398,6 @@ class WizardController {
friend class WizardControllerSupervisionTransitionOobeTest; friend class WizardControllerSupervisionTransitionOobeTest;
std::unique_ptr<AccessibilityStatusSubscription> accessibility_subscription_; std::unique_ptr<AccessibilityStatusSubscription> accessibility_subscription_;
std::unique_ptr<CrosSettings::ObserverSubscription>
guest_mode_policy_subscription_;
std::unique_ptr<SimpleGeolocationProvider> geolocation_provider_; std::unique_ptr<SimpleGeolocationProvider> geolocation_provider_;
std::unique_ptr<TimeZoneProvider> timezone_provider_; std::unique_ptr<TimeZoneProvider> timezone_provider_;
......
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