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

Side by Side Diff: chromeos/network/network_change_notifier_chromeos.cc

Issue 240343004: chromeos: Update IdleActionImminent and SuspendDone handling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 6 years, 8 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« chromeos/dbus/power_manager_client.cc ('K') | « chromeos/network/network_change_notifier_chromeos.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698