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

Unified Diff: chrome/browser/sessions/session_restore.cc

Issue 9147026: API for connection type (Ethernet/WIFI/WWAN ...) in NetworkChangeNotifier. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sessions/session_restore.cc
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index 1885791c40bedc6b93e07dac894522956fbc6817..78eef27b90a6722ef049cac5b41074414fcc0def 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -64,7 +64,7 @@ static const int kInitialDelayTimerMS = 100;
// This is not part of SessionRestoreImpl so that synchronous destruction
// of SessionRestoreImpl doesn't have timing problems.
class TabLoader : public content::NotificationObserver,
- public net::NetworkChangeNotifier::OnlineStateObserver {
+ public net::NetworkChangeNotifier::ConnectionStateObserver {
public:
explicit TabLoader(base::TimeTicks restore_started);
virtual ~TabLoader();
@@ -97,7 +97,8 @@ class TabLoader : public content::NotificationObserver,
const content::NotificationDetails& details) OVERRIDE;
// net::NetworkChangeNotifier::OnlineStateObserver overrides.
- virtual void OnOnlineStateChanged(bool online) OVERRIDE;
+ virtual void OnConnectionStateChanged(
+ net::NetworkChangeNotifier::ConnectionState state) OVERRIDE;
// Removes the listeners from the specified tab and removes the tab from
// the set of tabs to load and list of tabs we're waiting to get a load
@@ -165,7 +166,7 @@ TabLoader::TabLoader(base::TimeTicks restore_started)
TabLoader::~TabLoader() {
DCHECK((got_first_paint_ || render_widget_hosts_to_paint_.empty()) &&
tabs_loading_.empty() && tabs_to_load_.empty());
- net::NetworkChangeNotifier::RemoveOnlineStateObserver(this);
+ net::NetworkChangeNotifier::RemoveConnectionStateObserver(this);
}
void TabLoader::ScheduleLoad(NavigationController* controller) {
@@ -317,8 +318,9 @@ void TabLoader::Observe(int type,
delete this;
}
-void TabLoader::OnOnlineStateChanged(bool online) {
- if (online) {
+ void TabLoader::OnConnectionStateChanged(
+ net::NetworkChangeNotifier::ConnectionState state) {
+ if (state != net::NetworkChangeNotifier::NONE) {
joth 2012/01/10 10:48:35 nit: wrong indent
if (!loading_) {
loading_ = true;
LoadNextTab();

Powered by Google App Engine
This is Rietveld 408576698