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

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

Issue 9005034: Refactor SignalStrategy so that it can be reused for multiple connections. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/it2me_host_user_interface.cc ('k') | remoting/host/log_to_server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 21 matching lines...) Expand all
32 class LogToServer : public HostStatusObserver { 32 class LogToServer : public HostStatusObserver {
33 public: 33 public:
34 explicit LogToServer(base::MessageLoopProxy* message_loop); 34 explicit LogToServer(base::MessageLoopProxy* message_loop);
35 virtual ~LogToServer(); 35 virtual ~LogToServer();
36 36
37 // Logs a session state change. 37 // Logs a session state change.
38 // Currently, this is either connection or disconnection. 38 // Currently, this is either connection or disconnection.
39 void LogSessionStateChange(bool connected); 39 void LogSessionStateChange(bool connected);
40 40
41 // HostStatusObserver implementation. 41 // HostStatusObserver implementation.
42 virtual void OnSignallingConnected(SignalStrategy* signal_strategy, 42 virtual void OnSignallingConnected(SignalStrategy* signal_strategy) OVERRIDE;
43 const std::string& full_jid) OVERRIDE;
44 virtual void OnSignallingDisconnected() OVERRIDE; 43 virtual void OnSignallingDisconnected() OVERRIDE;
45 virtual void OnClientAuthenticated(const std::string& jid) OVERRIDE; 44 virtual void OnClientAuthenticated(const std::string& jid) OVERRIDE;
46 virtual void OnClientDisconnected(const std::string& jid) OVERRIDE; 45 virtual void OnClientDisconnected(const std::string& jid) OVERRIDE;
47 virtual void OnAccessDenied() OVERRIDE; 46 virtual void OnAccessDenied() OVERRIDE;
48 virtual void OnShutdown() OVERRIDE; 47 virtual void OnShutdown() OVERRIDE;
49 48
50 private: 49 private:
51 void Log(const ServerLogEntry& entry); 50 void Log(const ServerLogEntry& entry);
52 void SendPendingEntries(); 51 void SendPendingEntries();
53 52
54 scoped_refptr<base::MessageLoopProxy> message_loop_; 53 scoped_refptr<base::MessageLoopProxy> message_loop_;
55 scoped_ptr<IqSender> iq_sender_; 54 scoped_ptr<IqSender> iq_sender_;
56 std::deque<ServerLogEntry> pending_entries_; 55 std::deque<ServerLogEntry> pending_entries_;
57 56
58 DISALLOW_COPY_AND_ASSIGN(LogToServer); 57 DISALLOW_COPY_AND_ASSIGN(LogToServer);
59 }; 58 };
60 59
61 } // namespace remoting 60 } // namespace remoting
62 61
63 #endif // REMOTING_HOST_LOG_TO_SERVER_H_ 62 #endif // REMOTING_HOST_LOG_TO_SERVER_H_
OLDNEW
« no previous file with comments | « remoting/host/it2me_host_user_interface.cc ('k') | remoting/host/log_to_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698