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

Unified Diff: remoting/host/native_messaging/pipe_messaging_channel.cc

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/host/native_messaging/pipe_messaging_channel.h ('k') | remoting/host/policy_watcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/native_messaging/pipe_messaging_channel.cc
diff --git a/remoting/host/native_messaging/pipe_messaging_channel.cc b/remoting/host/native_messaging/pipe_messaging_channel.cc
index 014e67de4c486dfeb12d5b5e6ac7ef1ceb097e6e..0b288a17065e2c657cbdddbb351208ec6dbc89c3 100644
--- a/remoting/host/native_messaging/pipe_messaging_channel.cc
+++ b/remoting/host/native_messaging/pipe_messaging_channel.cc
@@ -54,10 +54,12 @@ PipeMessagingChannel::PipeMessagingChannel(base::File input, base::File output)
weak_ptr_ = weak_factory_.GetWeakPtr();
}
-PipeMessagingChannel::~PipeMessagingChannel() {}
+PipeMessagingChannel::~PipeMessagingChannel() {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+}
void PipeMessagingChannel::Start(EventHandler* event_handler) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(!event_handler_);
event_handler_ = event_handler;
@@ -70,14 +72,14 @@ void PipeMessagingChannel::Start(EventHandler* event_handler) {
void PipeMessagingChannel::ProcessMessage(
std::unique_ptr<base::Value> message) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (event_handler_)
event_handler_->OnMessage(std::move(message));
}
void PipeMessagingChannel::SendMessage(std::unique_ptr<base::Value> message) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
bool success = message && native_messaging_writer_;
if (success)
@@ -91,7 +93,7 @@ void PipeMessagingChannel::SendMessage(std::unique_ptr<base::Value> message) {
}
void PipeMessagingChannel::Shutdown() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (event_handler_) {
// Set |event_handler_| to nullptr to indicate the object is in a shutdown
« no previous file with comments | « remoting/host/native_messaging/pipe_messaging_channel.h ('k') | remoting/host/policy_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698