aboutsummaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
authorLuis Hector Chavez <lhchavez@google.com>2016-07-18 16:08:56 -0700
committerLuis Hector Chavez <lhchavez@google.com>2016-07-22 18:21:09 +0000
commit17f710e0eccdb78996c6e3ee65b03d43c18e1d8b (patch)
tree8ad4bf145f87a298e2e50688814c8a664577d635 /src/commands
parent637be7990843742d7ac6910ea909dcb09e9df175 (diff)
downloadlibweave-17f710e0eccdb78996c6e3ee65b03d43c18e1d8b.tar.gz
libweave: 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 are: - base::Bind() now explicitly disallows captures in lambdas (which was never allowed in the style guide). - base::ListValue::iterator now exposes std::unique_ptr<base::Value> instead of raw base::Value*. BUG=29104761 TEST=All tests in libweave_test pass on dragonboard-eng build TEST=make testall Change-Id: Ifb2d4f83f9f92b8ded5f12ac1c622e8ab5549b7d Reviewed-on: https://weave-review.googlesource.com/4185 Reviewed-by: Robert Ginda <rginda@google.com>
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/command_queue_unittest.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/commands/command_queue_unittest.cc b/src/commands/command_queue_unittest.cc
index 1e2e0ac..a590a36 100644
--- a/src/commands/command_queue_unittest.cc
+++ b/src/commands/command_queue_unittest.cc
@@ -151,10 +151,13 @@ TEST_F(CommandQueueTest, CleanupMultipleCommands) {
queue_.Add(CreateDummyCommandInstance("base.reboot", id1));
queue_.Add(CreateDummyCommandInstance("base.reboot", id2));
- auto remove_task = [this](const std::string& id) { queue_.RemoveLater(id); };
- remove_task(id1);
- task_runner_.PostDelayedTask(FROM_HERE, base::Bind(remove_task, id2),
- base::TimeDelta::FromSeconds(10));
+ auto remove_task = [](CommandQueue* queue, const std::string& id) {
+ queue->RemoveLater(id);
+ };
+ remove_task(&queue_, id1);
+ task_runner_.PostDelayedTask(
+ FROM_HERE, base::Bind(remove_task, base::Unretained(&queue_), id2),
+ base::TimeDelta::FromSeconds(10));
EXPECT_EQ(2u, queue_.GetCount());
ASSERT_EQ(2u, task_runner_.GetTaskQueueSize());
task_runner_.RunOnce(); // Executes "remove_task(id2) @ T+10s".