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/payload_consumer/postinstall_runner_action.h b/payload_consumer/postinstall_runner_action.h
index b9b7069..838b235 100644
--- a/payload_consumer/postinstall_runner_action.h
+++ b/payload_consumer/postinstall_runner_action.h
@@ -17,9 +17,11 @@
#ifndef UPDATE_ENGINE_PAYLOAD_CONSUMER_POSTINSTALL_RUNNER_ACTION_H_
#define UPDATE_ENGINE_PAYLOAD_CONSUMER_POSTINSTALL_RUNNER_ACTION_H_
+#include <memory>
#include <string>
#include <vector>
+#include <base/files/file_descriptor_watcher_posix.h>
#include <brillo/message_loops/message_loop.h>
#include <gtest/gtest_prod.h>
@@ -139,7 +141,7 @@
// The parent progress file descriptor used to watch for progress reports from
// the postinstall program and the task watching for them.
int progress_fd_{-1};
- brillo::MessageLoop::TaskId progress_task_{brillo::MessageLoop::kTaskIdNull};
+ std::unique_ptr<base::FileDescriptorWatcher::Controller> progress_controller_;
// A buffer of a partial read line from the progress file descriptor.
std::string progress_buffer_;