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

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: - 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
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, "");
Wez 2011/09/12 22:40:44 Not related to this CL per-se, but should we be de
Sergey Ulanov 2011/09/12 22:53:22 We could use buzz::Jid class here, but it means th
@@ -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();

Powered by Google App Engine
This is Rietveld 408576698