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

Side by Side Diff: remoting/host/client_session.cc

Issue 6780014: Clean up remoting project (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix a compile glitch on Windows Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/client_session.h" 5 #include "remoting/host/client_session.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/task.h" 8 #include "base/task.h"
9 #include "media/base/callback.h" 9 #include "media/base/callback.h"
10 #include "remoting/host/user_authenticator.h" 10 #include "remoting/host/user_authenticator.h"
11 #include "remoting/proto/auth.pb.h" 11 #include "remoting/proto/auth.pb.h"
12 12
13 namespace remoting { 13 namespace remoting {
14 14
15 ClientSession::ClientSession( 15 ClientSession::ClientSession(
16 EventHandler* event_handler, 16 EventHandler* event_handler,
17 const base::Callback<UserAuthenticatorFactory>& auth_factory, 17 const base::Callback<UserAuthenticatorFactory>& auth_factory,
(...skipping 20 matching lines...) Expand all
38 } 38 }
39 } 39 }
40 40
41 void ClientSession::BeginSessionRequest( 41 void ClientSession::BeginSessionRequest(
42 const protocol::LocalLoginCredentials* credentials, Task* done) { 42 const protocol::LocalLoginCredentials* credentials, Task* done) {
43 DCHECK(event_handler_); 43 DCHECK(event_handler_);
44 44
45 media::AutoTaskRunner done_runner(done); 45 media::AutoTaskRunner done_runner(done);
46 46
47 bool success = false; 47 bool success = false;
48 scoped_ptr<UserAuthenticator> authenticator(auth_factory_.Run()); 48 scoped_refptr<UserAuthenticator> authenticator(auth_factory_.Run());
49 switch (credentials->type()) { 49 switch (credentials->type()) {
50 case protocol::PASSWORD: 50 case protocol::PASSWORD:
51 success = authenticator->Authenticate(credentials->username(), 51 success = authenticator->Authenticate(credentials->username(),
52 credentials->credential()); 52 credentials->credential());
53 break; 53 break;
54 54
55 default: 55 default:
56 LOG(ERROR) << "Invalid credentials type " << credentials->type(); 56 LOG(ERROR) << "Invalid credentials type " << credentials->type();
57 break; 57 break;
58 } 58 }
(...skipping 24 matching lines...) Expand all
83 input_stub_->InjectMouseEvent(event, done); 83 input_stub_->InjectMouseEvent(event, done);
84 } 84 }
85 } 85 }
86 86
87 void ClientSession::Disconnect() { 87 void ClientSession::Disconnect() {
88 connection_->Disconnect(); 88 connection_->Disconnect();
89 authenticated_ = false; 89 authenticated_ = false;
90 } 90 }
91 91
92 } // namespace remoting 92 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698