update_engine: changes for libchrome r680000 uprev
Changes applied include:
Replace arraysize by base::size.
Replace base::MessageLoop::current()->task_runner by
base::ThreadTaskRunnerHandle::Get, and
base::MessageLoopForIO::current by base::MessageLoopCurrent::IsSet.
Remove use of base::ContainsKey.
Replace base::Int{,64}ToString by base::NumberTostring.
The changes are all compatible with current libchrome r576279.
BUG=chromium:1054279
TEST=unittest
Change-Id: Ibb6027a5070e0e2d4554a6684350168542fedf5e
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2065691
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Tested-by: Qijiang Fan <fqj@google.com>
Commit-Queue: Qijiang Fan <fqj@google.com>
diff --git a/common/subprocess.cc b/common/subprocess.cc
index 24ad2d9..45dff92 100644
--- a/common/subprocess.cc
+++ b/common/subprocess.cc
@@ -29,6 +29,7 @@
#include <base/bind.h>
#include <base/logging.h>
#include <base/posix/eintr_wrapper.h>
+#include <base/stl_util.h>
#include <base/strings/string_util.h>
#include <base/strings/stringprintf.h>
#include <brillo/process.h>
@@ -122,7 +123,7 @@
bytes_read = 0;
bool eof;
bool ok = utils::ReadAll(
- record->stdout_fd, buf, arraysize(buf), &bytes_read, &eof);
+ record->stdout_fd, buf, base::size(buf), &bytes_read, &eof);
record->stdout.append(buf, bytes_read);
if (!ok || eof) {
// There was either an error or an EOF condition, so we are done watching