Chromium Code Reviews| 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); |