| Index: chrome/browser/policy/test/local_policy_test_server.cc
|
| diff --git a/chrome/browser/policy/test/local_policy_test_server.cc b/chrome/browser/policy/test/local_policy_test_server.cc
|
| index f336af1d07e37b7373272052e2a1f4d9a210fe9f..d2fa7db11f9349178f812641ff035bfc17ba4612 100644
|
| --- a/chrome/browser/policy/test/local_policy_test_server.cc
|
| +++ b/chrome/browser/policy/test/local_policy_test_server.cc
|
| @@ -15,6 +15,7 @@
|
| #include "base/json/json_writer.h"
|
| #include "base/path_service.h"
|
| #include "base/strings/stringprintf.h"
|
| +#include "base/values.h"
|
| #include "build/build_config.h"
|
| #include "components/policy/core/common/cloud/cloud_policy_constants.h"
|
| #include "crypto/rsa_private_key.h"
|
| @@ -114,6 +115,10 @@ bool LocalPolicyTestServer::SetSigningKeyAndSignature(
|
| return bytes_written == static_cast<int>(signature.size());
|
| }
|
|
|
| +void LocalPolicyTestServer::EnableAutomaticRotationOfSigningKeys() {
|
| + automatic_rotation_of_signing_keys_enabled_ = true;
|
| +}
|
| +
|
| void LocalPolicyTestServer::RegisterClient(const std::string& dm_token,
|
| const std::string& device_id) {
|
| CHECK(server_data_dir_.IsValid());
|
| @@ -237,6 +242,10 @@ bool LocalPolicyTestServer::GenerateAdditionalArguments(
|
| arguments->SetString("config-file", config_file_.AsUTF8Unsafe());
|
| if (!policy_key_.empty())
|
| arguments->SetString("policy-key", policy_key_.AsUTF8Unsafe());
|
| + if (automatic_rotation_of_signing_keys_enabled_) {
|
| + arguments->Set("rotate-policy-keys-automatically",
|
| + base::Value::CreateNullValue());
|
| + }
|
| if (server_data_dir_.IsValid()) {
|
| arguments->SetString("data-dir", server_data_dir_.GetPath().AsUTF8Unsafe());
|
|
|
|
|