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

Unified Diff: remoting/host/host_status_logger.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/host_status_logger.h ('k') | remoting/host/host_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/host_status_logger.cc
diff --git a/remoting/host/host_status_logger.cc b/remoting/host/host_status_logger.cc
index 992a155fbfc92493a3d16745d2f8d743edb6f750..b81e03297caeb4571d28626d60fc8cf810d36f63 100644
--- a/remoting/host/host_status_logger.cc
+++ b/remoting/host/host_status_logger.cc
@@ -23,13 +23,14 @@ HostStatusLogger::HostStatusLogger(base::WeakPtr<HostStatusMonitor> monitor,
}
HostStatusLogger::~HostStatusLogger() {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (monitor_.get())
monitor_->RemoveStatusObserver(this);
}
void HostStatusLogger::LogSessionStateChange(const std::string& jid,
bool connected) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
std::unique_ptr<ServerLogEntry> entry(
MakeLogEntryForSessionStateChange(connected));
@@ -43,12 +44,12 @@ void HostStatusLogger::LogSessionStateChange(const std::string& jid,
}
void HostStatusLogger::OnClientConnected(const std::string& jid) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
LogSessionStateChange(jid, true);
}
void HostStatusLogger::OnClientDisconnected(const std::string& jid) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
LogSessionStateChange(jid, false);
connection_route_type_.erase(jid);
}
« no previous file with comments | « remoting/host/host_status_logger.h ('k') | remoting/host/host_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698