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

Unified Diff: webrtc/rtc_base/messagequeue.h

Issue 2979733002: Revert of Delete SignalThread class. (Closed)
Patch Set: Change EXPECT_STATE macro to a function, since it was broken by recent gunit.h change Created 3 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
« no previous file with comments | « webrtc/rtc_base/BUILD.gn ('k') | webrtc/rtc_base/messagequeue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/rtc_base/messagequeue.h
diff --git a/webrtc/rtc_base/messagequeue.h b/webrtc/rtc_base/messagequeue.h
index 0d0654e2ecaa8bc5ba8c5b00aab72390da1ed469..2345dce7db5ef79ebcbe30a13d3d05bafb8f6024 100644
--- a/webrtc/rtc_base/messagequeue.h
+++ b/webrtc/rtc_base/messagequeue.h
@@ -149,23 +149,6 @@ class DisposeData : public MessageData {
T* data_;
};
-// TODO(nisse): Replace RunnableData and FunctorData by a subclass of Message
-// owning a QueuedTask.
-class RunnableData : public MessageData {
- public:
- virtual void Run() = 0;
-};
-
-template <class FunctorT>
-class FunctorData : public RunnableData {
- public:
- explicit FunctorData(FunctorT functor) : functor_(std::move(functor)) {}
- void Run() override { functor_(); }
-
- private:
- FunctorT functor_;
-};
-
const uint32_t MQID_ANY = static_cast<uint32_t>(-1);
const uint32_t MQID_DISPOSE = static_cast<uint32_t>(-2);
@@ -255,19 +238,6 @@ class MessageQueue {
uint32_t id = 0,
MessageData* pdata = nullptr,
bool time_sensitive = false);
-
- // TODO(nisse): Replace with a method for posting a
- // std::unique_ptr<QueuedTask>, to ease gradual conversion to using TaskQueue.
- template <class FunctorT,
- // Additional type check, or else it collides with calls to the
- // above Post method with the optional arguments omitted.
- typename std::enable_if<!std::is_pointer<FunctorT>::value>::type* =
- nullptr>
- void Post(const Location& posted_from, FunctorT functor) {
- PostFunctorInternal(posted_from,
- new FunctorData<FunctorT>(std::move(functor)));
- }
-
virtual void PostDelayed(const Location& posted_from,
int cmsDelay,
MessageHandler* phandler,
@@ -344,9 +314,6 @@ class MessageQueue {
bool fDestroyed_;
private:
- void PostFunctorInternal(const Location& posted_from,
- RunnableData* message_data);
-
volatile int stop_;
// The SocketServer might not be owned by MessageQueue.
« no previous file with comments | « webrtc/rtc_base/BUILD.gn ('k') | webrtc/rtc_base/messagequeue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698