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

Unified Diff: remoting/protocol/third_party_host_authenticator.cc

Issue 1770923002: Remove dependency on V2Authenticator from ThirdParty and pairing authenticators. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months 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/third_party_host_authenticator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/third_party_host_authenticator.cc
diff --git a/remoting/protocol/third_party_host_authenticator.cc b/remoting/protocol/third_party_host_authenticator.cc
index db2ba5c45c37cbf008108fbc3c8939f2c4c32219..1ee4a02f41de338c6e3567caf1ed6b4c4c650dc1 100644
--- a/remoting/protocol/third_party_host_authenticator.cc
+++ b/remoting/protocol/third_party_host_authenticator.cc
@@ -11,26 +11,20 @@
#include "base/callback.h"
#include "base/logging.h"
#include "remoting/base/constants.h"
-#include "remoting/base/rsa_key_pair.h"
#include "remoting/protocol/token_validator.h"
-#include "remoting/protocol/v2_authenticator.h"
#include "third_party/webrtc/libjingle/xmllite/xmlelement.h"
namespace remoting {
namespace protocol {
ThirdPartyHostAuthenticator::ThirdPartyHostAuthenticator(
- const std::string& local_cert,
- scoped_refptr<RsaKeyPair> key_pair,
+ const CreateBaseAuthenticatorCallback& create_base_authenticator_callback,
scoped_ptr<TokenValidator> token_validator)
: ThirdPartyAuthenticatorBase(MESSAGE_READY),
- local_cert_(local_cert),
- key_pair_(key_pair),
- token_validator_(std::move(token_validator)) {
-}
+ create_base_authenticator_callback_(create_base_authenticator_callback),
+ token_validator_(std::move(token_validator)) {}
-ThirdPartyHostAuthenticator::~ThirdPartyHostAuthenticator() {
-}
+ThirdPartyHostAuthenticator::~ThirdPartyHostAuthenticator() {}
void ThirdPartyHostAuthenticator::ProcessTokenMessage(
const buzz::XmlElement* message,
@@ -88,8 +82,8 @@ void ThirdPartyHostAuthenticator::OnThirdPartyTokenValidated(
// The other side already started the SPAKE authentication.
token_state_ = ACCEPTED;
- underlying_ = V2Authenticator::CreateForHost(
- local_cert_, key_pair_, shared_secret, WAITING_MESSAGE);
+ underlying_ =
+ create_base_authenticator_callback_.Run(shared_secret, WAITING_MESSAGE);
underlying_->ProcessMessage(message, resume_callback);
}
« no previous file with comments | « remoting/protocol/third_party_host_authenticator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698