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

Side by Side Diff: remoting/host/log_to_server.h

Issue 8468015: The host sends simple log entries to the server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review. Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/host/log_to_server.cc » ('j') | remoting/host/log_to_server_unittest.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_HOST_LOG_TO_SERVER_H_
6 #define REMOTING_HOST_LOG_TO_SERVER_H_
7
8 #include <deque>
9
10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "remoting/host/host_status_observer.h"
13 #include "remoting/host/server_log_entry.h"
14
15 namespace base {
16 class MessageLoopProxy;
17 } // namespace base
18
19 namespace buzz {
20 class XmlElement;
21 } // namespace buzz
22
23 namespace remoting {
24
25 class IqSender;
26
27 class LogToServer : public HostStatusObserver {
28 public:
29 explicit LogToServer(base::MessageLoopProxy* message_loop);
30 virtual ~LogToServer();
31
32 // Logs a session state change.
33 // Currently, this is either connection or disconnection.
34 void LogSessionStateChange(bool connected);
35
36 // HostStatusObserver implementation.
37 virtual void OnSignallingConnected(SignalStrategy* signal_strategy,
38 const std::string& full_jid) OVERRIDE;
39 virtual void OnSignallingDisconnected() OVERRIDE;
40 virtual void OnClientAuthenticated(const std::string& jid) OVERRIDE;
41 virtual void OnClientDisconnected(const std::string& jid) OVERRIDE;
42 virtual void OnAccessDenied() OVERRIDE;
43 virtual void OnShutdown() OVERRIDE;
44
45 private:
46 void Log(const ServerLogEntry& entry);
47 void SendPendingEntries();
48
49 scoped_refptr<base::MessageLoopProxy> message_loop_;
50 scoped_ptr<IqSender> iq_sender_;
51 std::deque<ServerLogEntry> pending_entries_;
52
53 DISALLOW_COPY_AND_ASSIGN(LogToServer);
54 };
55
56 } // namespace remoting
57
58 #endif // REMOTING_HOST_LOG_TO_SERVER_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/log_to_server.cc » ('j') | remoting/host/log_to_server_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698