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

Unified Diff: chrome/browser/chromeos/login/existing_user_controller.cc

Issue 711433002: Enable device disabling during normal operation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@f_4_425574_add_device_disabling_manager
Patch Set: Address one more comment I had missed. Created 6 years, 1 month 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
Index: chrome/browser/chromeos/login/existing_user_controller.cc
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc
index 7fce49ed2a888799116c772a966d55dbeadd04d9..883dd94fd69fd97f22533c04f8510a9e9beec33a 100644
--- a/chrome/browser/chromeos/login/existing_user_controller.cc
+++ b/chrome/browser/chromeos/login/existing_user_controller.cc
@@ -41,6 +41,7 @@
#include "chrome/browser/chromeos/policy/device_local_account_policy_service.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/chromeos/settings/cros_settings.h"
+#include "chrome/browser/chromeos/system/device_disabling_manager.h"
#include "chrome/browser/signin/easy_unlock_service.h"
#include "chrome/browser/ui/webui/chromeos/login/l10n_util.h"
#include "chrome/common/chrome_switches.h"
@@ -435,13 +436,26 @@ void ExistingUserController::Login(const UserContext& user_context,
1,
HelpAppLauncher::HELP_CANT_ACCESS_ACCOUNT);
- // Reenable clicking on other windows and the status area. Do not start the
+ // Re-enable clicking on other windows and the status area. Do not start the
// auto-login timer though. Without trusted |cros_settings_|, no auto-login
// can succeed.
login_display_->SetUIEnabled(true);
return;
}
+ bool device_disabled = false;
+ cros_settings_->GetBoolean(kDeviceDisabled, &device_disabled);
+ if (device_disabled && system::DeviceDisablingManager::
+ HonorDeviceDisablingDuringNormalOperation()) {
+ // If the device is disabled, bail out. A device disabled screen will be
+ // shown by the DeviceDisablingManager.
+
+ // Re-enable clicking on other windows and the status area. Do not start the
+ // auto-login timer though. On a disabled device, no auto-login can succeed.
+ login_display_->SetUIEnabled(true);
+ return;
+ }
+
if (is_login_in_progress_) {
// If there is another login in progress, bail out. Do not re-enable
// clicking on other windows and the status area. Do not start the

Powered by Google App Engine
This is Rietveld 408576698