Being more compliant with CrOS code style will make it easier to make changes and to write test coverage.
0. Compile as C++, not C.
1. Use C++ constructs (e.g. strings and vectors) instead of manual allocations.
2. Use libchrome for various idioms, e.g. file reading or ScopedClosureRunner.
Example of makefile w/ libchrome: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/client/deps/glbench/src/Makefile
3. Use libchromeos to create a daemon. Not sure if there's an example of this in non-platform2 code. It might make sense to move to platform2 at this stage.
4. Create unit tests.
No rush to get this done quickly. It would make sense to do it if we wanted to convert it into a permanent daemon on CrOS.
Comment 1 by vapier@chromium.org
, May 4 2017