summaryrefslogtreecommitdiffstats
path: root/remoting/protocol/pepper_session_manager.cc
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-30 04:43:17 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-30 04:43:17 +0000
commitf4453851934ac99908286f195ac0a4379c2b9852 (patch)
treeebf7aff9bfa148994ca1cfc2cce325c0d599514f /remoting/protocol/pepper_session_manager.cc
parentdc51d1ccc18135493f01464e38ed462825ae8e35 (diff)
downloadchromium_src-f4453851934ac99908286f195ac0a4379c2b9852.zip
chromium_src-f4453851934ac99908286f195ac0a4379c2b9852.tar.gz
chromium_src-f4453851934ac99908286f195ac0a4379c2b9852.tar.bz2
Use Authenticator interface in Session and SessionManager.
BUG=105214 Review URL: http://codereview.chromium.org/8619011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112127 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/pepper_session_manager.cc')
-rw-r--r--remoting/protocol/pepper_session_manager.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/remoting/protocol/pepper_session_manager.cc b/remoting/protocol/pepper_session_manager.cc
index ea095c3..2e558a7 100644
--- a/remoting/protocol/pepper_session_manager.cc
+++ b/remoting/protocol/pepper_session_manager.cc
@@ -8,6 +8,7 @@
#include "remoting/jingle_glue/iq_sender.h"
#include "remoting/jingle_glue/jingle_info_request.h"
#include "remoting/jingle_glue/signal_strategy.h"
+#include "remoting/protocol/authenticator.h"
#include "remoting/protocol/jingle_messages.h"
#include "remoting/protocol/pepper_session.h"
#include "third_party/libjingle/source/talk/base/socketaddress.h"
@@ -33,15 +34,11 @@ void PepperSessionManager::Init(
const std::string& local_jid,
SignalStrategy* signal_strategy,
SessionManager::Listener* listener,
- crypto::RSAPrivateKey* private_key,
- const std::string& certificate,
bool allow_nat_traversal) {
listener_ = listener;
local_jid_ = local_jid;
signal_strategy_ = signal_strategy;
iq_sender_.reset(new IqSender(signal_strategy_));
- private_key_.reset(private_key);
- certificate_ = certificate;
allow_nat_traversal_ = allow_nat_traversal;
signal_strategy_->AddListener(this);
@@ -76,13 +73,12 @@ void PepperSessionManager::OnJingleInfo(
Session* PepperSessionManager::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) {
PepperSession* session = new PepperSession(this);
- session->StartConnection(host_jid, host_public_key, client_token,
- config, state_change_callback);
+ session->StartConnection(host_jid, authenticator, config,
+ state_change_callback);
sessions_[session->session_id_] = session;
return session;
}
@@ -99,6 +95,12 @@ void PepperSessionManager::Close() {
signal_strategy_->RemoveListener(this);
}
+void PepperSessionManager::set_authenticator_factory(
+ AuthenticatorFactory* authenticator_factory) {
+ DCHECK(CalledOnValidThread());
+ authenticator_factory_.reset(authenticator_factory);
+}
+
bool PepperSessionManager::OnIncomingStanza(const buzz::XmlElement* stanza) {
if (!JingleMessage::IsJingleMessage(stanza))
return false;