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 08:26:45 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-24 08:26:45 +0000
commit5cddcf44f297adcdbaf6f59883fa19e04d3d9045 (patch)
treee3e643309c9111c83eaf17be96df9c64f1756332 /remoting/protocol/connection_to_host.cc
parenta0323d7a8f5989b7550e600ea570b20f43465a12 (diff)
downloadchromium_src-5cddcf44f297adcdbaf6f59883fa19e04d3d9045.zip
chromium_src-5cddcf44f297adcdbaf6f59883fa19e04d3d9045.tar.gz
chromium_src-5cddcf44f297adcdbaf6f59883fa19e04d3d9045.tar.bz2
Revert 118805 - 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 TBR=sergeyu@chromium.org Review URL: https://chromiumcodereview.appspot.com/9146032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118806 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, 8 insertions, 6 deletions
diff --git a/remoting/protocol/connection_to_host.cc b/remoting/protocol/connection_to_host.cc
index ca89b44..879e1b2 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& local_jid,
+ const std::string& your_jid,
const std::string& host_jid,
const std::string& host_public_key,
- scoped_ptr<Authenticator> authenticator,
+ const std::string& access_code,
HostEventCallback* event_callback,
ClientStub* client_stub,
VideoStub* video_stub) {
event_callback_ = event_callback;
client_stub_ = client_stub;
video_stub_ = video_stub;
- authenticator_ = authenticator.Pass();
+ access_code_ = access_code;
// 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(local_jid);
+ JavascriptSignalStrategy* strategy = new JavascriptSignalStrategy(your_jid);
strategy->AttachXmppProxy(xmpp_proxy);
signal_strategy_.reset(strategy);
signal_strategy_->AddListener(this);
@@ -126,8 +126,10 @@ 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)));
}