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

Unified Diff: content/browser/web_contents/web_contents_impl.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: sync 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: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 2aba4bcb91a3ec52f4d25e195000466ec695f8ed..1d1f40d8ab0acfa91eedf5c3abc4b24b38c872ff 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -507,7 +507,8 @@ WebPreferences WebContentsImpl::GetWebkitPrefs(RenderViewHost* rvh,
prefs.javascript_enabled = true;
}
- prefs.is_online = !net::NetworkChangeNotifier::IsOffline();
+ prefs.is_online = net::NetworkChangeNotifier::ConnectionType() !=
+ net::NetworkChangeNotifier::CONNECTION_NONE;
// Force accelerated compositing and 2d canvas off for chrome:, about: and
// chrome-devtools: pages (unless it's specifically allowed).

Powered by Google App Engine
This is Rietveld 408576698