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

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

Issue 1852283003: Updating Message Reader and Writer classes to use an interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing feedback Created 4 years, 8 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/remote_security_key_message_writer_impl.cc
diff --git a/remoting/host/security_key/remote_security_key_message_writer.cc b/remoting/host/security_key/remote_security_key_message_writer_impl.cc
similarity index 84%
copy from remoting/host/security_key/remote_security_key_message_writer.cc
copy to remoting/host/security_key/remote_security_key_message_writer_impl.cc
index 4a9f75e15e6a8cee5eaac2e93adc1f718dd82c38..4a434dfb838ef68dcffd9884233f1b917011e738 100644
--- a/remoting/host/security_key/remote_security_key_message_writer.cc
+++ b/remoting/host/security_key/remote_security_key_message_writer_impl.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_writer.h"
+#include "remoting/host/security_key/remote_security_key_message_writer_impl.h"
#include <cstdint>
#include <string>
@@ -12,18 +12,18 @@
namespace remoting {
-RemoteSecurityKeyMessageWriter::RemoteSecurityKeyMessageWriter(
+RemoteSecurityKeyMessageWriterImpl::RemoteSecurityKeyMessageWriterImpl(
base::File output_file)
: output_stream_(std::move(output_file)) {}
-RemoteSecurityKeyMessageWriter::~RemoteSecurityKeyMessageWriter() {}
+RemoteSecurityKeyMessageWriterImpl::~RemoteSecurityKeyMessageWriterImpl() {}
-bool RemoteSecurityKeyMessageWriter::WriteMessage(
+bool RemoteSecurityKeyMessageWriterImpl::WriteMessage(
RemoteSecurityKeyMessageType message_type) {
return WriteMessageWithPayload(message_type, std::string());
}
-bool RemoteSecurityKeyMessageWriter::WriteMessageWithPayload(
+bool RemoteSecurityKeyMessageWriterImpl::WriteMessageWithPayload(
RemoteSecurityKeyMessageType message_type,
const std::string& message_payload) {
if (write_failed_ || !output_stream_.IsValid()) {
@@ -62,8 +62,9 @@ bool RemoteSecurityKeyMessageWriter::WriteMessageWithPayload(
return true;
}
-bool RemoteSecurityKeyMessageWriter::WriteBytesToOutput(const char* message,
- int bytes_to_write) {
+bool RemoteSecurityKeyMessageWriterImpl::WriteBytesToOutput(
+ const char* message,
+ int bytes_to_write) {
DCHECK(message);
DCHECK_GT(bytes_to_write, 0);

Powered by Google App Engine
This is Rietveld 408576698