blob: 1ab829c0522909cba9289fdc93add73ea9510655 [file] [log] [blame]
// Copyright (c) 2012 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 "permission_broker/rule.h"
namespace permission_broker {
const char *Rule::ResultToString(const Result &result) {
switch (result) {
case ALLOW:
return "ALLOW";
case DENY:
return "DENY";
case IGNORE:
return "IGNORE";
default:
return "INVALID";
}
}
Rule::Rule(const std::string &name) : name_(name) {}
const std::string &Rule::name() const {
return name_;
}
} // namespace permission_broker