#include "chrome/browser/enterprise/connectors/device_trust/key_management/installer/management_service/rotate_util.h"
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include "base/base64.h"
#include "base/command_line.h"
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/syslog_logging.h"
#include "base/threading/scoped_blocking_call.h"
#include "chrome/browser/enterprise/connectors/device_trust/key_management/core/shared_command_constants.h"
#include "chrome/browser/enterprise/connectors/device_trust/key_management/installer/key_rotation_manager.h"
#include "chrome/browser/enterprise/connectors/device_trust/key_management/installer/management_service/metrics_utils.h"
#include "components/version_info/channel.h"
#include "url/gurl.h"
namespace enterprise_connectors {
namespace {
void RecordFailure(ManagementServiceError error,
const std::string& log_message) { … }
constexpr char kStableChannelHostName[] = …;
std::optional<std::string> Decode(const std::string& encoded_value) { … }
}
KeyRotationResult RotateDeviceTrustKey(
std::unique_ptr<KeyRotationManager> key_rotation_manager,
const base::CommandLine& command_line,
version_info::Channel channel) { … }
}