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

Unified Diff: base/task.h

Issue 9022034: Convert various ReleaseSoon methods to use base::Bind() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test Created 9 years 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 | « base/message_loop_proxy.cc ('k') | chrome/browser/sync/glue/http_bridge_unittest.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 7e87ff72abc4067e94190f2c459b0363707c83a2..b546af5193347c02c31174c0f3c623b1bde0e7f7 100644
--- a/base/task.h
+++ b/base/task.h
@@ -224,35 +224,12 @@ class DeleteTask : public CancelableTask {
const T* obj_;
};
-// Task to Release() an object
-template<class T>
-class ReleaseTask : public CancelableTask {
- public:
- explicit ReleaseTask(const T* obj) : obj_(obj) {
- }
- virtual void Run() {
- if (obj_)
- obj_->Release();
- }
- virtual void Cancel() {
- obj_ = NULL;
- }
-
- private:
- const T* obj_;
-};
-
// Equivalents for use by base::Bind().
template<typename T>
void DeletePointer(T* obj) {
delete obj;
}
-template<typename T>
-void ReleasePointer(T* obj) {
- obj->Release();
-}
-
// RunnableMethodTraits --------------------------------------------------------
//
// This traits-class is used by RunnableMethod to manage the lifetime of the
« no previous file with comments | « base/message_loop_proxy.cc ('k') | chrome/browser/sync/glue/http_bridge_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698