| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 base::ThreadTaskRunnerHandle::Get(), install_attributes_.get(), | 181 base::ThreadTaskRunnerHandle::Get(), install_attributes_.get(), |
| 182 &state_keys_broker_, store_, manager_.get(), nullptr, nullptr)); | 182 &state_keys_broker_, store_, manager_.get(), nullptr, nullptr)); |
| 183 initializer_->Init(); | 183 initializer_->Init(); |
| 184 } | 184 } |
| 185 | 185 |
| 186 void VerifyPolicyPopulated() { | 186 void VerifyPolicyPopulated() { |
| 187 PolicyBundle bundle; | 187 PolicyBundle bundle; |
| 188 bundle.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())) | 188 bundle.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())) |
| 189 .Set(key::kDeviceMetricsReportingEnabled, POLICY_LEVEL_MANDATORY, | 189 .Set(key::kDeviceMetricsReportingEnabled, POLICY_LEVEL_MANDATORY, |
| 190 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, | 190 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, |
| 191 base::WrapUnique(new base::FundamentalValue(false)), nullptr); | 191 base::MakeUnique<base::FundamentalValue>(false), nullptr); |
| 192 EXPECT_TRUE(manager_->policies().Equals(bundle)); | 192 EXPECT_TRUE(manager_->policies().Equals(bundle)); |
| 193 } | 193 } |
| 194 | 194 |
| 195 void AllowUninterestingRemoteCommandFetches() { | 195 void AllowUninterestingRemoteCommandFetches() { |
| 196 // We are not interested in remote command fetches that the client initiates | 196 // We are not interested in remote command fetches that the client initiates |
| 197 // automatically. Make them fail and ignore them otherwise. | 197 // automatically. Make them fail and ignore them otherwise. |
| 198 EXPECT_CALL(device_management_service_, | 198 EXPECT_CALL(device_management_service_, |
| 199 CreateJob(DeviceManagementRequestJob::TYPE_REMOTE_COMMANDS, _)) | 199 CreateJob(DeviceManagementRequestJob::TYPE_REMOTE_COMMANDS, _)) |
| 200 .Times(AnyNumber()) | 200 .Times(AnyNumber()) |
| 201 .WillRepeatedly(device_management_service_.FailJob( | 201 .WillRepeatedly(device_management_service_.FailJob( |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 | 718 |
| 719 TEST_F(DeviceCloudPolicyManagerChromeOSEnrollmentBlankSystemSaltTest, | 719 TEST_F(DeviceCloudPolicyManagerChromeOSEnrollmentBlankSystemSaltTest, |
| 720 RobotRefreshSaveFailed) { | 720 RobotRefreshSaveFailed) { |
| 721 // Without the system salt, the robot token can't be stored. | 721 // Without the system salt, the robot token can't be stored. |
| 722 RunTest(); | 722 RunTest(); |
| 723 ExpectFailedEnrollment(EnrollmentStatus::STATUS_ROBOT_REFRESH_STORE_FAILED); | 723 ExpectFailedEnrollment(EnrollmentStatus::STATUS_ROBOT_REFRESH_STORE_FAILED); |
| 724 } | 724 } |
| 725 | 725 |
| 726 } // namespace | 726 } // namespace |
| 727 } // namespace policy | 727 } // namespace policy |
| OLD | NEW |