blob: 35d0bf6f6b98e157a53dcc47e604d7252d82b05f [file] [log] [blame]
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <memory>
#include <string>
#include <base/optional.h>
#include <base/values.h>
namespace runtime_probe {
// Data structure to store different data extraced from probe config file.
struct ProbeConfigData {
base::Value config;
std::string sha1_hash;
// Parse |config_file_path|, the path of file containing probe config in json
base::Optional<ProbeConfigData> ParseProbeConfig(
const std::string& config_file_path);
// Determine if allowed to load probe config assigned from CLI.
// Return true on success (allowed / load default instead), false for error.
// |probe_config_path| will be the allowed path if success.
bool GetProbeConfigPath(const std::string& probe_config_path_from_cli,
std::string* probe_config_path);
} // namespace runtime_probe