#include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command_factory.h"
#include <memory>
#include <optional>
#include "base/no_destructor.h"
#include "base/notreached.h"
#include "build/build_config.h"
#include "chrome/browser/enterprise/connectors/device_trust/device_trust_features.h"
#include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command.h"
#include "components/enterprise/browser/controller/browser_dm_token_storage.h"
#include "components/policy/core/common/cloud/device_management_service.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#if BUILDFLAG(IS_WIN)
#include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/win_key_rotation_command.h"
#elif BUILDFLAG(IS_LINUX)
#include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/linux_key_rotation_command.h"
#elif BUILDFLAG(IS_MAC)
#include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/mac_key_rotation_command.h"
#endif
namespace enterprise_connectors {
namespace {
std::optional<KeyRotationCommandFactory*>& GetTestInstanceStorage() { … }
}
KeyRotationCommandFactory::~KeyRotationCommandFactory() = default;
KeyRotationCommandFactory* KeyRotationCommandFactory::GetInstance() { … }
std::unique_ptr<KeyRotationCommand> KeyRotationCommandFactory::CreateCommand(
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
policy::BrowserDMTokenStorage* dm_token_storage,
policy::DeviceManagementService* device_management_service) { … }
void KeyRotationCommandFactory::SetFactoryInstanceForTesting(
KeyRotationCommandFactory* factory) { … }
void KeyRotationCommandFactory::ClearFactoryInstanceForTesting() { … }
}