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

Side by Side Diff: remoting/host/security_key/fake_ipc_gnubby_auth_handler.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 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 #include "remoting/host/security_key/fake_ipc_gnubby_auth_handler.h"
6
7 #include <memory>
8
9 #include "base/time/time.h"
10 #include "ipc/ipc_channel.h"
11 #include "ipc/ipc_listener.h"
12 #include "ipc/ipc_message.h"
13 #include "ipc/ipc_message_macros.h"
14 #include "remoting/host/chromoting_messages.h"
15 #include "testing/gtest/include/gtest/gtest.h"
16
17 namespace remoting {
18
19 FakeIpcGnubbyAuthHandler::FakeIpcGnubbyAuthHandler() {}
20
21 FakeIpcGnubbyAuthHandler::~FakeIpcGnubbyAuthHandler() {}
22
23 void FakeIpcGnubbyAuthHandler::CreateGnubbyConnection() {
24 ipc_server_channel_ = IPC::Channel::CreateNamedServer(
25 IPC::ChannelHandle(ipc_server_channel_name_), this);
26 ASSERT_NE(nullptr, ipc_server_channel_);
27 ASSERT_TRUE(ipc_server_channel_->Connect());
28 }
29
30 bool FakeIpcGnubbyAuthHandler::IsValidConnectionId(int connection_id) const {
31 return false;
32 }
33
34 void FakeIpcGnubbyAuthHandler::SendClientResponse(
35 int connection_id,
36 const std::string& response_data) {}
37
38 void FakeIpcGnubbyAuthHandler::SendErrorAndCloseConnection(int connection_id) {}
39
40 void FakeIpcGnubbyAuthHandler::SetSendMessageCallback(
41 const SendMessageCallback& callback) {}
42
43 size_t FakeIpcGnubbyAuthHandler::GetActiveConnectionCountForTest() const {
44 return 0;
45 }
46
47 void FakeIpcGnubbyAuthHandler::SetRequestTimeoutForTest(
48 base::TimeDelta timeout) {}
49
50 bool FakeIpcGnubbyAuthHandler::OnMessageReceived(const IPC::Message& message) {
51 // This class does handle any IPC messages sent by the client.
52 return false;
53 }
54
55 void FakeIpcGnubbyAuthHandler::OnChannelConnected(int32_t peer_pid) {
56 ASSERT_TRUE(ipc_server_channel_->Send(
57 new ChromotingNetworkToRemoteSecurityKeyMsg_ConnectionDetails(
58 ipc_security_key_channel_name_)));
59 }
60
61 void FakeIpcGnubbyAuthHandler::OnChannelError() {}
62
63 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698