blob: 53c8bed7c1ad08e5565e7cde705dfef09f20f691 [file] [log] [blame]
// Copyright 2023 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "runtime_probe/generic_probe_config_loader.h"
#include <memory>
#include <base/logging.h>
#include "runtime_probe/probe_config.h"
namespace runtime_probe {
std::unique_ptr<ProbeConfig> GenericProbeConfigLoader::Load() const {
if (CrosDebug() != CrosDebugFlag::kEnabled) {
LOG(ERROR) << "Arbitrary probe config is only allowed with cros_debug=1";
return {};
}
return ProbeConfig::FromFile(path_);
}
} // namespace runtime_probe