permission_broker: fix linter issues
Fixed various issues reported by cpplint.py when run on
src/platform2/permission_broker.
BUG=None
TEST=cpplint.py `find permission_broker/* | grep "\.cc\|\.h"`
FEATURES=test emerge-link permission_broker
Change-Id: I865cec67f903360b3b66893a2fda0ff3877dc682
Reviewed-on: https://chromium-review.googlesource.com/210598
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Steve Fung <stevefung@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/permission_broker/allow_hidraw_device_rule.cc b/permission_broker/allow_hidraw_device_rule.cc
index 45716c2..dd82ba2 100644
--- a/permission_broker/allow_hidraw_device_rule.cc
+++ b/permission_broker/allow_hidraw_device_rule.cc
@@ -6,8 +6,6 @@
#include <libudev.h>
-using std::string;
-
namespace permission_broker {
AllowHidrawDeviceRule::AllowHidrawDeviceRule()
diff --git a/permission_broker/deny_unsafe_hidraw_device_rule.cc b/permission_broker/deny_unsafe_hidraw_device_rule.cc
index 3020bbd..2133e75 100644
--- a/permission_broker/deny_unsafe_hidraw_device_rule.cc
+++ b/permission_broker/deny_unsafe_hidraw_device_rule.cc
@@ -4,9 +4,9 @@
#include <libudev.h>
-#include "permission_broker/deny_unsafe_hidraw_device_rule.h"
+#include <vector>
-using std::string;
+#include "permission_broker/deny_unsafe_hidraw_device_rule.h"
namespace permission_broker {
@@ -46,7 +46,7 @@
return false;
}
-}
+} // namespace
DenyUnsafeHidrawDeviceRule::DenyUnsafeHidrawDeviceRule()
: HidrawSubsystemUdevRule("DenyUnsafeHidrawDeviceRule") {}
diff --git a/permission_broker/deny_unsafe_hidraw_device_rule_unittest.cc b/permission_broker/deny_unsafe_hidraw_device_rule_unittest.cc
index 304b878..c241d49 100644
--- a/permission_broker/deny_unsafe_hidraw_device_rule_unittest.cc
+++ b/permission_broker/deny_unsafe_hidraw_device_rule_unittest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <vector>
+
#include <gtest/gtest.h>
#include "base/logging.h"
diff --git a/permission_broker/hidraw_subsystem_udev_rule.h b/permission_broker/hidraw_subsystem_udev_rule.h
index de55789..4d0a54b 100644
--- a/permission_broker/hidraw_subsystem_udev_rule.h
+++ b/permission_broker/hidraw_subsystem_udev_rule.h
@@ -18,7 +18,7 @@
// ignored by this rule.
class HidrawSubsystemUdevRule : public UdevRule {
public:
- HidrawSubsystemUdevRule(const std::string &name);
+ explicit HidrawSubsystemUdevRule(const std::string &name);
virtual ~HidrawSubsystemUdevRule();
// Called with every device belonging to the hidraw subsystem.
diff --git a/permission_broker/udev_scopers.h b/permission_broker/udev_scopers.h
index a028ab2..8700140 100644
--- a/permission_broker/udev_scopers.h
+++ b/permission_broker/udev_scopers.h
@@ -29,4 +29,4 @@
} // namespace permission_broker
-#endif // PERMISSION_BROKER_UDEV_SCOPERS_H_
\ No newline at end of file
+#endif // PERMISSION_BROKER_UDEV_SCOPERS_H_