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

Unified Diff: base/task.h

Issue 8120015: Add ScopedClosureRunner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unittests Created 9 years, 2 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
« no previous file with comments | « no previous file | base/task.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task.h
diff --git a/base/task.h b/base/task.h
index 4a33de0e1f5d0fa378ea016d91a056f772b2d6a7..69112c1cd7244875bec678061c36761236344808 100644
--- a/base/task.h
+++ b/base/task.h
@@ -7,6 +7,7 @@
#pragma once
#include "base/base_export.h"
+#include "base/callback.h"
#include "base/debug/alias.h"
#include "base/memory/raw_scoped_refptr_mismatch_checker.h"
#include "base/memory/weak_ptr.h"
@@ -566,6 +567,19 @@ class BASE_EXPORT ScopedTaskRunner {
DISALLOW_IMPLICIT_CONSTRUCTORS(ScopedTaskRunner);
};
+class BASE_EXPORT ScopedClosureRunner {
+ public:
+ explicit ScopedClosureRunner(const Closure& closure);
+ ~ScopedClosureRunner();
+
+ Closure Release();
+
+ private:
+ Closure closure_;
+
+ DISALLOW_IMPLICIT_CONSTRUCTORS(ScopedClosureRunner);
+};
+
namespace subtle {
// This class is meant for use in the implementation of MessageLoop classes
« no previous file with comments | « no previous file | base/task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698