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

Unified Diff: remoting/host/client_session.cc

Issue 6780014: Clean up remoting project (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: got rid of ref counting on user authenticator Created 9 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/host/client_session.h ('k') | remoting/host/client_session_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/client_session.cc
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc
index b946a0a772abbe088d7cd08914aa8f5134a3fe65..1e678ffeb46a0d2c455e016993e37994a8befea0 100644
--- a/remoting/host/client_session.cc
+++ b/remoting/host/client_session.cc
@@ -4,7 +4,6 @@
#include "remoting/host/client_session.h"
-#include "base/memory/scoped_ptr.h"
#include "base/task.h"
#include "media/base/callback.h"
#include "remoting/host/user_authenticator.h"
@@ -14,11 +13,11 @@ namespace remoting {
ClientSession::ClientSession(
EventHandler* event_handler,
- const base::Callback<UserAuthenticatorFactory>& auth_factory,
+ UserAuthenticator* user_authenticator,
scoped_refptr<protocol::ConnectionToClient> connection,
protocol::InputStub* input_stub)
: event_handler_(event_handler),
- auth_factory_(auth_factory),
+ user_authenticator_(user_authenticator),
connection_(connection),
input_stub_(input_stub),
authenticated_(false) {
@@ -45,11 +44,10 @@ void ClientSession::BeginSessionRequest(
media::AutoTaskRunner done_runner(done);
bool success = false;
- scoped_ptr<UserAuthenticator> authenticator(auth_factory_.Run());
switch (credentials->type()) {
case protocol::PASSWORD:
- success = authenticator->Authenticate(credentials->username(),
- credentials->credential());
+ success = user_authenticator_->Authenticate(credentials->username(),
+ credentials->credential());
break;
default:
« no previous file with comments | « remoting/host/client_session.h ('k') | remoting/host/client_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698