| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/policy/device_cloud_policy_manager_chromeos.h" | 5 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 | 190 |
| 191 chromeos::DeviceOAuth2TokenServiceFactory::Shutdown(); | 191 chromeos::DeviceOAuth2TokenServiceFactory::Shutdown(); |
| 192 chromeos::SystemSaltGetter::Shutdown(); | 192 chromeos::SystemSaltGetter::Shutdown(); |
| 193 TestingBrowserProcess::GetGlobal()->SetLocalState(NULL); | 193 TestingBrowserProcess::GetGlobal()->SetLocalState(NULL); |
| 194 } | 194 } |
| 195 | 195 |
| 196 void LockDevice() { | 196 void LockDevice() { |
| 197 base::RunLoop loop; | 197 base::RunLoop loop; |
| 198 chromeos::InstallAttributes::LockResult result; | 198 chromeos::InstallAttributes::LockResult result; |
| 199 install_attributes_->LockDevice( | 199 install_attributes_->LockDevice( |
| 200 PolicyBuilder::kFakeUsername, | |
| 201 DEVICE_MODE_ENTERPRISE, | 200 DEVICE_MODE_ENTERPRISE, |
| 201 PolicyBuilder::kFakeDomain, |
| 202 std::string(), // realm |
| 202 PolicyBuilder::kFakeDeviceId, | 203 PolicyBuilder::kFakeDeviceId, |
| 203 base::Bind(&CopyLockResult, &loop, &result)); | 204 base::Bind(&CopyLockResult, &loop, &result)); |
| 204 loop.Run(); | 205 loop.Run(); |
| 205 ASSERT_EQ(chromeos::InstallAttributes::LOCK_SUCCESS, result); | 206 ASSERT_EQ(chromeos::InstallAttributes::LOCK_SUCCESS, result); |
| 206 } | 207 } |
| 207 | 208 |
| 208 void ConnectManager() { | 209 void ConnectManager() { |
| 209 std::unique_ptr<chromeos::attestation::AttestationFlow> unique_flow( | 210 std::unique_ptr<chromeos::attestation::AttestationFlow> unique_flow( |
| 210 CreateAttestationFlow()); | 211 CreateAttestationFlow()); |
| 211 manager_->Initialize(&local_state_); | 212 manager_->Initialize(&local_state_); |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 DeviceCloudPolicyManagerChromeOSEnrollmentTest, | 798 DeviceCloudPolicyManagerChromeOSEnrollmentTest, |
| 798 ::testing::Values(false, true)); | 799 ::testing::Values(false, true)); |
| 799 | 800 |
| 800 INSTANTIATE_TEST_CASE_P( | 801 INSTANTIATE_TEST_CASE_P( |
| 801 Cert, | 802 Cert, |
| 802 DeviceCloudPolicyManagerChromeOSEnrollmentBlankSystemSaltTest, | 803 DeviceCloudPolicyManagerChromeOSEnrollmentBlankSystemSaltTest, |
| 803 ::testing::Values(false, true)); | 804 ::testing::Values(false, true)); |
| 804 | 805 |
| 805 } // namespace | 806 } // namespace |
| 806 } // namespace policy | 807 } // namespace policy |
| OLD | NEW |