Commit 8be50f06 authored by pliard@chromium.org's avatar pliard@chromium.org

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
parent 50af11c5
......@@ -74,6 +74,7 @@ NetworkChangeNotifierAndroid::GetCurrentConnectionType() const {
void NetworkChangeNotifierAndroid::OnConnectionTypeChanged(
ConnectionType new_connection_type) {
SetConnectionType(new_connection_type);
NetworkChangeNotifier::NotifyObserversOfIPAddressChange();
NetworkChangeNotifier::NotifyObserversOfConnectionTypeChange();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment