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

Unified Diff: content/browser/dom_storage/dom_storage_task_runner.h

Issue 2726523002: Pass Callback to TaskRunner by value and consume it on invocation (1) (Closed)
Patch Set: erase Closure* Created 3 years, 9 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.h
diff --git a/content/browser/dom_storage/dom_storage_task_runner.h b/content/browser/dom_storage/dom_storage_task_runner.h
index 67f400fa632813eeb15827a922e1c9441ef281c3..6dcbe78320fd6f6c9375e18ced97477933f1ef0f 100644
--- a/content/browser/dom_storage/dom_storage_task_runner.h
+++ b/content/browser/dom_storage/dom_storage_task_runner.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_TASK_RUNNER_H_
#define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_TASK_RUNNER_H_
+#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/sequence_checker.h"
#include "base/sequenced_task_runner.h"
@@ -33,14 +34,14 @@ class CONTENT_EXPORT DOMStorageTaskRunner
// The PostTask() and PostDelayedTask() methods defined by TaskRunner
// post shutdown-blocking tasks on the primary sequence.
bool PostDelayedTask(const tracked_objects::Location& from_here,
- const base::Closure& task,
+ base::Closure task,
base::TimeDelta delay) override = 0;
// Posts a shutdown blocking task to |sequence_id|.
virtual bool PostShutdownBlockingTask(
const tracked_objects::Location& from_here,
SequenceID sequence_id,
- const base::Closure& task) = 0;
+ base::Closure task) = 0;
virtual void AssertIsRunningOnPrimarySequence() const = 0;
virtual void AssertIsRunningOnCommitSequence() const = 0;
@@ -65,12 +66,12 @@ class CONTENT_EXPORT DOMStorageWorkerPoolTaskRunner :
bool RunsTasksOnCurrentThread() const override;
bool PostDelayedTask(const tracked_objects::Location& from_here,
- const base::Closure& task,
+ base::Closure task,
base::TimeDelta delay) override;
bool PostShutdownBlockingTask(const tracked_objects::Location& from_here,
SequenceID sequence_id,
- const base::Closure& task) override;
+ base::Closure task) override;
void AssertIsRunningOnPrimarySequence() const override;
void AssertIsRunningOnCommitSequence() const override;
@@ -102,12 +103,12 @@ class CONTENT_EXPORT MockDOMStorageTaskRunner :
bool RunsTasksOnCurrentThread() const override;
bool PostDelayedTask(const tracked_objects::Location& from_here,
- const base::Closure& task,
+ base::Closure task,
base::TimeDelta delay) override;
bool PostShutdownBlockingTask(const tracked_objects::Location& from_here,
SequenceID sequence_id,
- const base::Closure& task) override;
+ base::Closure task) override;
void AssertIsRunningOnPrimarySequence() const override;
void AssertIsRunningOnCommitSequence() const override;
« no previous file with comments | « content/browser/compositor/reflector_impl_unittest.cc ('k') | content/browser/dom_storage/dom_storage_task_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698