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

Side by Side Diff: remoting/host/security_key/fake_security_key_message_reader.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_FAKE_SECURITY_KEY_MESSAGE_READER_H_
6 #define REMOTING_HOST_SECURITY_KEY_FAKE_SECURITY_KEY_MESSAGE_READER_H_
7
8 #include "base/callback.h"
9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h"
11 #include "remoting/host/security_key/security_key_message.h"
12 #include "remoting/host/security_key/security_key_message_reader.h"
13
14 namespace remoting {
15
16 // Simulates the SecurityKeyMessageReader and provides access to data
17 // members for testing.
18 class FakeSecurityKeyMessageReader : public SecurityKeyMessageReader {
19 public:
20 FakeSecurityKeyMessageReader();
21 ~FakeSecurityKeyMessageReader() override;
22
23 // SecurityKeyMessageReader interface.
24 void Start(const SecurityKeyMessageCallback& message_callback,
25 const base::Closure& error_callback) override;
26
27 base::WeakPtr<FakeSecurityKeyMessageReader> AsWeakPtr();
28
29 const SecurityKeyMessageCallback& message_callback() {
30 return message_callback_;
31 }
32
33 const base::Closure& error_callback() { return error_callback_; }
34
35 private:
36 // Caller-supplied message and error callbacks.
37 SecurityKeyMessageCallback message_callback_;
38 base::Closure error_callback_;
39
40 base::WeakPtrFactory<FakeSecurityKeyMessageReader> weak_factory_;
41
42 DISALLOW_COPY_AND_ASSIGN(FakeSecurityKeyMessageReader);
43 };
44
45 } // namespace remoting
46
47 #endif // REMOTING_HOST_SECURITY_KEY_FAKE_SECURITY_KEY_MESSAGE_READER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698