| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef REMOTING_HOST_LOG_TO_SERVER_H_ | 5 #ifndef REMOTING_HOST_LOG_TO_SERVER_H_ |
| 6 #define REMOTING_HOST_LOG_TO_SERVER_H_ | 6 #define REMOTING_HOST_LOG_TO_SERVER_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 class ChromotingHost; | 30 class ChromotingHost; |
| 31 class IqSender; | 31 class IqSender; |
| 32 | 32 |
| 33 // LogToServer sends log entries to a server. | 33 // LogToServer sends log entries to a server. |
| 34 // The contents of the log entries are described in server_log_entry.cc. | 34 // The contents of the log entries are described in server_log_entry.cc. |
| 35 // They do not contain any personally identifiable information. | 35 // They do not contain any personally identifiable information. |
| 36 class LogToServer : public base::NonThreadSafe, | 36 class LogToServer : public base::NonThreadSafe, |
| 37 public HostStatusObserver, | 37 public HostStatusObserver, |
| 38 public SignalStrategy::Listener { | 38 public SignalStrategy::Listener { |
| 39 public: | 39 public: |
| 40 explicit LogToServer(ChromotingHost* host, | 40 LogToServer(ChromotingHost* host, |
| 41 ServerLogEntry::Mode mode, | 41 ServerLogEntry::Mode mode, |
| 42 SignalStrategy* signal_strategy); | 42 SignalStrategy* signal_strategy); |
| 43 virtual ~LogToServer(); | 43 virtual ~LogToServer(); |
| 44 | 44 |
| 45 // Logs a session state change. Currently, this is either | 45 // Logs a session state change. Currently, this is either |
| 46 // connection or disconnection. | 46 // connection or disconnection. |
| 47 void LogSessionStateChange(const std::string& jid, bool connected); | 47 void LogSessionStateChange(const std::string& jid, bool connected); |
| 48 | 48 |
| 49 // SignalStrategy::Listener interface. | 49 // SignalStrategy::Listener interface. |
| 50 virtual void OnSignalStrategyStateChange( | 50 virtual void OnSignalStrategyStateChange( |
| 51 SignalStrategy::State state) OVERRIDE; | 51 SignalStrategy::State state) OVERRIDE; |
| 52 virtual bool OnSignalStrategyIncomingStanza( | 52 virtual bool OnSignalStrategyIncomingStanza( |
| (...skipping 20 matching lines...) Expand all Loading... |
| 73 std::map<std::string, protocol::TransportRoute::RouteType> | 73 std::map<std::string, protocol::TransportRoute::RouteType> |
| 74 connection_route_type_; | 74 connection_route_type_; |
| 75 std::deque<ServerLogEntry> pending_entries_; | 75 std::deque<ServerLogEntry> pending_entries_; |
| 76 | 76 |
| 77 DISALLOW_COPY_AND_ASSIGN(LogToServer); | 77 DISALLOW_COPY_AND_ASSIGN(LogToServer); |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 } // namespace remoting | 80 } // namespace remoting |
| 81 | 81 |
| 82 #endif // REMOTING_HOST_LOG_TO_SERVER_H_ | 82 #endif // REMOTING_HOST_LOG_TO_SERVER_H_ |
| OLD | NEW |