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

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

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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 11
12 namespace remoting { 12 namespace remoting {
13 namespace protocol { 13 namespace protocol {
14 14
15 class P2PStreamSocket; 15 class P2PStreamSocket;
16 16
17 // Interface for channel authentications that perform channel-level 17 // Interface for channel authentications that perform channel-level
18 // authentication. Depending on implementation channel authenticators 18 // authentication. Depending on implementation channel authenticators
19 // may also establish SSL connection. Each instance of this interface 19 // may also establish SSL connection. Each instance of this interface
20 // should be used only once for one channel. 20 // should be used only once for one channel.
21 class ChannelAuthenticator { 21 class ChannelAuthenticator {
22 public: 22 public:
23 typedef base::Callback<void(int error, scoped_ptr<P2PStreamSocket>)> 23 typedef base::Callback<void(int error, std::unique_ptr<P2PStreamSocket>)>
24 DoneCallback; 24 DoneCallback;
25 25
26 virtual ~ChannelAuthenticator() {} 26 virtual ~ChannelAuthenticator() {}
27 27
28 // Start authentication of the given |socket|. |done_callback| is called when 28 // Start authentication of the given |socket|. |done_callback| is called when
29 // authentication is finished. Callback may be invoked before this method 29 // authentication is finished. Callback may be invoked before this method
30 // returns, and may delete the calling authenticator. 30 // returns, and may delete the calling authenticator.
31 virtual void SecureAndAuthenticate( 31 virtual void SecureAndAuthenticate(std::unique_ptr<P2PStreamSocket> socket,
32 scoped_ptr<P2PStreamSocket> socket, 32 const DoneCallback& done_callback) = 0;
33 const DoneCallback& done_callback) = 0;
34 }; 33 };
35 34
36 } // namespace protocol 35 } // namespace protocol
37 } // namespace remoting 36 } // namespace remoting
38 37
39 #endif // REMOTING_PROTOCOL_CHANNEL_AUTHENTICATOR_H_ 38 #endif // REMOTING_PROTOCOL_CHANNEL_AUTHENTICATOR_H_
OLDNEW
« no previous file with comments | « remoting/protocol/capture_scheduler_unittest.cc ('k') | remoting/protocol/channel_dispatcher_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698