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

Unified Diff: remoting/protocol/connection_to_client.cc

Issue 6711033: A new authenticated connection evicts an old one. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync. 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/protocol/connection_to_client.h ('k') | remoting/protocol/connection_to_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/connection_to_client.cc
diff --git a/remoting/protocol/connection_to_client.cc b/remoting/protocol/connection_to_client.cc
index 11101cd1a72144b5f9e95688945f6db85d83cfb2..4ec9a0b4aa5606a2be099d39fc24cf14a5666d20 100644
--- a/remoting/protocol/connection_to_client.cc
+++ b/remoting/protocol/connection_to_client.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -23,12 +23,11 @@ static const size_t kAverageUpdateStream = 10;
ConnectionToClient::ConnectionToClient(MessageLoop* message_loop,
EventHandler* handler,
- HostStub* host_stub,
InputStub* input_stub)
: client_authenticated_(false),
loop_(message_loop),
handler_(handler),
- host_stub_(host_stub),
+ host_stub_(NULL),
input_stub_(input_stub) {
DCHECK(loop_);
DCHECK(handler_);
@@ -76,6 +75,14 @@ ClientStub* ConnectionToClient::client_stub() {
return client_stub_.get();
}
+protocol::HostStub* ConnectionToClient::host_stub() {
+ return host_stub_;
+}
+
+void ConnectionToClient::set_host_stub(protocol::HostStub* host_stub) {
+ host_stub_ = host_stub;
+}
+
void ConnectionToClient::OnSessionStateChange(protocol::Session::State state) {
if (state == protocol::Session::CONNECTED) {
client_stub_.reset(new ClientControlSender(session_->control_channel()));
@@ -145,5 +152,9 @@ void ConnectionToClient::OnClientAuthenticated() {
client_stub_->OnAuthenticated();
}
+bool ConnectionToClient::client_authenticated() {
+ return client_authenticated_;
+}
+
} // namespace protocol
} // namespace remoting
« no previous file with comments | « remoting/protocol/connection_to_client.h ('k') | remoting/protocol/connection_to_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698