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

Unified Diff: remoting/host/security_key/security_key_message_reader_impl.cc

Issue 2962443002: Rename TaskRunner::RunsTasksOnCurrentThread() in //remoting, //android_webview (Closed)
Patch Set: Created 3 years, 6 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
Index: remoting/host/security_key/security_key_message_reader_impl.cc
diff --git a/remoting/host/security_key/security_key_message_reader_impl.cc b/remoting/host/security_key/security_key_message_reader_impl.cc
index 14b8f0372578af484a76ff816e9bb9abfbdc41c6..ae3b07e805f523455d988a3c1fdefd95e4bc64ce 100644
--- a/remoting/host/security_key/security_key_message_reader_impl.cc
+++ b/remoting/host/security_key/security_key_message_reader_impl.cc
@@ -33,7 +33,7 @@ SecurityKeyMessageReaderImpl::SecurityKeyMessageReaderImpl(
}
SecurityKeyMessageReaderImpl::~SecurityKeyMessageReaderImpl() {
- DCHECK(main_task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(main_task_runner_->RunsTasksInCurrentSequence());
// In order to ensure the reader thread is stopped cleanly, we want to stop
// the thread before the task runners and weak pointers are invalidated.
@@ -43,7 +43,7 @@ SecurityKeyMessageReaderImpl::~SecurityKeyMessageReaderImpl() {
void SecurityKeyMessageReaderImpl::Start(
const SecurityKeyMessageCallback& message_callback,
const base::Closure& error_callback) {
- DCHECK(main_task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(main_task_runner_->RunsTasksInCurrentSequence());
message_callback_ = message_callback;
error_callback_ = error_callback;
@@ -56,7 +56,7 @@ void SecurityKeyMessageReaderImpl::Start(
}
void SecurityKeyMessageReaderImpl::ReadMessage() {
- DCHECK(read_task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(read_task_runner_->RunsTasksInCurrentSequence());
while (true) {
if (!read_stream_.IsValid()) {
@@ -124,7 +124,7 @@ bool SecurityKeyMessageReaderImpl::ReadFromStream(char* buffer,
}
void SecurityKeyMessageReaderImpl::NotifyError() {
- DCHECK(read_task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(read_task_runner_->RunsTasksInCurrentSequence());
main_task_runner_->PostTask(
FROM_HERE, base::Bind(&SecurityKeyMessageReaderImpl::InvokeErrorCallback,
@@ -133,12 +133,12 @@ void SecurityKeyMessageReaderImpl::NotifyError() {
void SecurityKeyMessageReaderImpl::InvokeMessageCallback(
std::unique_ptr<SecurityKeyMessage> message) {
- DCHECK(main_task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(main_task_runner_->RunsTasksInCurrentSequence());
message_callback_.Run(std::move(message));
}
void SecurityKeyMessageReaderImpl::InvokeErrorCallback() {
- DCHECK(main_task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(main_task_runner_->RunsTasksInCurrentSequence());
error_callback_.Run();
}
« no previous file with comments | « remoting/host/security_key/security_key_message_reader.cc ('k') | remoting/host/setup/me2me_native_messaging_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698