blob: 703895236aedb0c61eca1172ddaf82150f329ef5 [file] [log] [blame] [edit]
// 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 <libsegmentation/feature_management_fake.h>
namespace segmentation {
namespace fake {
bool FeatureManagementFake::IsFeatureEnabled(const std::string& name) const {
return system_features_properties_.count(name) > 0;
}
int FeatureManagementFake::GetFeatureLevel() const {
return system_features_level_;
}
void FeatureManagementFake::SetFeatureLevel(int level) {
system_features_level_ = level;
}
void FeatureManagementFake::SetFeature(const std::string& name) {
system_features_properties_.insert(name);
}
void FeatureManagementFake::UnsetFeature(const std::string& name) {
system_features_properties_.erase(name);
}
} // namespace fake
} // namespace segmentation