Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Unified Diff: cc/tiles/image_controller_unittest.cc

Issue 2637843002: Migrate base::TaskRunner from Closure to OnceClosure (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/ordered_simple_task_runner.cc ('k') | cc/tiles/tile_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/image_controller_unittest.cc
diff --git a/cc/tiles/image_controller_unittest.cc b/cc/tiles/image_controller_unittest.cc
index 6e6dc247d87817c086a8d4d65c805d376f351472..b0eec200d7d142dbadb21399f485aa3a48073a8f 100644
--- a/cc/tiles/image_controller_unittest.cc
+++ b/cc/tiles/image_controller_unittest.cc
@@ -26,7 +26,7 @@ class TestWorkerThread : public base::SimpleThread {
void Run() override {
for (;;) {
- base::Closure task;
+ base::OnceClosure task;
{
base::AutoLock hold(lock_);
if (shutdown_)
@@ -50,7 +50,7 @@ class TestWorkerThread : public base::SimpleThread {
condition_.Signal();
}
- void PostTask(base::Closure task) {
+ void PostTask(base::OnceClosure task) {
base::AutoLock hold(lock_);
queue_.push_back(std::move(task));
condition_.Signal();
@@ -59,7 +59,7 @@ class TestWorkerThread : public base::SimpleThread {
private:
base::Lock lock_;
base::ConditionVariable condition_;
- std::vector<base::Closure> queue_;
+ std::vector<base::OnceClosure> queue_;
bool shutdown_ = false;
};
@@ -68,13 +68,13 @@ class WorkerTaskRunner : public base::SequencedTaskRunner {
WorkerTaskRunner() { thread_.Start(); }
bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
- base::Closure task,
+ base::OnceClosure task,
base::TimeDelta delay) override {
return PostDelayedTask(from_here, std::move(task), delay);
}
bool PostDelayedTask(const tracked_objects::Location& from_here,
- base::Closure task,
+ base::OnceClosure task,
base::TimeDelta delay) override {
thread_.PostTask(std::move(task));
return true;
@@ -142,7 +142,7 @@ class TestableCache : public ImageDecodeCache {
class DecodeClient {
public:
DecodeClient() {}
- void Callback(base::Closure quit_closure,
+ void Callback(base::OnceClosure quit_closure,
ImageController::ImageDecodeRequestId id,
ImageController::ImageDecodeResult result) {
id_ = id;
« no previous file with comments | « cc/test/ordered_simple_task_runner.cc ('k') | cc/tiles/tile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698