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

Unified Diff: remoting/host/plugin/host_script_object.cc

Issue 7867019: Access Session::config() and Session::jid() on the correct thread only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 9 years, 3 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/plugin/host_script_object.h ('k') | remoting/host/register_support_host_request.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/plugin/host_script_object.cc
diff --git a/remoting/host/plugin/host_script_object.cc b/remoting/host/plugin/host_script_object.cc
index 2541a527b681bbff92dac5bf153102b8e6d14e05..598b96e5339ccd8f4ff483dbaa6cbd5fcdeb0d10 100644
--- a/remoting/host/plugin/host_script_object.cc
+++ b/remoting/host/plugin/host_script_object.cc
@@ -323,8 +323,7 @@ void HostNPScriptObject::OnAccessDenied() {
DisconnectInternal();
}
-void HostNPScriptObject::OnClientAuthenticated(
- remoting::protocol::ConnectionToClient* client) {
+void HostNPScriptObject::OnClientAuthenticated(const std::string& jid) {
DCHECK_EQ(MessageLoop::current(), host_context_.main_message_loop());
if (state_ == kDisconnecting) {
@@ -332,7 +331,7 @@ void HostNPScriptObject::OnClientAuthenticated(
return;
}
- client_username_ = client->session()->jid();
+ client_username_ = jid;
size_t pos = client_username_.find('/');
if (pos != std::string::npos)
client_username_.replace(pos, std::string::npos, "");
@@ -340,8 +339,7 @@ void HostNPScriptObject::OnClientAuthenticated(
SetState(kConnected);
}
-void HostNPScriptObject::OnClientDisconnected(
- remoting::protocol::ConnectionToClient* client) {
+void HostNPScriptObject::OnClientDisconnected(const std::string& jid) {
DCHECK_EQ(MessageLoop::current(), host_context_.main_message_loop());
client_username_.clear();
« no previous file with comments | « remoting/host/plugin/host_script_object.h ('k') | remoting/host/register_support_host_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698