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

Unified Diff: remoting/protocol/connection_to_host.cc

Issue 6594138: Block event processing on host/client until the client has authenticated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mock objects for unittests Created 9 years, 10 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
Index: remoting/protocol/connection_to_host.cc
diff --git a/remoting/protocol/connection_to_host.cc b/remoting/protocol/connection_to_host.cc
index 27d2da1cd3fa7784e90cdacb5f3f990cb50c3b74..7b640c55931f9ba3fbb63a9f27b3a529056a6796 100644
--- a/remoting/protocol/connection_to_host.cc
+++ b/remoting/protocol/connection_to_host.cc
@@ -22,7 +22,8 @@ namespace remoting {
namespace protocol {
ConnectionToHost::ConnectionToHost(JingleThread* thread)
- : thread_(thread),
+ : client_authenticated_(false),
+ thread_(thread),
event_callback_(NULL),
dispatcher_(new ClientMessageDispatcher()) {
}
@@ -196,5 +197,14 @@ void ConnectionToHost::OnSessionStateChange(
}
}
+void ConnectionToHost::SetClientAuthenticated(bool auth) {
+ client_authenticated_ = auth;
+
+ // Enable/disable each of the channels.
+ input_stub_->SetEnable(auth);
+ host_stub_->SetEnable(auth);
+ client_stub_->SetEnable(auth);
+}
+
} // namespace protocol
} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698