Chromium Code Reviews| 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(); |