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

Unified Diff: remoting/host/security_key/security_key_message_reader.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.cc
diff --git a/remoting/host/security_key/security_key_message_reader.cc b/remoting/host/security_key/security_key_message_reader.cc
index bb222110367f8a387ba89f871176c5d8f00134c3..c6ba1b1c6eaa2b8a92ede0e01e654d9b6e77cbfa 100644
--- a/remoting/host/security_key/security_key_message_reader.cc
+++ b/remoting/host/security_key/security_key_message_reader.cc
@@ -32,7 +32,7 @@ SecurityKeyMessageReader::SecurityKeyMessageReader(base::File input_file)
}
SecurityKeyMessageReader::~SecurityKeyMessageReader() {
- DCHECK(main_task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(main_task_runner_->RunsTasksInCurrentSequence());
// In order to ensure the reader thread is stopped cleanly, we close the
// stream it is blocking on and then wait for the thread to exit.
@@ -43,7 +43,7 @@ SecurityKeyMessageReader::~SecurityKeyMessageReader() {
void SecurityKeyMessageReader::Start(
SecurityKeyMessageCallback message_callback,
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 SecurityKeyMessageReader::Start(
}
void SecurityKeyMessageReader::ReadMessage() {
- DCHECK(read_task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(read_task_runner_->RunsTasksInCurrentSequence());
while (true) {
if (!read_stream_.IsValid()) {
@@ -112,7 +112,7 @@ void SecurityKeyMessageReader::ReadMessage() {
}
void SecurityKeyMessageReader::NotifyError() {
- DCHECK(read_task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(read_task_runner_->RunsTasksInCurrentSequence());
main_task_runner_->PostTask(
FROM_HERE, base::Bind(&SecurityKeyMessageReader::InvokeErrorCallback,
@@ -121,12 +121,12 @@ void SecurityKeyMessageReader::NotifyError() {
void SecurityKeyMessageReader::InvokeMessageCallback(
std::unique_ptr<SecurityKeyMessage> message) {
- DCHECK(main_task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(main_task_runner_->RunsTasksInCurrentSequence());
message_callback_.Run(std::move(message));
}
void SecurityKeyMessageReader::InvokeErrorCallback() {
- DCHECK(main_task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(main_task_runner_->RunsTasksInCurrentSequence());
error_callback_.Run();
}

Powered by Google App Engine
This is Rietveld 408576698