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

Side by Side Diff: remoting/protocol/session_manager.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
« no previous file with comments | « remoting/protocol/session_config_unittest.cc ('k') | remoting/protocol/spake2_authenticator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // The purpose of SessionManager is to facilitate creation of chromotocol 5 // The purpose of SessionManager is to facilitate creation of chromotocol
6 // sessions. Both host and client use it to establish chromotocol 6 // sessions. Both host and client use it to establish chromotocol
7 // sessions. JingleChromotocolServer implements this inteface using 7 // sessions. JingleChromotocolServer implements this inteface using
8 // libjingle. 8 // libjingle.
9 // 9 //
10 // OUTGOING SESSIONS 10 // OUTGOING SESSIONS
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 SessionManager() {} 99 SessionManager() {}
100 virtual ~SessionManager() {} 100 virtual ~SessionManager() {}
101 101
102 // Starts accepting incoming connections. 102 // Starts accepting incoming connections.
103 virtual void AcceptIncoming( 103 virtual void AcceptIncoming(
104 const IncomingSessionCallback& incoming_session_callback) = 0; 104 const IncomingSessionCallback& incoming_session_callback) = 0;
105 105
106 // Sets local protocol configuration to be used when negotiating outgoing and 106 // Sets local protocol configuration to be used when negotiating outgoing and
107 // incoming connections. 107 // incoming connections.
108 virtual void set_protocol_config( 108 virtual void set_protocol_config(
109 scoped_ptr<CandidateSessionConfig> config) = 0; 109 std::unique_ptr<CandidateSessionConfig> config) = 0;
110 110
111 // Tries to create a session to the host |jid|. 111 // Tries to create a session to the host |jid|.
112 // 112 //
113 // |host_jid| is the full jid of the host to connect to. 113 // |host_jid| is the full jid of the host to connect to.
114 // |authenticator| is a client authenticator for the session. 114 // |authenticator| is a client authenticator for the session.
115 virtual scoped_ptr<Session> Connect( 115 virtual std::unique_ptr<Session> Connect(
116 const std::string& host_jid, 116 const std::string& host_jid,
117 scoped_ptr<Authenticator> authenticator) = 0; 117 std::unique_ptr<Authenticator> authenticator) = 0;
118 118
119 // Set authenticator factory that should be used to authenticate 119 // Set authenticator factory that should be used to authenticate
120 // incoming connection. No connections will be accepted if 120 // incoming connection. No connections will be accepted if
121 // authenticator factory isn't set. Must not be called more than 121 // authenticator factory isn't set. Must not be called more than
122 // once per SessionManager because it may not be safe to delete 122 // once per SessionManager because it may not be safe to delete
123 // factory before all authenticators it created are deleted. 123 // factory before all authenticators it created are deleted.
124 virtual void set_authenticator_factory( 124 virtual void set_authenticator_factory(
125 scoped_ptr<AuthenticatorFactory> authenticator_factory) = 0; 125 std::unique_ptr<AuthenticatorFactory> authenticator_factory) = 0;
126 126
127 private: 127 private:
128 DISALLOW_COPY_AND_ASSIGN(SessionManager); 128 DISALLOW_COPY_AND_ASSIGN(SessionManager);
129 }; 129 };
130 130
131 } // namespace protocol 131 } // namespace protocol
132 } // namespace remoting 132 } // namespace remoting
133 133
134 #endif // REMOTING_PROTOCOL_SESSION_MANAGER_H_ 134 #endif // REMOTING_PROTOCOL_SESSION_MANAGER_H_
OLDNEW
« no previous file with comments | « remoting/protocol/session_config_unittest.cc ('k') | remoting/protocol/spake2_authenticator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698