| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/system/device_disabling_manager.h" | 5 #include "chrome/browser/chromeos/system/device_disabling_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 DeviceDisablingManager* GetDeviceDisablingManager() { | 69 DeviceDisablingManager* GetDeviceDisablingManager() { |
| 70 return device_disabling_manager_.get(); | 70 return device_disabling_manager_.get(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 policy::ScopedStubEnterpriseInstallAttributes install_attributes_; | 74 policy::ScopedStubEnterpriseInstallAttributes install_attributes_; |
| 75 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; | 75 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; |
| 76 chromeos::ScopedTestCrosSettings test_cros_settings_; | 76 chromeos::ScopedTestCrosSettings test_cros_settings_; |
| 77 user_manager::FakeUserManager fake_user_manager_; | 77 user_manager::FakeUserManager fake_user_manager_; |
| 78 scoped_ptr<DeviceDisablingManager> device_disabling_manager_; | 78 std::unique_ptr<DeviceDisablingManager> device_disabling_manager_; |
| 79 | 79 |
| 80 DISALLOW_COPY_AND_ASSIGN(DeviceDisablingManagerTestBase); | 80 DISALLOW_COPY_AND_ASSIGN(DeviceDisablingManagerTestBase); |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 DeviceDisablingManagerTestBase::DeviceDisablingManagerTestBase() | 83 DeviceDisablingManagerTestBase::DeviceDisablingManagerTestBase() |
| 84 : install_attributes_("", "", "", policy::DEVICE_MODE_NOT_SET) { | 84 : install_attributes_("", "", "", policy::DEVICE_MODE_NOT_SET) { |
| 85 } | 85 } |
| 86 | 86 |
| 87 void DeviceDisablingManagerTestBase::TearDown() { | 87 void DeviceDisablingManagerTestBase::TearDown() { |
| 88 DestroyDeviceDisablingManager(); | 88 DestroyDeviceDisablingManager(); |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation()); | 508 DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation()); |
| 509 | 509 |
| 510 // Not enterprise owned, disabled by flag. | 510 // Not enterprise owned, disabled by flag. |
| 511 SetUnowned(); | 511 SetUnowned(); |
| 512 EXPECT_FALSE( | 512 EXPECT_FALSE( |
| 513 DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation()); | 513 DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation()); |
| 514 } | 514 } |
| 515 | 515 |
| 516 } // namespace system | 516 } // namespace system |
| 517 } // namespace chromeos | 517 } // namespace chromeos |
| OLD | NEW |