summaryrefslogtreecommitdiffstats
path: root/remoting/protocol/connection_to_host.cc
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-24 12:58:15 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-24 12:58:15 +0000
commit8bf7cbb223040ee3b472f5bce53fdb2ce2c905ec (patch)
tree1f52ba8e24f0cd2cf1ea16acfa0db26fb63f6424 /remoting/protocol/connection_to_host.cc
parent836cdae36964a1f7597d75286cd3edb69b72b521 (diff)
downloadchromium_src-8bf7cbb223040ee3b472f5bce53fdb2ce2c905ec.zip
chromium_src-8bf7cbb223040ee3b472f5bce53fdb2ce2c905ec.tar.gz
chromium_src-8bf7cbb223040ee3b472f5bce53fdb2ce2c905ec.tar.bz2
Implement V2 authentication support in the client plugin.
Changed client plugin interface so that it receives information needed to for V2 authentication. Also moved authenticator creation out of ConnectionToHost. BUG=105214 Review URL: http://codereview.chromium.org/9195004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118828 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/connection_to_host.cc')
-rw-r--r--remoting/protocol/connection_to_host.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/remoting/protocol/connection_to_host.cc b/remoting/protocol/connection_to_host.cc
index 879e1b2..ca89b44 100644
--- a/remoting/protocol/connection_to_host.cc
+++ b/remoting/protocol/connection_to_host.cc
@@ -12,12 +12,12 @@
#include "remoting/jingle_glue/javascript_signal_strategy.h"
#include "remoting/jingle_glue/xmpp_signal_strategy.h"
#include "remoting/protocol/auth_util.h"
+#include "remoting/protocol/authenticator.h"
#include "remoting/protocol/client_control_dispatcher.h"
#include "remoting/protocol/client_event_dispatcher.h"
#include "remoting/protocol/client_stub.h"
#include "remoting/protocol/jingle_session_manager.h"
#include "remoting/protocol/pepper_session_manager.h"
-#include "remoting/protocol/v1_authenticator.h"
#include "remoting/protocol/video_reader.h"
#include "remoting/protocol/video_stub.h"
#include "remoting/protocol/util.h"
@@ -51,24 +51,24 @@ HostStub* ConnectionToHost::host_stub() {
}
void ConnectionToHost::Connect(scoped_refptr<XmppProxy> xmpp_proxy,
- const std::string& your_jid,
+ const std::string& local_jid,
const std::string& host_jid,
const std::string& host_public_key,
- const std::string& access_code,
+ scoped_ptr<Authenticator> authenticator,
HostEventCallback* event_callback,
ClientStub* client_stub,
VideoStub* video_stub) {
event_callback_ = event_callback;
client_stub_ = client_stub;
video_stub_ = video_stub;
- access_code_ = access_code;
+ authenticator_ = authenticator.Pass();
// Save jid of the host. The actual connection is created later after
// |signal_strategy_| is connected.
host_jid_ = host_jid;
host_public_key_ = host_public_key;
- JavascriptSignalStrategy* strategy = new JavascriptSignalStrategy(your_jid);
+ JavascriptSignalStrategy* strategy = new JavascriptSignalStrategy(local_jid);
strategy->AttachXmppProxy(xmpp_proxy);
signal_strategy_.reset(strategy);
signal_strategy_->AddListener(this);
@@ -126,10 +126,8 @@ void ConnectionToHost::OnSessionManagerReady() {
// After SessionManager is initialized we can try to connect to the host.
scoped_ptr<CandidateSessionConfig> candidate_config =
CandidateSessionConfig::CreateDefault();
- scoped_ptr<Authenticator> authenticator(
- new V1ClientAuthenticator(signal_strategy_->GetLocalJid(), access_code_));
session_ = session_manager_->Connect(
- host_jid_, authenticator.Pass(), candidate_config.Pass(),
+ host_jid_, authenticator_.Pass(), candidate_config.Pass(),
base::Bind(&ConnectionToHost::OnSessionStateChange,
base::Unretained(this)));
}