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

Unified Diff: remoting/host/chromoting_host.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/chromoting_host.h ('k') | remoting/host/client_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host.cc
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
index 0dd72d1baa08e4034a6c9197d7773f6c0f0b3892..4bfd9e2b994a85513d6bcd3afb1adcc14451b06f 100644
--- a/remoting/host/chromoting_host.cc
+++ b/remoting/host/chromoting_host.cc
@@ -83,7 +83,7 @@ ChromotingHost::ChromotingHost(
}
ChromotingHost::~ChromotingHost() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
// Disconnect all of the clients.
while (!clients_.empty()) {
@@ -102,7 +102,7 @@ ChromotingHost::~ChromotingHost() {
}
void ChromotingHost::Start(const std::string& host_owner_email) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(!started_);
HOST_LOG << "Starting host";
@@ -115,12 +115,12 @@ void ChromotingHost::Start(const std::string& host_owner_email) {
}
void ChromotingHost::AddStatusObserver(HostStatusObserver* observer) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
status_observers_.AddObserver(observer);
}
void ChromotingHost::RemoveStatusObserver(HostStatusObserver* observer) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
status_observers_.RemoveObserver(observer);
}
@@ -130,7 +130,7 @@ void ChromotingHost::AddExtension(std::unique_ptr<HostExtension> extension) {
void ChromotingHost::SetAuthenticatorFactory(
std::unique_ptr<protocol::AuthenticatorFactory> authenticator_factory) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
session_manager_->set_authenticator_factory(std::move(authenticator_factory));
}
@@ -156,7 +156,7 @@ void ChromotingHost::OnSessionAuthenticating(ClientSession* client) {
}
void ChromotingHost::OnSessionAuthenticated(ClientSession* client) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
login_backoff_.Reset();
@@ -181,7 +181,7 @@ void ChromotingHost::OnSessionAuthenticated(ClientSession* client) {
}
void ChromotingHost::OnSessionChannelsConnected(ClientSession* client) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
// Notify observers.
for (auto& observer : status_observers_)
@@ -189,7 +189,7 @@ void ChromotingHost::OnSessionChannelsConnected(ClientSession* client) {
}
void ChromotingHost::OnSessionAuthenticationFailed(ClientSession* client) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
// Notify observers.
for (auto& observer : status_observers_)
@@ -197,7 +197,7 @@ void ChromotingHost::OnSessionAuthenticationFailed(ClientSession* client) {
}
void ChromotingHost::OnSessionClosed(ClientSession* client) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
ClientSessions::iterator it =
std::find_if(clients_.begin(), clients_.end(),
@@ -220,7 +220,7 @@ void ChromotingHost::OnSessionRouteChange(
ClientSession* session,
const std::string& channel_name,
const protocol::TransportRoute& route) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
for (auto& observer : status_observers_)
observer.OnClientRouteChange(session->client_jid(), channel_name, route);
}
@@ -228,7 +228,7 @@ void ChromotingHost::OnSessionRouteChange(
void ChromotingHost::OnIncomingSession(
protocol::Session* session,
protocol::SessionManager::IncomingSessionResponse* response) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(started_);
if (login_backoff_.ShouldRejectRequest()) {
« no previous file with comments | « remoting/host/chromoting_host.h ('k') | remoting/host/client_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698