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

Unified Diff: chrome/browser/chromeos/net/network_change_notifier_chromeos.cc

Issue 11360108: Start calculating new combined NetworkChangeNotifier signal (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Switch to default argument constructor Created 8 years 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 | « chrome/browser/chromeos/net/network_change_notifier_chromeos.h ('k') | chrome/browser/io_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/net/network_change_notifier_chromeos.cc
diff --git a/chrome/browser/chromeos/net/network_change_notifier_chromeos.cc b/chrome/browser/chromeos/net/network_change_notifier_chromeos.cc
index 78d62be40a62f895b29a060d80b4ca3709231d13..4cc06a43a00a2ffdd155d4f8d2d22dd2a2fb2bb3 100644
--- a/chrome/browser/chromeos/net/network_change_notifier_chromeos.cc
+++ b/chrome/browser/chromeos/net/network_change_notifier_chromeos.cc
@@ -52,7 +52,8 @@ class NetworkChangeNotifierChromeos::DnsConfigServiceChromeos
};
NetworkChangeNotifierChromeos::NetworkChangeNotifierChromeos()
- : has_active_network_(false),
+ : NetworkChangeNotifier(NetworkChangeCalculatorParamsChromeos()),
+ has_active_network_(false),
connection_state_(chromeos::STATE_UNKNOWN),
connection_type_(CONNECTION_NONE),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
@@ -333,4 +334,17 @@ NetworkChangeNotifierChromeos::GetNetworkConnectionType(
return net::NetworkChangeNotifier::CONNECTION_UNKNOWN;
}
+// static
+net::NetworkChangeNotifier::NetworkChangeCalculatorParams
+NetworkChangeNotifierChromeos::NetworkChangeCalculatorParamsChromeos() {
+ 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(4000);
+ params.ip_address_online_delay_ = base::TimeDelta::FromMilliseconds(1000);
+ params.connection_type_offline_delay_ = base::TimeDelta::FromMilliseconds(0);
+ params.connection_type_online_delay_ = base::TimeDelta::FromMilliseconds(0);
+ return params;
+}
+
} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/net/network_change_notifier_chromeos.h ('k') | chrome/browser/io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698