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

Unified Diff: components/policy/core/common/cloud/cloud_policy_validator_unittest.cc

Issue 2494843002: Don't pass domain and verification key to validation when not required (Closed)
Patch Set: Address feedback Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: components/policy/core/common/cloud/cloud_policy_validator_unittest.cc
diff --git a/components/policy/core/common/cloud/cloud_policy_validator_unittest.cc b/components/policy/core/common/cloud/cloud_policy_validator_unittest.cc
index e0a7f980d3c6f9792e7ad7e3cc14bacc308761fc..15181349dda38780924b935c8a5e0ef4e5482754 100644
--- a/components/policy/core/common/cloud/cloud_policy_validator_unittest.cc
+++ b/components/policy/core/common/cloud/cloud_policy_validator_unittest.cc
@@ -107,10 +107,12 @@ class CloudPolicyValidatorTest : public testing::Test {
cached_key_signature_,
GetPolicyVerificationKey(),
owning_domain_);
- validator->ValidateSignature(public_key,
- GetPolicyVerificationKey(),
- owning_domain_,
- allow_key_rotation_);
+ if (allow_key_rotation_) {
+ validator->ValidateSignatureAllowingRotation(
+ public_key, GetPolicyVerificationKey(), owning_domain_);
+ } else {
+ validator->ValidateSignature(public_key);
+ }
if (allow_key_rotation_)
validator->ValidateInitialKey(GetPolicyVerificationKey(), owning_domain_);
Mattias Nissler (ping if slow) 2016/11/14 08:46:46 nit: it seems worthwhile to fold this line into th
emaxx 2016/11/14 16:27:07 Good point, done. Actually, after the refactoring
return base::WrapUnique(validator);

Powered by Google App Engine
This is Rietveld 408576698