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

Side by Side Diff: remoting/protocol/pseudotcp_channel_factory.h

Issue 551173004: Move PseudoTCP and channel auth out of LibjingleTransportFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@clean_dgrams
Patch Set: Created 6 years, 3 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 2014 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_PROTOCOL_PSEUDOTCP_CHANNEL_FACTORY_H_
6 #define REMOTING_PROTOCOL_PSEUDOTCP_CHANNEL_FACTORY_H_
7
8 #include <map>
9
10 #include "base/basictypes.h"
11 #include "remoting/protocol/channel_factory.h"
12
13 namespace remoting {
14 namespace protocol {
15
16 class DatagramChannelFactory;
17
18 // ChannelFactory that creates PseudoTCP-based stream channels that run on top
19 // of datagram channels created using specified |datagram_channel_factory|.
20 class PseudoTcpChannelFactory : public ChannelFactory {
21 public:
22 explicit PseudoTcpChannelFactory(
23 DatagramChannelFactory* datagram_channel_factory);
Wez 2014/09/10 02:29:27 nit: Comment on lifetime of this?
Sergey Ulanov 2014/09/10 21:50:59 Done.
24 virtual ~PseudoTcpChannelFactory();
25
26 // ChannelFactory interface.
27 virtual void CreateChannel(const std::string& name,
28 const ChannelCreatedCallback& callback) OVERRIDE;
29 virtual void CancelChannelCreation(const std::string& name) OVERRIDE;
30
31 private:
32 void OnDatagramChannelCreated(const std::string& name,
33 const ChannelCreatedCallback& callback,
34 scoped_ptr<net::Socket> socket);
35 void OnPseudoTcpConnected(const std::string& name,
36 const ChannelCreatedCallback& callback,
37 int result);
38
39 DatagramChannelFactory* datagram_channel_factory_;
40
41 typedef std::map<std::string, net::StreamSocket*> PendingSocketsMap;
Wez 2014/09/10 02:29:27 nit: Move this to the top of private section.
Sergey Ulanov 2014/09/10 21:50:59 Done.
42 PendingSocketsMap pending_sockets_;
43
44 DISALLOW_COPY_AND_ASSIGN(PseudoTcpChannelFactory);
45 };
46
47 } // namespace protocol
48 } // namespace remoting
49
50 #endif // REMOTING_PROTOCOL_PSEUDOTCP_CHANNEL_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698