Chromium Code Reviews| 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/enrollment_handler_chromeos.h" | 5 #include "chrome/browser/chromeos/policy/enrollment_handler_chromeos.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 192 DM_STATUS_RESPONSE_DECODING_ERROR)); | 192 DM_STATUS_RESPONSE_DECODING_ERROR)); |
| 193 return; | 193 return; |
| 194 } | 194 } |
| 195 | 195 |
| 196 std::unique_ptr<DeviceCloudPolicyValidator> validator( | 196 std::unique_ptr<DeviceCloudPolicyValidator> validator( |
| 197 DeviceCloudPolicyValidator::Create( | 197 DeviceCloudPolicyValidator::Create( |
| 198 std::unique_ptr<em::PolicyFetchResponse>( | 198 std::unique_ptr<em::PolicyFetchResponse>( |
| 199 new em::PolicyFetchResponse(*policy)), | 199 new em::PolicyFetchResponse(*policy)), |
| 200 background_task_runner_)); | 200 background_task_runner_)); |
| 201 | 201 |
| 202 validator->ValidateTimestamp( | 202 validator->ValidateTimestamp(base::Time(), |
| 203 base::Time(), base::Time::NowFromSystemTime(), | 203 CloudPolicyValidatorBase::TIMESTAMP_VALIDATED); |
|
Thiemo Nagel
2017/04/19 11:43:09
Nit: IIUC it would be clearer to set TIMESTAMP_NOT
emaxx
2017/04/19 20:48:45
Current code still validates something: it checks
| |
| 204 CloudPolicyValidatorBase::TIMESTAMP_FULLY_VALIDATED); | |
| 205 | 204 |
| 206 // If this is re-enrollment, make sure that the new policy matches the | 205 // If this is re-enrollment, make sure that the new policy matches the |
| 207 // previously-enrolled domain. (Currently only implemented for cloud | 206 // previously-enrolled domain. (Currently only implemented for cloud |
| 208 // management.) | 207 // management.) |
| 209 std::string domain; | 208 std::string domain; |
| 210 if (install_attributes_->IsCloudManaged()) { | 209 if (install_attributes_->IsCloudManaged()) { |
| 211 domain = install_attributes_->GetDomain(); | 210 domain = install_attributes_->GetDomain(); |
| 212 validator->ValidateDomain(domain); | 211 validator->ValidateDomain(domain); |
| 213 } | 212 } |
| 214 validator->ValidateDMToken(client->dm_token(), | 213 validator->ValidateDMToken(client->dm_token(), |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 661 callback.Run(status); | 660 callback.Run(status); |
| 662 } | 661 } |
| 663 | 662 |
| 664 void EnrollmentHandlerChromeOS::SetStep(EnrollmentStep step) { | 663 void EnrollmentHandlerChromeOS::SetStep(EnrollmentStep step) { |
| 665 DCHECK_LE(enrollment_step_, step); | 664 DCHECK_LE(enrollment_step_, step); |
| 666 VLOG(1) << "Step: " << step; | 665 VLOG(1) << "Step: " << step; |
| 667 enrollment_step_ = step; | 666 enrollment_step_ = step; |
| 668 } | 667 } |
| 669 | 668 |
| 670 } // namespace policy | 669 } // namespace policy |
| OLD | NEW |