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

Unified Diff: content/browser/renderer_host/p2p/socket_dispatcher_host.cc

Issue 11620007: Switch from OnIPAddressChanged and OnConnectionTypeChange to OnNetworkChanged Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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: content/browser/renderer_host/p2p/socket_dispatcher_host.cc
diff --git a/content/browser/renderer_host/p2p/socket_dispatcher_host.cc b/content/browser/renderer_host/p2p/socket_dispatcher_host.cc
index 7b8151d1fb918d90c05f730c3349a06a54cd28a3..1f1a8628693c1718b9a6ce987b0288d78e7da81e 100644
--- a/content/browser/renderer_host/p2p/socket_dispatcher_host.cc
+++ b/content/browser/renderer_host/p2p/socket_dispatcher_host.cc
@@ -106,7 +106,7 @@ void P2PSocketDispatcherHost::OnChannelClosing() {
dns_requests_.clear();
if (monitoring_networks_) {
- net::NetworkChangeNotifier::RemoveIPAddressObserver(this);
+ net::NetworkChangeNotifier::RemoveNetworkChangeObserver(this);
monitoring_networks_ = false;
}
}
@@ -134,7 +134,10 @@ bool P2PSocketDispatcherHost::OnMessageReceived(const IPC::Message& message,
return handled;
}
-void P2PSocketDispatcherHost::OnIPAddressChanged() {
+void P2PSocketDispatcherHost::OnNetworkChanged(
+ net::NetworkChangeNotifier::ConnectionType type) {
+ if (type != net::NetworkChangeNotifier::CONNECTION_NONE)
+ return;
szym 2013/01/20 06:52:08 Wondering if the renderer should still be told whe
// Notify the renderer about changes to list of network interfaces.
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE, base::Bind(
@@ -146,7 +149,7 @@ P2PSocketDispatcherHost::~P2PSocketDispatcherHost() {
DCHECK(dns_requests_.empty());
if (monitoring_networks_)
- net::NetworkChangeNotifier::RemoveIPAddressObserver(this);
+ net::NetworkChangeNotifier::RemoveNetworkChangeObserver(this);
}
P2PSocketHost* P2PSocketDispatcherHost::LookupSocket(int socket_id) {
@@ -157,7 +160,7 @@ P2PSocketHost* P2PSocketDispatcherHost::LookupSocket(int socket_id) {
void P2PSocketDispatcherHost::OnStartNetworkNotifications(
const IPC::Message& msg) {
if (!monitoring_networks_) {
- net::NetworkChangeNotifier::AddIPAddressObserver(this);
+ net::NetworkChangeNotifier::AddNetworkChangeObserver(this);
monitoring_networks_ = true;
}
@@ -169,7 +172,7 @@ void P2PSocketDispatcherHost::OnStartNetworkNotifications(
void P2PSocketDispatcherHost::OnStopNetworkNotifications(
const IPC::Message& msg) {
if (monitoring_networks_) {
- net::NetworkChangeNotifier::RemoveIPAddressObserver(this);
+ net::NetworkChangeNotifier::RemoveNetworkChangeObserver(this);
monitoring_networks_ = false;
}
}

Powered by Google App Engine
This is Rietveld 408576698