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

Unified Diff: remoting/protocol/connection_to_host.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/host/simple_host_process.cc ('k') | remoting/protocol/content_description.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/connection_to_host.cc
diff --git a/remoting/protocol/connection_to_host.cc b/remoting/protocol/connection_to_host.cc
index 84c2a3fe6797a09e38211b6a5ce5a80a15b060e1..c1145a7ef8301a90f83e1f6006fc57d5118fe2d5 100644
--- a/remoting/protocol/connection_to_host.cc
+++ b/remoting/protocol/connection_to_host.cc
@@ -17,6 +17,7 @@
#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"
@@ -100,7 +101,7 @@ void ConnectionToHost::InitSession() {
session_manager_.reset(new PepperSessionManager(pp_instance_));
session_manager_->Init(
- local_jid_, signal_strategy_.get(), this, NULL, "", allow_nat_traversal_);
+ local_jid_, signal_strategy_.get(), this, allow_nat_traversal_);
}
const SessionConfig& ConnectionToHost::config() {
@@ -132,15 +133,12 @@ void ConnectionToHost::OnSessionManagerInitialized() {
// After SessionManager is initialized we can try to connect to the host.
CandidateSessionConfig* candidate_config =
CandidateSessionConfig::CreateDefault();
- std::string client_token =
- protocol::GenerateSupportAuthToken(local_jid_, access_code_);
+ V1ClientAuthenticator* authenticator =
+ new V1ClientAuthenticator(local_jid_, access_code_);
session_.reset(session_manager_->Connect(
- host_jid_, host_public_key_, client_token, candidate_config,
+ host_jid_, authenticator, candidate_config,
base::Bind(&ConnectionToHost::OnSessionStateChange,
base::Unretained(this))));
-
- // Set the shared-secret for securing SSL channels.
- session_->set_shared_secret(access_code_);
}
void ConnectionToHost::OnIncomingSession(
« no previous file with comments | « remoting/host/simple_host_process.cc ('k') | remoting/protocol/content_description.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698