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" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/prefs/scoped_user_pref_update.h" | |
13 #include "base/prefs/testing_pref_service.h" | |
14 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
15 #include "chrome/browser/browser_process_platform_part.h" | 13 #include "chrome/browser/browser_process_platform_part.h" |
16 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 14 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
17 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" | 15 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" |
18 #include "chrome/browser/chromeos/policy/device_policy_builder.h" | 16 #include "chrome/browser/chromeos/policy/device_policy_builder.h" |
19 #include "chrome/browser/chromeos/policy/server_backed_device_state.h" | 17 #include "chrome/browser/chromeos/policy/server_backed_device_state.h" |
20 #include "chrome/browser/chromeos/policy/stub_enterprise_install_attributes.h" | 18 #include "chrome/browser/chromeos/policy/stub_enterprise_install_attributes.h" |
21 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 19 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
22 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" | 20 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" |
23 #include "chrome/common/pref_names.h" | 21 #include "chrome/common/pref_names.h" |
24 #include "chrome/test/base/testing_browser_process.h" | 22 #include "chrome/test/base/testing_browser_process.h" |
25 #include "chromeos/chromeos_switches.h" | 23 #include "chromeos/chromeos_switches.h" |
26 #include "components/ownership/mock_owner_key_util.h" | 24 #include "components/ownership/mock_owner_key_util.h" |
27 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 25 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
| 26 #include "components/prefs/scoped_user_pref_update.h" |
| 27 #include "components/prefs/testing_pref_service.h" |
28 #include "components/user_manager/fake_user_manager.h" | 28 #include "components/user_manager/fake_user_manager.h" |
29 #include "content/public/test/test_browser_thread_bundle.h" | 29 #include "content/public/test/test_browser_thread_bundle.h" |
30 #include "policy/proto/device_management_backend.pb.h" | 30 #include "policy/proto/device_management_backend.pb.h" |
31 #include "testing/gmock/include/gmock/gmock.h" | 31 #include "testing/gmock/include/gmock/gmock.h" |
32 #include "testing/gtest/include/gtest/gtest.h" | 32 #include "testing/gtest/include/gtest/gtest.h" |
33 | 33 |
34 using testing::_; | 34 using testing::_; |
35 using testing::Mock; | 35 using testing::Mock; |
36 | 36 |
37 namespace chromeos { | 37 namespace chromeos { |
(...skipping 470 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 |