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

Unified Diff: remoting/protocol/pepper_session_manager.cc

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/pepper_session_manager.h ('k') | remoting/protocol/session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/pepper_session_manager.cc
diff --git a/remoting/protocol/pepper_session_manager.cc b/remoting/protocol/pepper_session_manager.cc
index ea095c36d55b9c96f6571557f271532c1c2fb381..2e558a75542c8ab5702a2908bf16cdefc1cf6ab0 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;
« no previous file with comments | « remoting/protocol/pepper_session_manager.h ('k') | remoting/protocol/session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698