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

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

Issue 2162083003: Renaming Gnubby and RemoteSecurityKey files/classes/members (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing a GYP build error Created 4 years, 5 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/remote_security_key_message_reader.cc b/remoting/host/security_key/security_key_message_reader.cc
similarity index 79%
rename from remoting/host/security_key/remote_security_key_message_reader.cc
rename to remoting/host/security_key/security_key_message_reader.cc
index 2cc3e762955c382e611504e4cf579796c191636d..2e2cf33492160d125fc854ae319617df4c0d9aac 100644
--- a/remoting/host/security_key/remote_security_key_message_reader.cc
+++ b/remoting/host/security_key/security_key_message_reader.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "remoting/host/security_key/remote_security_key_message_reader.h"
+#include "remoting/host/security_key/security_key_message_reader.h"
#include <cstdint>
#include <string>
@@ -18,10 +18,9 @@
namespace remoting {
-RemoteSecurityKeyMessageReader::RemoteSecurityKeyMessageReader(
- base::File input_file)
+SecurityKeyMessageReader::SecurityKeyMessageReader(base::File input_file)
: read_stream_(std::move(input_file)),
- reader_thread_("RemoteSecurityKeyMessageReader"),
+ reader_thread_("SecurityKeyMessageReader"),
weak_factory_(this) {
base::Thread::Options options;
options.message_loop_type = base::MessageLoop::TYPE_IO;
@@ -31,7 +30,7 @@ RemoteSecurityKeyMessageReader::RemoteSecurityKeyMessageReader(
main_task_runner_ = base::ThreadTaskRunnerHandle::Get();
}
-RemoteSecurityKeyMessageReader::~RemoteSecurityKeyMessageReader() {
+SecurityKeyMessageReader::~SecurityKeyMessageReader() {
DCHECK(main_task_runner_->RunsTasksOnCurrentThread());
// In order to ensure the reader thread is stopped cleanly, we close the
@@ -40,7 +39,7 @@ RemoteSecurityKeyMessageReader::~RemoteSecurityKeyMessageReader() {
reader_thread_.Stop();
}
-void RemoteSecurityKeyMessageReader::Start(
+void SecurityKeyMessageReader::Start(
SecurityKeyMessageCallback message_callback,
base::Closure error_callback) {
DCHECK(main_task_runner_->RunsTasksOnCurrentThread());
@@ -50,12 +49,12 @@ void RemoteSecurityKeyMessageReader::Start(
// base::Unretained is safe since this class owns the thread running this task
// which will be destroyed before this instance is.
- read_task_runner_->PostTask(
- FROM_HERE, base::Bind(&RemoteSecurityKeyMessageReader::ReadMessage,
- base::Unretained(this)));
+ read_task_runner_->PostTask(FROM_HERE,
+ base::Bind(&SecurityKeyMessageReader::ReadMessage,
+ base::Unretained(this)));
}
-void RemoteSecurityKeyMessageReader::ReadMessage() {
+void SecurityKeyMessageReader::ReadMessage() {
DCHECK(read_task_runner_->RunsTasksOnCurrentThread());
while (true) {
@@ -106,27 +105,26 @@ void RemoteSecurityKeyMessageReader::ReadMessage() {
// Notify callback of the new message received.
main_task_runner_->PostTask(
FROM_HERE,
- base::Bind(&RemoteSecurityKeyMessageReader::InvokeMessageCallback,
+ base::Bind(&SecurityKeyMessageReader::InvokeMessageCallback,
weak_factory_.GetWeakPtr(), base::Passed(&message)));
}
}
-void RemoteSecurityKeyMessageReader::NotifyError() {
+void SecurityKeyMessageReader::NotifyError() {
DCHECK(read_task_runner_->RunsTasksOnCurrentThread());
main_task_runner_->PostTask(
- FROM_HERE,
- base::Bind(&RemoteSecurityKeyMessageReader::InvokeErrorCallback,
- weak_factory_.GetWeakPtr()));
+ FROM_HERE, base::Bind(&SecurityKeyMessageReader::InvokeErrorCallback,
+ weak_factory_.GetWeakPtr()));
}
-void RemoteSecurityKeyMessageReader::InvokeMessageCallback(
+void SecurityKeyMessageReader::InvokeMessageCallback(
std::unique_ptr<SecurityKeyMessage> message) {
DCHECK(main_task_runner_->RunsTasksOnCurrentThread());
message_callback_.Run(std::move(message));
}
-void RemoteSecurityKeyMessageReader::InvokeErrorCallback() {
+void SecurityKeyMessageReader::InvokeErrorCallback() {
DCHECK(main_task_runner_->RunsTasksOnCurrentThread());
error_callback_.Run();
}

Powered by Google App Engine
This is Rietveld 408576698