update_engine: Replace FileWatcher.
base::MessageLoop::WatchFileDescriptor() is removed in the next uprev.
This CL replaces the uses (including indirect uses), by FileDescriptorWatcher.
BUG=chromium:909719
TEST=Built locally. Ran cros_run_unit_tests.
Change-Id: Ide9f94daf2be28696ec6bc1f82ab46a2bd2b6c6f
diff --git a/common/subprocess.h b/common/subprocess.h
index bc19d16..bac9e48 100644
--- a/common/subprocess.h
+++ b/common/subprocess.h
@@ -25,6 +25,7 @@
#include <vector>
#include <base/callback.h>
+#include <base/files/file_descriptor_watcher_posix.h>
#include <base/logging.h>
#include <base/macros.h>
#include <brillo/asynchronous_signal_handler_interface.h>
@@ -120,8 +121,7 @@
// These are used to monitor the stdout of the running process, including
// the stderr if it was redirected.
- brillo::MessageLoop::TaskId stdout_task_id{
- brillo::MessageLoop::kTaskIdNull};
+ std::unique_ptr<base::FileDescriptorWatcher::Controller> stdout_controller;
int stdout_fd{-1};
std::string stdout;
};