chromium/chrome/browser/enterprise/connectors/device_trust/key_management/installer/management_service/rotate_util.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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[] =;

// Returns decoded value from the base-64 `encoded_value`, or null
// in case of a decoding error. The returned value is an opaque binary
// blob and should not be treated as an ASCII or UTF-8 string.
std::optional<std::string> Decode(const std::string& encoded_value) {}

}  // namespace

KeyRotationResult RotateDeviceTrustKey(
    std::unique_ptr<KeyRotationManager> key_rotation_manager,
    const base::CommandLine& command_line,
    version_info::Channel channel) {}

}  // namespace enterprise_connectors