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

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: 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
« no previous file with comments | « content/browser/net/browser_online_state_observer.cc ('k') | net/android/network_change_notifier_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d774718af19b4143e4a19569d236be7b0a5fe31b..3bffd1578e9f5becc261edc455a5e4ef34abd003 100644
--- a/content/browser/ppapi_plugin_process_host.cc
+++ b/content/browser/ppapi_plugin_process_host.cc
@@ -29,16 +29,16 @@ using content::ChildProcessHostImpl;
class PpapiPluginProcessHost::PluginNetworkObserver
: public net::NetworkChangeNotifier::IPAddressObserver,
- public net::NetworkChangeNotifier::OnlineStateObserver {
+ public net::NetworkChangeNotifier::ConnectionTypeObserver {
public:
explicit PluginNetworkObserver(PpapiPluginProcessHost* process_host)
: process_host_(process_host) {
net::NetworkChangeNotifier::AddIPAddressObserver(this);
- net::NetworkChangeNotifier::AddOnlineStateObserver(this);
+ net::NetworkChangeNotifier::AddConnectionTypeObserver(this);
}
~PluginNetworkObserver() {
- net::NetworkChangeNotifier::RemoveOnlineStateObserver(this);
+ net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this);
net::NetworkChangeNotifier::RemoveIPAddressObserver(this);
}
@@ -49,13 +49,15 @@ class PpapiPluginProcessHost::PluginNetworkObserver
// when I unplug and replug my network cable. Sending this notification when
// "something" changes seems to make Flash reasonably happy, but seems
// wrong. We should really be able to provide the real online state in
- // OnOnlineStateChanged().
+ // OnConnectionTypeChanged().
process_host_->Send(new PpapiMsg_SetNetworkState(true));
}
- // OnlineStateObserver implementation.
- virtual void OnOnlineStateChanged(bool online) OVERRIDE {
- process_host_->Send(new PpapiMsg_SetNetworkState(online));
+ // ConnectionTypeObserver implementation.
+ virtual void OnConnectionTypeChanged(
+ net::NetworkChangeNotifier::ConnectionType type) {
+ process_host_->Send(new PpapiMsg_SetNetworkState(
+ type != net::NetworkChangeNotifier::CONNECTION_NONE));
}
private:
« no previous file with comments | « content/browser/net/browser_online_state_observer.cc ('k') | net/android/network_change_notifier_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698