Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc

Issue 2820063005: Remove the "not_after" validation of policy timestamps (Closed)
Patch Set: Rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/device_local_account_policy_store.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_store_chromeos.h" 5 #include "chrome/browser/chromeos/policy/device_cloud_policy_store_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/logging.h" 10 #include "base/logging.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 NotifyStoreError(); 61 NotifyStoreError();
62 return; 62 return;
63 } 63 }
64 64
65 std::unique_ptr<DeviceCloudPolicyValidator> validator( 65 std::unique_ptr<DeviceCloudPolicyValidator> validator(
66 CreateValidator(policy)); 66 CreateValidator(policy));
67 validator->ValidateSignatureAllowingRotation( 67 validator->ValidateSignatureAllowingRotation(
68 public_key->as_string(), install_attributes_->GetDomain()); 68 public_key->as_string(), install_attributes_->GetDomain());
69 validator->ValidateAgainstCurrentPolicy( 69 validator->ValidateAgainstCurrentPolicy(
70 device_settings_service_->policy_data(), 70 device_settings_service_->policy_data(),
71 CloudPolicyValidatorBase::TIMESTAMP_FULLY_VALIDATED, 71 CloudPolicyValidatorBase::TIMESTAMP_VALIDATED,
72 CloudPolicyValidatorBase::DM_TOKEN_REQUIRED, 72 CloudPolicyValidatorBase::DM_TOKEN_REQUIRED,
73 CloudPolicyValidatorBase::DEVICE_ID_REQUIRED); 73 CloudPolicyValidatorBase::DEVICE_ID_REQUIRED);
74 DeviceCloudPolicyValidator::StartValidation( 74 DeviceCloudPolicyValidator::StartValidation(
75 std::move(validator), 75 std::move(validator),
76 base::Bind(&DeviceCloudPolicyStoreChromeOS::OnPolicyToStoreValidated, 76 base::Bind(&DeviceCloudPolicyStoreChromeOS::OnPolicyToStoreValidated,
77 weak_factory_.GetWeakPtr())); 77 weak_factory_.GetWeakPtr()));
78 } 78 }
79 79
80 void DeviceCloudPolicyStoreChromeOS::Load() { 80 void DeviceCloudPolicyStoreChromeOS::Load() {
81 device_settings_service_->Load(); 81 device_settings_service_->Load();
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 UMA_HISTOGRAM_BOOLEAN(kDMTokenCheckHistogram, true); 237 UMA_HISTOGRAM_BOOLEAN(kDMTokenCheckHistogram, true);
238 } else { 238 } else {
239 LOG(ERROR) << "Device policy read on enrolled device yields " 239 LOG(ERROR) << "Device policy read on enrolled device yields "
240 << "no DM token! Status: " << service_status << "."; 240 << "no DM token! Status: " << service_status << ".";
241 chromeos::StartupUtils::MarkEnrollmentRecoveryRequired(); 241 chromeos::StartupUtils::MarkEnrollmentRecoveryRequired();
242 UMA_HISTOGRAM_BOOLEAN(kDMTokenCheckHistogram, false); 242 UMA_HISTOGRAM_BOOLEAN(kDMTokenCheckHistogram, false);
243 } 243 }
244 } 244 }
245 245
246 } // namespace policy 246 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/device_local_account_policy_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698