summaryrefslogtreecommitdiffstats
path: root/net/android
diff options
context:
space:
mode:
authorpliard@chromium.org <pliard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-03 16:40:42 +0000
committerpliard@chromium.org <pliard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-03 16:40:42 +0000
commit8be50f06b56d45e148a0f84118ba0f8c2aa61db0 (patch)
tree232be31ece62637d7554a05dc4b40a519506d598 /net/android
parent50af11c56b5e151d15f1a03ed275341680385707 (diff)
downloadchromium_src-8be50f06b56d45e148a0f84118ba0f8c2aa61db0.zip
chromium_src-8be50f06b56d45e148a0f84118ba0f8c2aa61db0.tar.gz
chromium_src-8be50f06b56d45e148a0f84118ba0f8c2aa61db0.tar.bz2
Send 'IP address changed' events on Android when connection type changes.
NetworkChangeNotifierAndroid was only firing 'network connection changed' events although many clients subscribe to 'IP address changed events'. One of them is ClientSocketPoolBaseHelper which invalidates its socket pool whenever the IP address changes. The lack of this notification on Android could have led to an invalid socket being used. This is a first approach. Later on this can be improved to only fire the notification when the IP address actually changed. This issue was found as part of the following bug investigation although this CL doesn't claim to fix the bug. BUG=149231 Review URL: https://codereview.chromium.org/11411287 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170746 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/android')
-rw-r--r--net/android/network_change_notifier_android.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/android/network_change_notifier_android.cc b/net/android/network_change_notifier_android.cc
index 18b3fb1..b765c85 100644
--- a/net/android/network_change_notifier_android.cc
+++ b/net/android/network_change_notifier_android.cc
@@ -74,6 +74,7 @@ NetworkChangeNotifierAndroid::GetCurrentConnectionType() const {
void NetworkChangeNotifierAndroid::OnConnectionTypeChanged(
ConnectionType new_connection_type) {
SetConnectionType(new_connection_type);
+ NetworkChangeNotifier::NotifyObserversOfIPAddressChange();
NetworkChangeNotifier::NotifyObserversOfConnectionTypeChange();
}