| Index: net/base/network_change_notifier_linux.cc
|
| diff --git a/net/base/network_change_notifier_linux.cc b/net/base/network_change_notifier_linux.cc
|
| index fc2b3720f9d61d6a842dc17f991ba646165c8a0b..1a16f04ab4bfca2e1ee3b2ae28f4cb85e7763d10 100644
|
| --- a/net/base/network_change_notifier_linux.cc
|
| +++ b/net/base/network_change_notifier_linux.cc
|
| @@ -69,7 +69,8 @@ NetworkChangeNotifierLinux* NetworkChangeNotifierLinux::Create() {
|
| }
|
|
|
| NetworkChangeNotifierLinux::NetworkChangeNotifierLinux()
|
| - : notifier_thread_(new Thread()) {
|
| + : NetworkChangeNotifier(NetworkChangeCalculatorParamsLinux()),
|
| + notifier_thread_(new Thread()) {
|
| // We create this notifier thread because the notification implementation
|
| // needs a MessageLoopForIO, and there's no guarantee that
|
| // MessageLoop::current() meets that criterion.
|
| @@ -83,6 +84,20 @@ NetworkChangeNotifierLinux::~NetworkChangeNotifierLinux() {
|
| notifier_thread_->Stop();
|
| }
|
|
|
| +// static
|
| +NetworkChangeNotifier::NetworkChangeCalculatorParams
|
| +NetworkChangeNotifierLinux::NetworkChangeCalculatorParamsLinux() {
|
| + NetworkChangeCalculatorParams params;
|
| + // Delay values arrived at by simple experimentation and adjusted so as to
|
| + // produce a single signal when switching between network connections.
|
| + params.ip_address_offline_delay_ = base::TimeDelta::FromMilliseconds(2000);
|
| + params.ip_address_online_delay_ = base::TimeDelta::FromMilliseconds(2000);
|
| + params.connection_type_offline_delay_ =
|
| + base::TimeDelta::FromMilliseconds(1500);
|
| + params.connection_type_online_delay_ = base::TimeDelta::FromMilliseconds(500);
|
| + return params;
|
| +}
|
| +
|
| NetworkChangeNotifier::ConnectionType
|
| NetworkChangeNotifierLinux::GetCurrentConnectionType() const {
|
| return notifier_thread_->GetCurrentConnectionType();
|
|
|