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

Unified Diff: remoting/protocol/connection_to_client.h

Issue 9288010: More plumbing for logging connection IP addresses (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 side-by-side diff with in-line comments
Download patch
Index: remoting/protocol/connection_to_client.h
diff --git a/remoting/protocol/connection_to_client.h b/remoting/protocol/connection_to_client.h
index 1b3490f716fd17640a91f2b8af25ea2540145643..99fdb3039dba5d4d6f3fc912e419e70af5d98478 100644
--- a/remoting/protocol/connection_to_client.h
+++ b/remoting/protocol/connection_to_client.h
@@ -6,6 +6,7 @@
#define REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_
#include <deque>
+#include <string>
#include <vector>
#include "base/memory/scoped_ptr.h"
@@ -14,6 +15,10 @@
#include "remoting/protocol/session.h"
#include "remoting/protocol/video_writer.h"
+namespace net {
+class IPEndPoint;
+} // namespace net
+
namespace remoting {
namespace protocol {
@@ -45,6 +50,12 @@ class ConnectionToClient : public base::NonThreadSafe {
// Called when sequence number is updated.
virtual void OnSequenceNumberUpdated(ConnectionToClient* connection,
int64 sequence_number) = 0;
+
+ // Called on notification of a route change event, which happens when a
+ // channel is connected.
+ virtual void OnClientIpEndPoint(ConnectionToClient* connection,
Sergey Ulanov 2012/01/25 01:56:48 Maybe call it OnClientIpAddress?
Lambros 2012/01/25 19:27:10 Done.
+ const std::string& channel_name,
+ const net::IPEndPoint& end_point) = 0;
};
// Constructs a ConnectionToClient object for the |session|. Takes
@@ -52,9 +63,8 @@ class ConnectionToClient : public base::NonThreadSafe {
explicit ConnectionToClient(Session* session);
virtual ~ConnectionToClient();
- // Set |event_handler| for connection events. |event_handler| is
- // guaranteed to be used only on the network thread. Must be called
- // once when this object is created.
+ // Set |event_handler| for connection events. Must be called once when this
+ // object is created.
void SetEventHandler(EventHandler* event_handler);
// Returns the connection in use.
@@ -81,6 +91,9 @@ class ConnectionToClient : public base::NonThreadSafe {
// Callback for protocol Session.
void OnSessionStateChange(Session::State state);
+ void OnSessionRouteChange(const std::string& channel_name,
+ const net::IPEndPoint& end_point);
+
// Callback for channel initialization.
void OnChannelInitialized(bool successful);

Powered by Google App Engine
This is Rietveld 408576698