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

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: Fixed a typo Created 8 years, 7 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 ffea378ce7c3c9325ce2b1387bcc5d231c1adacb..bb6cbbe1688c3a14d306c5339f45010a657722aa 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -80,7 +80,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::ConnectionTypeObserver,
public base::RefCounted<TabLoader> {
public:
// Retrieves a pointer to the TabLoader instance shared between profiles, or
@@ -120,8 +120,9 @@ class TabLoader : public content::NotificationObserver,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
- // net::NetworkChangeNotifier::OnlineStateObserver overrides.
- virtual void OnOnlineStateChanged(bool online) OVERRIDE;
+ // net::NetworkChangeNotifier::ConnectionTypeObserver overrides.
+ virtual void OnConnectionTypeChanged(
+ net::NetworkChangeNotifier::ConnectionType type) 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
@@ -226,7 +227,7 @@ void TabLoader::StartLoading() {
loading_ = true;
LoadNextTab();
} else {
- net::NetworkChangeNotifier::AddOnlineStateObserver(this);
+ net::NetworkChangeNotifier::AddConnectionTypeObserver(this);
}
#else
loading_ = true;
@@ -246,7 +247,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::RemoveConnectionTypeObserver(this);
shared_tab_loader = NULL;
}
@@ -369,8 +370,9 @@ void TabLoader::Observe(int type,
this_retainer_ = NULL;
}
-void TabLoader::OnOnlineStateChanged(bool online) {
- if (online) {
+void TabLoader::OnConnectionTypeChanged(
+ net::NetworkChangeNotifier::ConnectionType type) {
+ if (type != net::NetworkChangeNotifier::CONNECTION_NONE) {
if (!loading_) {
loading_ = true;
LoadNextTab();
« no previous file with comments | « chrome/browser/chromeos/web_socket_proxy_controller.cc ('k') | content/browser/net/browser_online_state_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698