OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <string> | 5 #include <string> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 NetworkHandler::Get()->network_state_handler()->RemoveObserver( | 77 NetworkHandler::Get()->network_state_handler()->RemoveObserver( |
78 this, FROM_HERE); | 78 this, FROM_HERE); |
79 DBusThreadManager::Get()->GetPowerManagerClient()->RemoveObserver(this); | 79 DBusThreadManager::Get()->GetPowerManagerClient()->RemoveObserver(this); |
80 } | 80 } |
81 | 81 |
82 net::NetworkChangeNotifier::ConnectionType | 82 net::NetworkChangeNotifier::ConnectionType |
83 NetworkChangeNotifierChromeos::GetCurrentConnectionType() const { | 83 NetworkChangeNotifierChromeos::GetCurrentConnectionType() const { |
84 return connection_type_; | 84 return connection_type_; |
85 } | 85 } |
86 | 86 |
87 void NetworkChangeNotifierChromeos::SystemResumed( | 87 void NetworkChangeNotifierChromeos::SuspendDone( |
88 const base::TimeDelta& sleep_duration) { | 88 const base::TimeDelta& sleep_duration) { |
89 // Force invalidation of network resources on resume. | 89 // Force invalidation of network resources on resume. |
90 NetworkChangeNotifier::NotifyObserversOfIPAddressChange(); | 90 NetworkChangeNotifier::NotifyObserversOfIPAddressChange(); |
91 } | 91 } |
92 | 92 |
93 | 93 |
94 void NetworkChangeNotifierChromeos::DefaultNetworkChanged( | 94 void NetworkChangeNotifierChromeos::DefaultNetworkChanged( |
95 const chromeos::NetworkState* default_network) { | 95 const chromeos::NetworkState* default_network) { |
96 bool connection_type_changed = false; | 96 bool connection_type_changed = false; |
97 bool ip_address_changed = false; | 97 bool ip_address_changed = false; |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 // produce a single signal when switching between network connections. | 230 // produce a single signal when switching between network connections. |
231 params.ip_address_offline_delay_ = base::TimeDelta::FromMilliseconds(4000); | 231 params.ip_address_offline_delay_ = base::TimeDelta::FromMilliseconds(4000); |
232 params.ip_address_online_delay_ = base::TimeDelta::FromMilliseconds(1000); | 232 params.ip_address_online_delay_ = base::TimeDelta::FromMilliseconds(1000); |
233 params.connection_type_offline_delay_ = | 233 params.connection_type_offline_delay_ = |
234 base::TimeDelta::FromMilliseconds(500); | 234 base::TimeDelta::FromMilliseconds(500); |
235 params.connection_type_online_delay_ = base::TimeDelta::FromMilliseconds(500); | 235 params.connection_type_online_delay_ = base::TimeDelta::FromMilliseconds(500); |
236 return params; | 236 return params; |
237 } | 237 } |
238 | 238 |
239 } // namespace chromeos | 239 } // namespace chromeos |
OLD | NEW |