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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 317933002: Use the provided connection type to determine if online. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename IPC message. Also fix render_view_host_implc race. Created 6 years, 6 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
« no previous file with comments | « content/browser/net/browser_online_state_observer.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 8198f2d145471b40052ef1171e54f17b62d835ed..2fae159517522ce1f3ce0dfca70751dae208b159 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -460,8 +460,9 @@ WebPreferences RenderViewHostImpl::GetWebkitPrefs(const GURL& url) {
prefs.javascript_enabled = true;
}
- prefs.is_online = !net::NetworkChangeNotifier::IsOffline();
prefs.connection_type = net::NetworkChangeNotifier::GetConnectionType();
+ prefs.is_online =
+ prefs.connection_type != net::NetworkChangeNotifier::CONNECTION_NONE;
prefs.gesture_tap_highlight_enabled = !command_line.HasSwitch(
switches::kDisableGestureTapHighlight);
« no previous file with comments | « content/browser/net/browser_online_state_observer.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698