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

Side by Side Diff: remoting/protocol/channel_authenticator.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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_PROTOCOL_CHANNEL_AUTHENTICATOR_H_ 5 #ifndef REMOTING_PROTOCOL_CHANNEL_AUTHENTICATOR_H_
6 #define REMOTING_PROTOCOL_CHANNEL_AUTHENTICATOR_H_ 6 #define REMOTING_PROTOCOL_CHANNEL_AUTHENTICATOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
11 #include "net/base/net_errors.h" 11 #include "net/base/net_errors.h"
12 12
13 namespace net { 13 namespace net {
14 class StreamSocket; 14 class StreamSocket;
15 } // namespace net 15 } // namespace net
16 16
17 namespace remoting { 17 namespace remoting {
18 namespace protocol { 18 namespace protocol {
19 19
20 // Interface for channel authentications that perform channel-level 20 // Interface for channel authentications that perform channel-level
21 // authentication. Depending on implementation channel authenticators 21 // authentication. Depending on implementation channel authenticators
22 // may also establish SSL connection. Each instance of this interface 22 // may also establish SSL connection. Each instance of this interface
23 // should be used only once for one channel. 23 // should be used only once for one channel.
24 class ChannelAuthenticator { 24 class ChannelAuthenticator {
25 public: 25 public:
26 // Callback to be called when authentication is finished. It can delete
27 // calling authenticator.
Wez 2014/09/10 02:29:26 Suggest moving this comment to the SecureAndAuthen
Sergey Ulanov 2014/09/10 21:50:58 Done.
26 typedef base::Callback<void(net::Error error, scoped_ptr<net::StreamSocket>)> 28 typedef base::Callback<void(net::Error error, scoped_ptr<net::StreamSocket>)>
27 DoneCallback; 29 DoneCallback;
28 30
29 virtual ~ChannelAuthenticator() {} 31 virtual ~ChannelAuthenticator() {}
30 32
31 // Start authentication of the given |socket|. |done_callback| is 33 // Start authentication of the given |socket|. |done_callback| is
32 // called when authentication is finished. Callback may be invoked 34 // called when authentication is finished. Callback may be invoked
33 // before this method returns. 35 // before this method returns.
Wez 2014/09/10 02:29:26 e.g. .. method returns, and may delete the calling
Sergey Ulanov 2014/09/10 21:50:58 Done.
34 virtual void SecureAndAuthenticate( 36 virtual void SecureAndAuthenticate(
35 scoped_ptr<net::StreamSocket> socket, 37 scoped_ptr<net::StreamSocket> socket,
36 const DoneCallback& done_callback) = 0; 38 const DoneCallback& done_callback) = 0;
37 }; 39 };
38 40
39 } // namespace protocol 41 } // namespace protocol
40 } // namespace remoting 42 } // namespace remoting
41 43
42 #endif // REMOTING_PROTOCOL_CHANNEL_AUTHENTICATOR_H_ 44 #endif // REMOTING_PROTOCOL_CHANNEL_AUTHENTICATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698