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

Unified Diff: content/browser/dom_storage/dom_storage_task_runner.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 side-by-side diff with in-line comments
Download patch
Index: content/browser/dom_storage/dom_storage_task_runner.cc
diff --git a/content/browser/dom_storage/dom_storage_task_runner.cc b/content/browser/dom_storage/dom_storage_task_runner.cc
index 738be983203a2146d0b873105597e8a10a15e38a..edfdc722b26075c091b9fb9a106d8a1f745a7327 100644
--- a/content/browser/dom_storage/dom_storage_task_runner.cc
+++ b/content/browser/dom_storage/dom_storage_task_runner.cc
@@ -24,9 +24,9 @@ DOMStorageWorkerPoolTaskRunner::DOMStorageWorkerPoolTaskRunner(
DOMStorageWorkerPoolTaskRunner::~DOMStorageWorkerPoolTaskRunner() = default;
-bool DOMStorageWorkerPoolTaskRunner::RunsTasksOnCurrentThread() const {
- // It is valid for an implementation to always return true.
- return true;
+bool DOMStorageWorkerPoolTaskRunner::RunsTasksInCurrentSequence() const {
+ return primary_sequence_->RunsTasksOnCurrentThread() ||
+ commit_sequence_->RunsTasksOnCurrentThread();
}
bool DOMStorageWorkerPoolTaskRunner::PostDelayedTask(
@@ -68,8 +68,8 @@ MockDOMStorageTaskRunner::MockDOMStorageTaskRunner(
MockDOMStorageTaskRunner::~MockDOMStorageTaskRunner() = default;
-bool MockDOMStorageTaskRunner::RunsTasksOnCurrentThread() const {
- return task_runner_->RunsTasksOnCurrentThread();
+bool MockDOMStorageTaskRunner::RunsTasksInCurrentSequence() const {
+ return task_runner_->RunsTasksInCurrentSequence();
}
bool MockDOMStorageTaskRunner::PostDelayedTask(
« no previous file with comments | « content/browser/dom_storage/dom_storage_task_runner.h ('k') | content/browser/startup_task_runner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698