blob: 150f276031575685502d60b3fa1ea0780e699837 [file] [log] [blame]
Greg Kerr888f1ce2019-01-31 10:49:11 -08001// Copyright 2019 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef DEBUGD_SRC_SCHEDULER_CONFIGURATION_TOOL_H_
6#define DEBUGD_SRC_SCHEDULER_CONFIGURATION_TOOL_H_
7
8#include <string>
9
10#include <base/macros.h>
11#include <brillo/errors/error.h>
12
13namespace debugd {
14
15class SchedulerConfigurationTool {
16 public:
17 SchedulerConfigurationTool() = default;
18 ~SchedulerConfigurationTool() = default;
19
20 // This sets the core sharing policy.
Abhishek Bhardwaj08d907e2019-08-27 14:22:41 -070021 bool SetPolicy(const std::string& policy,
22 bool lock_policy,
23 brillo::ErrorPtr* error);
Greg Kerr888f1ce2019-01-31 10:49:11 -080024
25 private:
Abhishek Bhardwaj08d907e2019-08-27 14:22:41 -070026 // Set to true when |SetAndLockConservativePolicy| is called for the first
27 // time. If set to |true| can't be set to false and configuration policy can't
28 // be changed.
29 bool policy_locked_conservative_ = false;
30
Greg Kerr888f1ce2019-01-31 10:49:11 -080031 DISALLOW_COPY_AND_ASSIGN(SchedulerConfigurationTool);
32};
33
34} // namespace debugd
35
36#endif // DEBUGD_SRC_SCHEDULER_CONFIGURATION_TOOL_H_