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

Side by Side Diff: remoting/host/security_key/security_key_message_writer_impl.h

Issue 2170563002: Revert of Renaming Gnubby and RemoteSecurityKey files/classes/members (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_HOST_SECURITY_KEY_SECURITY_KEY_MESSAGE_WRITER_IMPL_H_
6 #define REMOTING_HOST_SECURITY_KEY_SECURITY_KEY_MESSAGE_WRITER_IMPL_H_
7
8 #include <string>
9
10 #include "base/files/file.h"
11 #include "base/macros.h"
12 #include "remoting/host/security_key/security_key_message.h"
13 #include "remoting/host/security_key/security_key_message_writer.h"
14
15 namespace remoting {
16
17 // Used for sending security key messages using a file handle.
18 class SecurityKeyMessageWriterImpl : public SecurityKeyMessageWriter {
19 public:
20 explicit SecurityKeyMessageWriterImpl(base::File output_file);
21 ~SecurityKeyMessageWriterImpl() override;
22
23 private:
24 // SecurityKeyMessageWriter interface.
25 bool WriteMessage(SecurityKeyMessageType message_type) override;
26 bool WriteMessageWithPayload(SecurityKeyMessageType message_type,
27 const std::string& message_payload) override;
28
29 // Writes |bytes_to_write| bytes from |message| to |output_stream_|.
30 bool WriteBytesToOutput(const char* message, int bytes_to_write);
31
32 base::File output_stream_;
33 bool write_failed_ = false;
34
35 DISALLOW_COPY_AND_ASSIGN(SecurityKeyMessageWriterImpl);
36 };
37
38 } // namespace remoting
39
40 #endif // REMOTING_HOST_SECURITY_KEY_SECURITY_KEY_MESSAGE_WRITER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698