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

Unified Diff: trunk/src/base/message_loop/message_pump.h

Issue 19737005: Revert 212948 "Made MessagePump a non-thread safe class." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 5 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
Index: trunk/src/base/message_loop/message_pump.h
===================================================================
--- trunk/src/base/message_loop/message_pump.h (revision 212951)
+++ trunk/src/base/message_loop/message_pump.h (working copy)
@@ -6,13 +6,13 @@
#define BASE_MESSAGE_LOOP_MESSAGE_PUMP_H_
#include "base/base_export.h"
-#include "base/threading/non_thread_safe.h"
+#include "base/memory/ref_counted.h"
namespace base {
class TimeTicks;
-class BASE_EXPORT MessagePump : public NonThreadSafe {
+class BASE_EXPORT MessagePump : public RefCountedThreadSafe<MessagePump> {
public:
// Please see the comments above the Run method for an illustration of how
// these delegate methods are used.
@@ -42,7 +42,6 @@
};
MessagePump();
- virtual ~MessagePump();
// The Run method is called to enter the message pump's run loop.
//
@@ -119,6 +118,10 @@
// cancelling any pending DoDelayedWork callback. This method may only be
// used on the thread that called Run.
virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) = 0;
+
+ protected:
+ virtual ~MessagePump();
+ friend class RefCountedThreadSafe<MessagePump>;
};
} // namespace base
« no previous file with comments | « trunk/src/base/message_loop/message_loop_unittest.cc ('k') | trunk/src/base/message_loop/message_pump_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698