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

Unified Diff: remoting/host/log_to_server.h

Issue 10413035: [Chromoting] LogToServer correctly handles multiple simultaneous connections. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | « no previous file | remoting/host/log_to_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/log_to_server.h
diff --git a/remoting/host/log_to_server.h b/remoting/host/log_to_server.h
index f17b3af86bc9c1fa8bb2bbd47e6fa0aead232654..5d8ed1aab2be2e18ce77e5954408161a9f1aaeae 100644
--- a/remoting/host/log_to_server.h
+++ b/remoting/host/log_to_server.h
@@ -6,6 +6,8 @@
#define REMOTING_HOST_LOG_TO_SERVER_H_
#include <deque>
+#include <map>
+#include <string>
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
@@ -42,7 +44,7 @@ class LogToServer : public base::NonThreadSafe,
// Logs a session state change. Currently, this is either
// connection or disconnection.
- void LogSessionStateChange(bool connected);
+ void LogSessionStateChange(const std::string& jid, bool connected);
// SignalStrategy::Listener interface.
virtual void OnSignalStrategyStateChange(
@@ -59,6 +61,18 @@ class LogToServer : public base::NonThreadSafe,
virtual void OnShutdown() OVERRIDE;
private:
+ class ConnectionInfo {
+ public:
+ ConnectionInfo();
+ void set_route_type(const protocol::TransportRoute::RouteType& route_type);
+ protocol::TransportRoute::RouteType get_route_type() const;
+ bool get_route_type_set() const;
+
+ private:
+ protocol::TransportRoute::RouteType route_type_;
+ bool route_type_set_;
Wez 2012/05/21 20:40:13 Can you use the presence of an entry for the clien
simonmorris 2012/05/21 22:34:36 Done.
+ };
+
void Log(const ServerLogEntry& entry);
void SendPendingEntries();
@@ -66,8 +80,8 @@ class LogToServer : public base::NonThreadSafe,
ServerLogEntry::Mode mode_;
SignalStrategy* signal_strategy_;
scoped_ptr<IqSender> iq_sender_;
- protocol::TransportRoute::RouteType connection_type_;
- bool connection_type_set_;
+ // A map from client JID to info about that client's connection to this host.
+ std::map<std::string, ConnectionInfo> connection_info_;
std::deque<ServerLogEntry> pending_entries_;
DISALLOW_COPY_AND_ASSIGN(LogToServer);
« no previous file with comments | « no previous file | remoting/host/log_to_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698