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

Unified Diff: base/message_loop_proxy_impl.h

Issue 9997007: Objects that derive from RefCounted/RefCountedThreadSafe should not have public dtors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: virtual & DISALLOW Created 8 years, 8 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/message_pump.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop_proxy_impl.h
diff --git a/base/message_loop_proxy_impl.h b/base/message_loop_proxy_impl.h
index 88e1d45ad9418af312e7938373b31c0c8a9219b3..140c244aa92a43dc48552d3bd53d57d6d851855c 100644
--- a/base/message_loop_proxy_impl.h
+++ b/base/message_loop_proxy_impl.h
@@ -16,11 +16,8 @@ namespace base {
// A stock implementation of MessageLoopProxy that is created and managed by a
// MessageLoop. For now a MessageLoopProxyImpl can only be created as part of a
// MessageLoop.
-class BASE_EXPORT MessageLoopProxyImpl
- : public MessageLoopProxy {
+class BASE_EXPORT MessageLoopProxyImpl : public MessageLoopProxy {
public:
- virtual ~MessageLoopProxyImpl();
-
// MessageLoopProxy implementation
virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
const base::Closure& task,
@@ -39,11 +36,17 @@ class BASE_EXPORT MessageLoopProxyImpl
virtual bool RunsTasksOnCurrentThread() const OVERRIDE;
protected:
+ virtual ~MessageLoopProxyImpl();
+
// Override OnDestruct so that we can delete the object on the target message
// loop if it still exists.
virtual void OnDestruct() const OVERRIDE;
private:
+ // Allow the MessageLoop to create a MessageLoopProxyImpl.
+ friend class ::MessageLoop;
+ friend class DeleteHelper<MessageLoopProxyImpl>;
+
MessageLoopProxyImpl();
// Called directly by MessageLoop::~MessageLoop.
@@ -55,9 +58,6 @@ class BASE_EXPORT MessageLoopProxyImpl
base::TimeDelta delay,
bool nestable);
- // Allow the messageLoop to create a MessageLoopProxyImpl.
- friend class ::MessageLoop;
-
// The lock that protects access to target_message_loop_.
mutable base::Lock message_loop_lock_;
MessageLoop* target_message_loop_;
« no previous file with comments | « no previous file | base/message_pump.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698