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

Unified Diff: base/message_loop.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 | « no previous file | base/message_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop.h
diff --git a/base/message_loop.h b/base/message_loop.h
index 573e7129cfb12d8f39879afe35c7ed6bd1eb6a0d..2f66d26889fc4a1bdec3a7e157816c69a2385c8a 100644
--- a/base/message_loop.h
+++ b/base/message_loop.h
@@ -246,7 +246,8 @@ class BASE_EXPORT MessageLoop : public base::MessagePump::Delegate {
template <class T>
void ReleaseSoon(const tracked_objects::Location& from_here,
const T* object) {
- PostNonNestableTask(from_here, new ReleaseTask<T>(object));
+ base::subtle::ReleaseHelperInternal<T, void>::ReleaseOnMessageLoop(
+ this, from_here, object);
}
// Run the message loop.
@@ -555,10 +556,15 @@ class BASE_EXPORT MessageLoop : public base::MessagePump::Delegate {
private:
template <class T, class R> friend class base::subtle::DeleteHelperInternal;
+ template <class T, class R> friend class base::subtle::ReleaseHelperInternal;
void DeleteSoonInternal(const tracked_objects::Location& from_here,
void(*deleter)(const void*),
const void* object);
+ void ReleaseSoonInternal(const tracked_objects::Location& from_here,
+ void(*releaser)(const void*),
+ const void* object);
+
DISALLOW_COPY_AND_ASSIGN(MessageLoop);
};
« no previous file with comments | « no previous file | base/message_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698