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

Unified Diff: remoting/protocol/connection_to_client.cc

Issue 9288010: More plumbing for logging connection IP addresses (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix license headers 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
« no previous file with comments | « remoting/protocol/connection_to_client.h ('k') | remoting/protocol/protocol_mock_objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/connection_to_client.cc
diff --git a/remoting/protocol/connection_to_client.cc b/remoting/protocol/connection_to_client.cc
index de5b401ee5d96803e61cbbb0a2ed690faff18363..ea17201895b9ba347439467332eba312b7f70374 100644
--- a/remoting/protocol/connection_to_client.cc
+++ b/remoting/protocol/connection_to_client.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -25,6 +25,9 @@ ConnectionToClient::ConnectionToClient(protocol::Session* session)
session_->SetStateChangeCallback(
base::Bind(&ConnectionToClient::OnSessionStateChange,
base::Unretained(this)));
+ session_->SetRouteChangeCallback(
+ base::Bind(&ConnectionToClient::OnSessionRouteChange,
+ base::Unretained(this)));
}
ConnectionToClient::~ConnectionToClient() {
@@ -131,6 +134,11 @@ void ConnectionToClient::OnSessionStateChange(Session::State state) {
}
}
+void ConnectionToClient::OnSessionRouteChange(
+ const std::string& channel_name, const net::IPEndPoint& end_point) {
+ handler_->OnClientIpAddress(this, channel_name, end_point);
+}
+
void ConnectionToClient::OnChannelInitialized(bool successful) {
DCHECK(CalledOnValidThread());
« no previous file with comments | « remoting/protocol/connection_to_client.h ('k') | remoting/protocol/protocol_mock_objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698