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_; |