Revert "libprocessgroup: Remove dependency on libcgrouprc"
Revert submission 3212512
Reason for revert: Droidmonitor created revert due to b/372273614. Will be verifying through ABTD before submission.
Reverted changes: /q/submissionid:3212512
Change-Id: I15c7763467cd9f65d4b389b2d4ccaff92012f21f
diff --git a/libprocessgroup/cgroup_map.h b/libprocessgroup/cgroup_map.h
index 5ad59bd..3642794 100644
--- a/libprocessgroup/cgroup_map.h
+++ b/libprocessgroup/cgroup_map.h
@@ -18,17 +18,15 @@
#include <sys/types.h>
-#include <cstdint>
#include <string>
-#include <processgroup/cgroup_controller.h>
-#include <processgroup/util.h>
+#include <android/cgrouprc.h>
-// Convenient wrapper of a CgroupController pointer.
+// Convenient wrapper of an ACgroupController pointer.
class CgroupControllerWrapper {
public:
// Does not own controller
- explicit CgroupControllerWrapper(const CgroupController* controller)
+ explicit CgroupControllerWrapper(const ACgroupController* controller)
: controller_(controller) {}
uint32_t version() const;
@@ -49,7 +47,7 @@
MISSING = 2,
};
- const CgroupController* controller_ = nullptr; // CgroupMap owns the object behind this pointer
+ const ACgroupController* controller_ = nullptr;
ControllerState state_ = ControllerState::UNKNOWN;
};
@@ -62,8 +60,7 @@
private:
bool loaded_ = false;
- CgroupDescriptorMap descriptors_;
CgroupMap();
- bool LoadDescriptors();
+ bool LoadRcFile();
void Print() const;
};