update_engine: Update libchrome APIs to r405848
The new libchrome has been ported from Chromium and some APIs have
changed. Make necessary changes at call sites.
Notable changes from libchrome:
- base::Bind() now explicitly disallows captures in lambdas (which was
never allowed in the style guide), so lambdas should now be written in
a way that take the captures as parameters.
Bug: 29104761
Test: All tests in update_engine_unittest pass on dragonboard-eng build
Change-Id: Iec04c126630fd876114076e3cb10cf917c8817b0
diff --git a/common/subprocess_unittest.cc b/common/subprocess_unittest.cc
index cc1f353..58d4191 100644
--- a/common/subprocess_unittest.cc
+++ b/common/subprocess_unittest.cc
@@ -249,13 +249,13 @@
fifo_fd,
MessageLoop::WatchMode::kWatchRead,
false,
- base::Bind([fifo_fd, tag] {
+ base::Bind([](int fifo_fd, uint32_t tag) {
char c;
EXPECT_EQ(1, HANDLE_EINTR(read(fifo_fd, &c, 1)));
EXPECT_EQ('X', c);
LOG(INFO) << "Killing tag " << tag;
Subprocess::Get().KillExec(tag);
- }));
+ }, fifo_fd, tag));
// This test would leak a callback that runs when the child process exits
// unless we wait for it to run.