update_engine: Run clang-format on common/
BUG=none
TEST=unittest
Change-Id: Icdaf5017e03a197bc576f08f4b8dcdd00cff217c
Reviewed-on: https://chromium-review.googlesource.com/1407541
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Sen Jiang <senj@chromium.org>
diff --git a/common/test_utils.h b/common/test_utils.h
index 5be48cf..44b7aa1 100644
--- a/common/test_utils.h
+++ b/common/test_utils.h
@@ -87,14 +87,14 @@
class ScopedFilesystemUnmounter {
public:
explicit ScopedFilesystemUnmounter(const std::string& mountpoint)
- : mountpoint_(mountpoint),
- should_unmount_(true) {}
+ : mountpoint_(mountpoint), should_unmount_(true) {}
~ScopedFilesystemUnmounter() {
if (should_unmount_) {
utils::UnmountFilesystem(mountpoint_);
}
}
void set_should_unmount(bool unmount) { should_unmount_ = unmount; }
+
private:
const std::string mountpoint_;
bool should_unmount_;
@@ -183,10 +183,10 @@
class NoneType;
-template<typename T>
+template <typename T>
class ObjectFeederAction;
-template<typename T>
+template <typename T>
class ActionTraits<ObjectFeederAction<T>> {
public:
typedef T OutputObjectType;
@@ -195,7 +195,7 @@
// This is a simple Action class for testing. It feeds an object into
// another action.
-template<typename T>
+template <typename T>
class ObjectFeederAction : public Action<ObjectFeederAction<T>> {
public:
typedef NoneType InputObjectType;
@@ -210,17 +210,16 @@
}
static std::string StaticType() { return "ObjectFeederAction"; }
std::string Type() const { return StaticType(); }
- void set_obj(const T& out_obj) {
- out_obj_ = out_obj;
- }
+ void set_obj(const T& out_obj) { out_obj_ = out_obj; }
+
private:
T out_obj_;
};
-template<typename T>
+template <typename T>
class ObjectCollectorAction;
-template<typename T>
+template <typename T>
class ActionTraits<ObjectCollectorAction<T>> {
public:
typedef NoneType OutputObjectType;
@@ -229,7 +228,7 @@
// This is a simple Action class for testing. It receives an object from
// another action.
-template<typename T>
+template <typename T>
class ObjectCollectorAction : public Action<ObjectCollectorAction<T>> {
public:
typedef T InputObjectType;
@@ -245,6 +244,7 @@
static std::string StaticType() { return "ObjectCollectorAction"; }
std::string Type() const { return StaticType(); }
const T& object() const { return object_; }
+
private:
T object_;
};