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

Side by Side Diff: cc/tiles/image_controller_unittest.cc

Issue 2823103003: Introduce TaskRunner::RunsTasksInCurrentSequence() (Closed)
Patch Set: fixed build error and commments 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/tiles/image_controller.h" 5 #include "cc/tiles/image_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/optional.h" 10 #include "base/optional.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 return PostDelayedTask(from_here, std::move(task), delay); 73 return PostDelayedTask(from_here, std::move(task), delay);
74 } 74 }
75 75
76 bool PostDelayedTask(const tracked_objects::Location& from_here, 76 bool PostDelayedTask(const tracked_objects::Location& from_here,
77 base::OnceClosure task, 77 base::OnceClosure task,
78 base::TimeDelta delay) override { 78 base::TimeDelta delay) override {
79 thread_.PostTask(std::move(task)); 79 thread_.PostTask(std::move(task));
80 return true; 80 return true;
81 } 81 }
82 82
83 bool RunsTasksOnCurrentThread() const override { return false; } 83 bool RunsTasksInCurrentSequence() const override { return false; }
84 84
85 protected: 85 protected:
86 ~WorkerTaskRunner() override { 86 ~WorkerTaskRunner() override {
87 thread_.Shutdown(); 87 thread_.Shutdown();
88 thread_.Join(); 88 thread_.Join();
89 } 89 }
90 90
91 TestWorkerThread thread_; 91 TestWorkerThread thread_;
92 }; 92 };
93 93
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 decode_client2.result()); 587 decode_client2.result());
588 588
589 // Reset the controller since the order of destruction is wrong in this test 589 // Reset the controller since the order of destruction is wrong in this test
590 // (|other_cache| should outlive the controller. This is normally done via 590 // (|other_cache| should outlive the controller. This is normally done via
591 // SetImageDecodeCache(nullptr) or it can be done in the dtor of the cache.) 591 // SetImageDecodeCache(nullptr) or it can be done in the dtor of the cache.)
592 ResetController(); 592 ResetController();
593 } 593 }
594 594
595 } // namespace 595 } // namespace
596 } // namespace cc 596 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698