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

Unified Diff: content/browser/ppapi_plugin_process_host.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: content/browser/ppapi_plugin_process_host.cc
diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc
index 0178ed6e1c7c42a546e4b04e1cce373619866a9b..eae560cda181d92c897ae8ccfa10bc1207c6f87a 100644
--- a/content/browser/ppapi_plugin_process_host.cc
+++ b/content/browser/ppapi_plugin_process_host.cc
@@ -25,16 +25,16 @@ using content::ChildProcessHostImpl;
class PpapiPluginProcessHost::PluginNetworkObserver
: public net::NetworkChangeNotifier::IPAddressObserver,
- public net::NetworkChangeNotifier::OnlineStateObserver {
+ public net::NetworkChangeNotifier::ConnectionStateObserver {
public:
explicit PluginNetworkObserver(PpapiPluginProcessHost* process_host)
: process_host_(process_host) {
net::NetworkChangeNotifier::AddIPAddressObserver(this);
- net::NetworkChangeNotifier::AddOnlineStateObserver(this);
+ net::NetworkChangeNotifier::AddConnectionStateObserver(this);
}
~PluginNetworkObserver() {
- net::NetworkChangeNotifier::RemoveOnlineStateObserver(this);
+ net::NetworkChangeNotifier::RemoveConnectionStateObserver(this);
net::NetworkChangeNotifier::RemoveIPAddressObserver(this);
}
@@ -50,8 +50,10 @@ class PpapiPluginProcessHost::PluginNetworkObserver
}
// OnlineStateObserver implementation.
- virtual void OnOnlineStateChanged(bool online) OVERRIDE {
- process_host_->Send(new PpapiMsg_SetNetworkState(online));
+ virtual void OnConnectionStateChanged(
+ net::NetworkChangeNotifier::ConnectionState state) {
+ process_host_->Send(new PpapiMsg_SetNetworkState(
+ state != net::NetworkChangeNotifier::NONE));
}
private:

Powered by Google App Engine
This is Rietveld 408576698