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

Unified Diff: remoting/protocol/session_manager.h

Issue 8619011: Use Authenticator interface in Session and SessionManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unittests Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/session.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/session_manager.h
diff --git a/remoting/protocol/session_manager.h b/remoting/protocol/session_manager.h
index f36abd2b6f2229cc022e82615e6b881012c356ab..7a02c3da74645ebbb64a9e5e313ec312c5ebe0b7 100644
--- a/remoting/protocol/session_manager.h
+++ b/remoting/protocol/session_manager.h
@@ -52,16 +52,15 @@
#include "base/threading/non_thread_safe.h"
#include "remoting/protocol/session.h"
-namespace crypto {
-class RSAPrivateKey;
-} // namespace base
-
namespace remoting {
class SignalStrategy;
namespace protocol {
+class Authenticator;
+class AuthenticatorFactory;
+
// Generic interface for Chromoting session manager.
//
// TODO(sergeyu): Split this into two separate interfaces: one for the
@@ -113,8 +112,6 @@ class SessionManager : public base::NonThreadSafe {
virtual void Init(const std::string& local_jid,
SignalStrategy* signal_strategy,
Listener* listener,
- crypto::RSAPrivateKey* private_key,
- const std::string& certificate,
bool allow_nat_traversal) = 0;
// Tries to create a session to the host |jid|. Must be called only
@@ -123,15 +120,14 @@ class SessionManager : public base::NonThreadSafe {
//
// |host_jid| is the full jid of the host to connect to.
// |host_public_key| is used to for authentication.
- // |client_oauth_token| is a short-lived OAuth token identify the client.
+ // |authenticator| is a client authenticator for the session.
// |config| contains the session configurations that the client supports.
// |state_change_callback| is called when the connection state changes.
//
// Ownership of the |config| is passed to the new session.
virtual Session* Connect(
const std::string& host_jid,
- const std::string& host_public_key,
- const std::string& client_token,
+ Authenticator* authenticator,
CandidateSessionConfig* config,
const Session::StateChangeCallback& state_change_callback) = 0;
@@ -140,6 +136,12 @@ class SessionManager : public base::NonThreadSafe {
// returns.
virtual void Close() = 0;
+ // Set authenticator factory that should be used to authenticate
+ // incoming connection. No connections will be accepted if
+ // authenticator factory isn't set.
+ virtual void set_authenticator_factory(
+ AuthenticatorFactory* authenticator_factory) = 0;
+
private:
DISALLOW_COPY_AND_ASSIGN(SessionManager);
};
« no previous file with comments | « remoting/protocol/session.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698