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

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

Issue 2823103003: Introduce TaskRunner::RunsTasksInCurrentSequence() (Closed)
Patch Set: rebase & remove inline keyword Created 3 years, 7 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
« no previous file with comments | « cc/test/ordered_simple_task_runner.cc ('k') | chrome/browser/after_startup_task_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 decode_client2.result()); 591 decode_client2.result());
592 592
593 // Reset the controller since the order of destruction is wrong in this test 593 // Reset the controller since the order of destruction is wrong in this test
594 // (|other_cache| should outlive the controller. This is normally done via 594 // (|other_cache| should outlive the controller. This is normally done via
595 // SetImageDecodeCache(nullptr) or it can be done in the dtor of the cache.) 595 // SetImageDecodeCache(nullptr) or it can be done in the dtor of the cache.)
596 ResetController(); 596 ResetController();
597 } 597 }
598 598
599 } // namespace 599 } // namespace
600 } // namespace cc 600 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/ordered_simple_task_runner.cc ('k') | chrome/browser/after_startup_task_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698