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

Unified Diff: remoting/protocol/message_reader.h

Issue 2911893003: Deprecate NonThreadSafe in remoting in favor of SequenceChecker. (Closed)
Patch Set: Created 3 years, 7 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 | « remoting/protocol/jingle_session_manager.cc ('k') | remoting/protocol/message_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/message_reader.h
diff --git a/remoting/protocol/message_reader.h b/remoting/protocol/message_reader.h
index 911425888c8cb7c003493d6108f749c2410a48c4..38c7a9c67bc08070407502e65fb29ee1b0eac0bf 100644
--- a/remoting/protocol/message_reader.h
+++ b/remoting/protocol/message_reader.h
@@ -10,7 +10,7 @@
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
-#include "base/threading/non_thread_safe.h"
+#include "base/sequence_checker.h"
#include "remoting/base/compound_buffer.h"
#include "remoting/protocol/message_decoder.h"
@@ -34,7 +34,7 @@ class P2PStreamSocket;
// It is still possible that the MessageReceivedCallback is called
// twice (so that there is more than one outstanding message),
// e.g. when we the sender sends multiple messages in one TCP packet.
-class MessageReader : public base::NonThreadSafe {
+class MessageReader {
public:
typedef base::Callback<void(std::unique_ptr<CompoundBuffer> message)>
MessageReceivedCallback;
@@ -71,6 +71,8 @@ class MessageReader : public base::NonThreadSafe {
// Callback is called when a message is received.
MessageReceivedCallback message_received_callback_;
+ SEQUENCE_CHECKER(sequence_checker_);
+
base::WeakPtrFactory<MessageReader> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(MessageReader);
« no previous file with comments | « remoting/protocol/jingle_session_manager.cc ('k') | remoting/protocol/message_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698