1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544
|
// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ash/system/device_disabling_manager.h"
#include <memory>
#include "ash/constants/ash_switches.h"
#include "base/command_line.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/ref_counted.h"
#include "base/run_loop.h"
#include "chrome/browser/ash/login/users/fake_chrome_user_manager.h"
#include "chrome/browser/ash/policy/core/device_cloud_policy_manager_ash.h"
#include "chrome/browser/ash/policy/core/device_policy_builder.h"
#include "chrome/browser/ash/policy/server_backed_state/server_backed_device_state.h"
#include "chrome/browser/ash/settings/device_settings_service.h"
#include "chrome/browser/ash/settings/scoped_cros_settings_test_helper.h"
#include "chrome/browser/browser_process_platform_part.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/scoped_testing_local_state.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chromeos/ash/components/dbus/session_manager/fake_session_manager_client.h"
#include "chromeos/ash/components/system/fake_statistics_provider.h"
#include "components/ownership/mock_owner_key_util.h"
#include "components/policy/core/common/cloud/cloud_policy_constants.h"
#include "components/policy/proto/device_management_backend.pb.h"
#include "components/prefs/scoped_user_pref_update.h"
#include "components/prefs/testing_pref_service.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/test_utils.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
using testing::_;
using testing::Mock;
namespace ash {
namespace system {
namespace {
const char kTestUser[] = "user@example.com";
const char kEnrollmentDomain[] = "example.com";
const char kDeviceId[] = "fake-id";
const char kDisabledMessage1[] = "Device disabled 1.";
const char kDisabledMessage2[] = "Device disabled 2.";
} // namespace
class DeviceDisablingManagerTestBase : public testing::Test,
public DeviceDisablingManager::Delegate {
public:
DeviceDisablingManagerTestBase();
DeviceDisablingManagerTestBase(const DeviceDisablingManagerTestBase&) =
delete;
DeviceDisablingManagerTestBase& operator=(
const DeviceDisablingManagerTestBase&) = delete;
// testing::Test:
void TearDown() override;
virtual void CreateDeviceDisablingManager();
virtual void DestroyDeviceDisablingManager();
void LogIn();
// DeviceDisablingManager::Delegate:
MOCK_METHOD0(RestartToLoginScreen, void());
MOCK_METHOD0(ShowDeviceDisabledScreen, void());
DeviceDisablingManager* GetDeviceDisablingManager() {
return device_disabling_manager_.get();
}
// Configure install attributes.
void SetUnowned();
void SetEnterpriseOwned();
void SetConsumerOwned();
private:
content::BrowserTaskEnvironment task_environment_;
ScopedCrosSettingsTestHelper cros_settings_test_helper_;
FakeChromeUserManager fake_user_manager_;
std::unique_ptr<DeviceDisablingManager> device_disabling_manager_;
FakeStatisticsProvider statistics_provider_;
};
DeviceDisablingManagerTestBase::DeviceDisablingManagerTestBase() {
StatisticsProvider::SetTestProvider(&statistics_provider_);
}
void DeviceDisablingManagerTestBase::TearDown() {
DestroyDeviceDisablingManager();
}
void DeviceDisablingManagerTestBase::CreateDeviceDisablingManager() {
device_disabling_manager_ = std::make_unique<DeviceDisablingManager>(
this, CrosSettings::Get(), &fake_user_manager_);
device_disabling_manager_->Init();
}
void DeviceDisablingManagerTestBase::DestroyDeviceDisablingManager() {
device_disabling_manager_.reset();
}
void DeviceDisablingManagerTestBase::LogIn() {
fake_user_manager_.AddUser(AccountId::FromUserEmail(kTestUser));
}
void DeviceDisablingManagerTestBase::SetUnowned() {
cros_settings_test_helper_.InstallAttributes()->Clear();
}
void DeviceDisablingManagerTestBase::SetEnterpriseOwned() {
cros_settings_test_helper_.InstallAttributes()->SetCloudManaged(
kEnrollmentDomain, kDeviceId);
}
void DeviceDisablingManagerTestBase::SetConsumerOwned() {
cros_settings_test_helper_.InstallAttributes()->SetConsumerOwned();
}
// Base class for tests that verify device disabling behavior during OOBE, when
// the device is not owned yet.
class DeviceDisablingManagerOOBETest : public DeviceDisablingManagerTestBase {
public:
DeviceDisablingManagerOOBETest();
DeviceDisablingManagerOOBETest(const DeviceDisablingManagerOOBETest&) =
delete;
DeviceDisablingManagerOOBETest& operator=(
const DeviceDisablingManagerOOBETest&) = delete;
// DeviceDisablingManagerTestBase:
void SetUp() override;
void TearDown() override;
bool device_disabled() const { return device_disabled_; }
void CheckWhetherDeviceDisabledDuringOOBE();
void SetDeviceDisabled(bool disabled);
private:
void OnDeviceDisabledChecked(bool device_disabled);
ScopedTestingLocalState scoped_testing_local_state_{
TestingBrowserProcess::GetGlobal()};
FakeStatisticsProvider statistics_provider_;
base::RunLoop run_loop_;
bool device_disabled_ = false;
};
DeviceDisablingManagerOOBETest::DeviceDisablingManagerOOBETest() {
EXPECT_CALL(*this, RestartToLoginScreen()).Times(0);
EXPECT_CALL(*this, ShowDeviceDisabledScreen()).Times(0);
}
void DeviceDisablingManagerOOBETest::SetUp() {
CreateDeviceDisablingManager();
StatisticsProvider::SetTestProvider(&statistics_provider_);
}
void DeviceDisablingManagerOOBETest::TearDown() {
DeviceDisablingManagerTestBase::TearDown();
}
void DeviceDisablingManagerOOBETest::CheckWhetherDeviceDisabledDuringOOBE() {
GetDeviceDisablingManager()->CheckWhetherDeviceDisabledDuringOOBE(
base::BindOnce(&DeviceDisablingManagerOOBETest::OnDeviceDisabledChecked,
base::Unretained(this)));
run_loop_.Run();
}
void DeviceDisablingManagerOOBETest::SetDeviceDisabled(bool disabled) {
ScopedDictPrefUpdate dict(scoped_testing_local_state_.Get(),
prefs::kServerBackedDeviceState);
if (disabled) {
dict->Set(policy::kDeviceStateMode, policy::kDeviceStateModeDisabled);
} else {
dict->Remove(policy::kDeviceStateMode);
}
dict->Set(policy::kDeviceStateManagementDomain, kEnrollmentDomain);
dict->Set(policy::kDeviceStateDisabledMessage, kDisabledMessage1);
}
void DeviceDisablingManagerOOBETest::OnDeviceDisabledChecked(
bool device_disabled) {
device_disabled_ = device_disabled;
run_loop_.Quit();
}
// Verifies that the device is not considered disabled during OOBE by default.
TEST_F(DeviceDisablingManagerOOBETest, NotDisabledByDefault) {
CheckWhetherDeviceDisabledDuringOOBE();
EXPECT_FALSE(device_disabled());
}
// Verifies that the device is not considered disabled during OOBE when it is
// explicitly marked as not disabled.
TEST_F(DeviceDisablingManagerOOBETest, NotDisabledWhenExplicitlyNotDisabled) {
SetDeviceDisabled(false);
CheckWhetherDeviceDisabledDuringOOBE();
EXPECT_FALSE(device_disabled());
}
// Verifies that the device is not considered disabled during OOBE when device
// disabling is turned off by switch, even if the device is marked as disabled.
TEST_F(DeviceDisablingManagerOOBETest, NotDisabledWhenTurnedOffBySwitch) {
base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kDisableDeviceDisabling);
SetDeviceDisabled(true);
CheckWhetherDeviceDisabledDuringOOBE();
EXPECT_FALSE(device_disabled());
}
// Verifies that the device is not considered disabled during OOBE when it is
// already enterprise enrolled, even if the device is marked as disabled.
TEST_F(DeviceDisablingManagerOOBETest, NotDisabledWhenEnterpriseOwned) {
SetEnterpriseOwned();
SetDeviceDisabled(true);
CheckWhetherDeviceDisabledDuringOOBE();
EXPECT_FALSE(device_disabled());
}
// Verifies that the device is not considered disabled during OOBE when it is
// already owned by a consumer, even if the device is marked as disabled.
TEST_F(DeviceDisablingManagerOOBETest, NotDisabledWhenConsumerOwned) {
SetConsumerOwned();
SetDeviceDisabled(true);
CheckWhetherDeviceDisabledDuringOOBE();
EXPECT_FALSE(device_disabled());
}
// Verifies that the device is considered disabled during OOBE when it is marked
// as disabled, device disabling is not turned off by flag and the device is not
// owned yet.
TEST_F(DeviceDisablingManagerOOBETest, ShowWhenDisabledAndNotOwned) {
SetUnowned();
SetDeviceDisabled(true);
CheckWhetherDeviceDisabledDuringOOBE();
EXPECT_TRUE(device_disabled());
EXPECT_EQ(kEnrollmentDomain,
GetDeviceDisablingManager()->enrollment_domain());
EXPECT_EQ(kDisabledMessage1, GetDeviceDisablingManager()->disabled_message());
}
// Base class for tests that verify device disabling behavior once the device is
// owned.
class DeviceDisablingManagerTest : public DeviceDisablingManagerTestBase,
public DeviceDisablingManager::Observer {
public:
DeviceDisablingManagerTest();
DeviceDisablingManagerTest(const DeviceDisablingManagerTest&) = delete;
DeviceDisablingManagerTest& operator=(const DeviceDisablingManagerTest&) =
delete;
// DeviceDisablingManagerTestBase:
void TearDown() override;
void CreateDeviceDisablingManager() override;
void DestroyDeviceDisablingManager() override;
// DeviceDisablingManager::Observer:
MOCK_METHOD1(OnDisabledMessageChanged, void(const std::string&));
MOCK_METHOD0(OnRestrictionScheduleMessageChanged, void());
void MakeCrosSettingsTrusted();
void SetDeviceDisabled(bool disabled);
void SetDisabledMessage(const std::string& disabled_message);
private:
void SimulatePolicyFetch();
FakeSessionManagerClient session_manager_client_;
policy::DevicePolicyBuilder device_policy_;
};
DeviceDisablingManagerTest::DeviceDisablingManagerTest() = default;
void DeviceDisablingManagerTest::TearDown() {
DeviceSettingsService::Get()->UnsetSessionManager();
DeviceDisablingManagerTestBase::TearDown();
}
void DeviceDisablingManagerTest::CreateDeviceDisablingManager() {
DeviceDisablingManagerTestBase::CreateDeviceDisablingManager();
GetDeviceDisablingManager()->AddObserver(this);
}
void DeviceDisablingManagerTest::DestroyDeviceDisablingManager() {
if (GetDeviceDisablingManager())
GetDeviceDisablingManager()->RemoveObserver(this);
DeviceDisablingManagerTestBase::DestroyDeviceDisablingManager();
}
void DeviceDisablingManagerTest::MakeCrosSettingsTrusted() {
scoped_refptr<ownership::MockOwnerKeyUtil> owner_key_util(
new ownership::MockOwnerKeyUtil);
owner_key_util->SetPublicKeyFromPrivateKey(*device_policy_.GetSigningKey());
DeviceSettingsService::Get()->SetSessionManager(&session_manager_client_,
owner_key_util);
SimulatePolicyFetch();
}
void DeviceDisablingManagerTest::SetDeviceDisabled(bool disabled) {
if (disabled) {
device_policy_.policy_data().mutable_device_state()->set_device_mode(
enterprise_management::DeviceState::DEVICE_MODE_DISABLED);
} else {
device_policy_.policy_data().mutable_device_state()->clear_device_mode();
}
SimulatePolicyFetch();
}
void DeviceDisablingManagerTest::SetDisabledMessage(
const std::string& disabled_message) {
device_policy_.policy_data()
.mutable_device_state()
->mutable_disabled_state()
->set_message(disabled_message);
SimulatePolicyFetch();
}
void DeviceDisablingManagerTest::SimulatePolicyFetch() {
device_policy_.Build();
session_manager_client_.set_device_policy(device_policy_.GetBlob());
DeviceSettingsService::Get()->OwnerKeySet(true);
content::RunAllTasksUntilIdle();
}
// Verifies that the device is not considered disabled by default when it is
// enrolled for enterprise management.
TEST_F(DeviceDisablingManagerTest, NotDisabledByDefault) {
SetEnterpriseOwned();
MakeCrosSettingsTrusted();
EXPECT_CALL(*this, RestartToLoginScreen()).Times(0);
EXPECT_CALL(*this, ShowDeviceDisabledScreen()).Times(0);
EXPECT_CALL(*this, OnDisabledMessageChanged(_)).Times(0);
CreateDeviceDisablingManager();
}
// Verifies that the device is not considered disabled when it is explicitly
// marked as not disabled.
TEST_F(DeviceDisablingManagerTest, NotDisabledWhenExplicitlyNotDisabled) {
SetEnterpriseOwned();
MakeCrosSettingsTrusted();
SetDeviceDisabled(false);
EXPECT_CALL(*this, RestartToLoginScreen()).Times(0);
EXPECT_CALL(*this, ShowDeviceDisabledScreen()).Times(0);
EXPECT_CALL(*this, OnDisabledMessageChanged(_)).Times(0);
CreateDeviceDisablingManager();
}
// Verifies that the device is not considered disabled when device disabling is
// turned off by switch, even if the device is marked as disabled.
TEST_F(DeviceDisablingManagerTest,
NotDisabledWhenTurnedOffBySwitchEnterpriseManaged) {
base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kDisableDeviceDisabling);
SetEnterpriseOwned();
MakeCrosSettingsTrusted();
SetDeviceDisabled(true);
EXPECT_CALL(*this, RestartToLoginScreen()).Times(0);
EXPECT_CALL(*this, ShowDeviceDisabledScreen()).Times(0);
EXPECT_CALL(*this, OnDisabledMessageChanged(_)).Times(0);
CreateDeviceDisablingManager();
}
// Verifies that the device is not considered disabled when it is owned by a
// consumer, even if the device is marked as disabled.
TEST_F(DeviceDisablingManagerTest, NotDisabledWhenConsumerOwned) {
SetConsumerOwned();
MakeCrosSettingsTrusted();
SetDeviceDisabled(true);
EXPECT_CALL(*this, RestartToLoginScreen()).Times(0);
EXPECT_CALL(*this, ShowDeviceDisabledScreen()).Times(0);
EXPECT_CALL(*this, OnDisabledMessageChanged(_)).Times(0);
CreateDeviceDisablingManager();
}
// Verifies that the device disabled screen is shown immediately when the device
// is already marked as disabled on start-up.
TEST_F(DeviceDisablingManagerTest, DisabledOnLoginScreen) {
SetEnterpriseOwned();
MakeCrosSettingsTrusted();
SetDisabledMessage(kDisabledMessage1);
SetDeviceDisabled(true);
EXPECT_CALL(*this, RestartToLoginScreen()).Times(0);
EXPECT_CALL(*this, ShowDeviceDisabledScreen()).Times(1);
EXPECT_CALL(*this, OnDisabledMessageChanged(_)).Times(0);
CreateDeviceDisablingManager();
EXPECT_EQ(kEnrollmentDomain,
GetDeviceDisablingManager()->enrollment_domain());
EXPECT_EQ(kDisabledMessage1, GetDeviceDisablingManager()->disabled_message());
}
// Verifies that the device disabled screen is shown immediately when the device
// becomes disabled while the login screen is showing. Also verifies that Chrome
// restarts when the device becomes enabled again.
TEST_F(DeviceDisablingManagerTest, DisableAndReEnableOnLoginScreen) {
SetEnterpriseOwned();
MakeCrosSettingsTrusted();
SetDisabledMessage(kDisabledMessage1);
// Verify that initially, the disabled screen is not shown and Chrome does not
// restart.
EXPECT_CALL(*this, RestartToLoginScreen()).Times(0);
EXPECT_CALL(*this, ShowDeviceDisabledScreen()).Times(0);
EXPECT_CALL(*this, OnDisabledMessageChanged(_)).Times(0);
CreateDeviceDisablingManager();
Mock::VerifyAndClearExpectations(this);
// Mark the device as disabled. Verify that the device disabled screen is
// shown.
EXPECT_CALL(*this, RestartToLoginScreen()).Times(0);
EXPECT_CALL(*this, ShowDeviceDisabledScreen()).Times(1);
EXPECT_CALL(*this, OnDisabledMessageChanged(_)).Times(0);
EXPECT_CALL(*this, OnDisabledMessageChanged(kDisabledMessage1)).Times(1);
SetDeviceDisabled(true);
Mock::VerifyAndClearExpectations(this);
EXPECT_EQ(kEnrollmentDomain,
GetDeviceDisablingManager()->enrollment_domain());
EXPECT_EQ(kDisabledMessage1, GetDeviceDisablingManager()->disabled_message());
// Update the disabled message. Verify that the device disabled screen is
// updated.
EXPECT_CALL(*this, RestartToLoginScreen()).Times(0);
EXPECT_CALL(*this, ShowDeviceDisabledScreen()).Times(0);
EXPECT_CALL(*this, OnDisabledMessageChanged(_)).Times(0);
EXPECT_CALL(*this, OnDisabledMessageChanged(kDisabledMessage2)).Times(1);
SetDisabledMessage(kDisabledMessage2);
Mock::VerifyAndClearExpectations(this);
EXPECT_EQ(kDisabledMessage2, GetDeviceDisablingManager()->disabled_message());
// Mark the device as enabled again. Verify that Chrome restarts.
EXPECT_CALL(*this, RestartToLoginScreen()).Times(1);
EXPECT_CALL(*this, ShowDeviceDisabledScreen()).Times(0);
EXPECT_CALL(*this, OnDisabledMessageChanged(_)).Times(0);
SetDeviceDisabled(false);
}
// Verifies that Chrome restarts when the device becomes disabled while a
// session is in progress.
TEST_F(DeviceDisablingManagerTest, DisableDuringSession) {
SetEnterpriseOwned();
MakeCrosSettingsTrusted();
SetDisabledMessage(kDisabledMessage1);
LogIn();
// Verify that initially, the disabled screen is not shown and Chrome does not
// restart.
EXPECT_CALL(*this, RestartToLoginScreen()).Times(0);
EXPECT_CALL(*this, ShowDeviceDisabledScreen()).Times(0);
EXPECT_CALL(*this, OnDisabledMessageChanged(_)).Times(0);
CreateDeviceDisablingManager();
Mock::VerifyAndClearExpectations(this);
// Mark the device as disabled. Verify that Chrome restarts.
EXPECT_CALL(*this, RestartToLoginScreen()).Times(1);
EXPECT_CALL(*this, ShowDeviceDisabledScreen()).Times(0);
EXPECT_CALL(*this, OnDisabledMessageChanged(_)).Times(0);
EXPECT_CALL(*this, OnDisabledMessageChanged(kDisabledMessage1)).Times(1);
SetDeviceDisabled(true);
}
// Verifies that the HonorDeviceDisablingDuringNormalOperation() method returns
// true iff the device is enterprise enrolled and device disabling is not turned
// off by switch.
TEST_F(DeviceDisablingManagerTest, HonorDeviceDisablingDuringNormalOperation) {
// Not enterprise owned, not disabled by switch.
EXPECT_FALSE(
DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation());
// Enterprise owned, not disabled by switch.
SetEnterpriseOwned();
EXPECT_TRUE(
DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation());
// Enterprise owned, disabled by switch.
base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kDisableDeviceDisabling);
EXPECT_FALSE(
DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation());
// Not enterprise owned, disabled by switch.
SetUnowned();
EXPECT_FALSE(
DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation());
}
// Tests the IsDeviceDisabledDuringNormalOperation() method, when device
// disabling is turned off by switch.
TEST_F(DeviceDisablingManagerTest, IsDeviceDisabledWhenTurnedOffBySwitch) {
base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kDisableDeviceDisabling);
MakeCrosSettingsTrusted();
SetDeviceDisabled(true);
// Not enterprise owned.
SetConsumerOwned();
EXPECT_FALSE(DeviceDisablingManager::IsDeviceDisabledDuringNormalOperation());
// Enterprise owned.
SetEnterpriseOwned();
EXPECT_FALSE(DeviceDisablingManager::IsDeviceDisabledDuringNormalOperation());
}
// Tests the IsDeviceDisabledDuringNormalOperation() method, when device
// is not enterprise owned.
TEST_F(DeviceDisablingManagerTest, IsDeviceDisabledNotEnterpriseOwned) {
SetConsumerOwned();
MakeCrosSettingsTrusted();
SetDeviceDisabled(true);
EXPECT_FALSE(DeviceDisablingManager::IsDeviceDisabledDuringNormalOperation());
}
// Tests the IsDeviceDisabledDuringNormalOperation() method, when device is
// enterprise owned.
TEST_F(DeviceDisablingManagerTest, IsDeviceDisabledEnterpriseOwned) {
SetEnterpriseOwned();
MakeCrosSettingsTrusted();
SetDeviceDisabled(false);
EXPECT_FALSE(DeviceDisablingManager::IsDeviceDisabledDuringNormalOperation());
SetDeviceDisabled(true);
EXPECT_TRUE(DeviceDisablingManager::IsDeviceDisabledDuringNormalOperation());
}
} // namespace system
} // namespace ash
|