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

Unified Diff: webkit/dom_storage/dom_storage_task_runner.cc

Issue 9389009: Hook up DomStorageArea with a DomStorageDatabase. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename CommitChanges* methods. Created 8 years, 10 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: webkit/dom_storage/dom_storage_task_runner.cc
diff --git a/webkit/dom_storage/dom_storage_task_runner.cc b/webkit/dom_storage/dom_storage_task_runner.cc
index 6a1afb5a123f29bba0d3ab8440df06753d4c41df..e44962e68eb229e0283615f3b331328ec510af66 100644
--- a/webkit/dom_storage/dom_storage_task_runner.cc
+++ b/webkit/dom_storage/dom_storage_task_runner.cc
@@ -20,17 +20,18 @@ DomStorageTaskRunner::DomStorageTaskRunner(
DomStorageTaskRunner::~DomStorageTaskRunner() {
}
-void DomStorageTaskRunner::PostTask(
+bool DomStorageTaskRunner::PostTask(
const tracked_objects::Location& from_here,
const base::Closure& task) {
- message_loop_->PostTask(from_here, task);
+ return message_loop_->PostTask(from_here, task);
}
-void DomStorageTaskRunner::PostDelayedTask(
+bool DomStorageTaskRunner::PostDelayedTask(
const tracked_objects::Location& from_here,
const base::Closure& task,
base::TimeDelta delay) {
- message_loop_->PostDelayedTask(from_here, task, delay.InMilliseconds());
+ return message_loop_->PostDelayedTask(from_here, task,
+ delay.InMilliseconds());
}
// DomStorageWorkerPoolTaskRunner
@@ -47,25 +48,34 @@ DomStorageWorkerPoolTaskRunner::DomStorageWorkerPoolTaskRunner(
DomStorageWorkerPoolTaskRunner::~DomStorageWorkerPoolTaskRunner() {
}
-void DomStorageWorkerPoolTaskRunner::PostTask(
+bool DomStorageWorkerPoolTaskRunner::PostTask(
const tracked_objects::Location& from_here,
const base::Closure& task) {
// TODO(michaeln): Do all tasks need to be run prior to shutdown?
// Maybe make better use of the SHUTDOWN_BEHAVIOR.
- sequenced_worker_pool_->PostSequencedWorkerTask(
+ return sequenced_worker_pool_->PostSequencedWorkerTask(
sequence_token_, from_here, task);
}
-void DomStorageWorkerPoolTaskRunner::PostDelayedTask(
+bool DomStorageWorkerPoolTaskRunner::PostDelayedTask(
const tracked_objects::Location& from_here,
const base::Closure& task,
base::TimeDelta delay) {
// Post a task to call this->PostTask() after the delay.
- message_loop_->PostDelayedTask(
+ return message_loop_->PostDelayedTask(
FROM_HERE,
- base::Bind(&DomStorageWorkerPoolTaskRunner::PostTask, this,
+ base::Bind(&DomStorageWorkerPoolTaskRunner::PostTaskVoid, this,
michaeln 2012/02/15 04:10:53 You may be able to use base::IgnoreResult() on the
benm (inactive) 2012/02/15 17:38:17 I think the best I can do is wrap a call to PostTa
from_here, task),
delay.InMilliseconds());
}
+void DomStorageWorkerPoolTaskRunner::PostTaskVoid(
+ const tracked_objects::Location& from_here,
+ const base::Closure& task) {
+ // TODO(michaeln): Do all tasks need to be run prior to shutdown?
+ // Maybe make better use of the SHUTDOWN_BEHAVIOR.
+ sequenced_worker_pool_->PostSequencedWorkerTask(
+ sequence_token_, from_here, task);
+}
+
} // namespace dom_storage
« webkit/dom_storage/dom_storage_area.cc ('K') | « webkit/dom_storage/dom_storage_task_runner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698