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

Unified Diff: content/browser/dom_storage/dom_storage_task_runner.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 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..fae47d7cb990436f601c3dc7fc95db2bed2e9918 100644
--- a/content/browser/dom_storage/dom_storage_task_runner.cc
+++ b/content/browser/dom_storage/dom_storage_task_runner.cc
@@ -24,9 +24,10 @@ 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 true;
gab 2017/04/19 18:37:56 nit: remove this leftover
+ return primary_sequence_->RunsTasksOnCurrentThread() ||
+ commit_sequence_->RunsTasksOnCurrentThread();
gab 2017/04/19 18:37:56 nit: git cl format? I'd expect this to be indented
}
bool DOMStorageWorkerPoolTaskRunner::PostDelayedTask(
@@ -68,8 +69,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(

Powered by Google App Engine
This is Rietveld 408576698