Chromium Code Reviews| 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 bb4449c46f83ab27c680239f7fde4550afce58d5..a2a621c439e2d3eb37a8bb6be9395567192af2ee 100644 |
| --- a/content/browser/ppapi_plugin_process_host.cc |
| +++ b/content/browser/ppapi_plugin_process_host.cc |
| @@ -29,33 +29,19 @@ |
| namespace content { |
| class PpapiPluginProcessHost::PluginNetworkObserver |
| - : public net::NetworkChangeNotifier::IPAddressObserver, |
| - public net::NetworkChangeNotifier::ConnectionTypeObserver { |
| + : public net::NetworkChangeNotifier::NetworkChangeObserver { |
| public: |
| explicit PluginNetworkObserver(PpapiPluginProcessHost* process_host) |
| : process_host_(process_host) { |
| - net::NetworkChangeNotifier::AddIPAddressObserver(this); |
| - net::NetworkChangeNotifier::AddConnectionTypeObserver(this); |
| + net::NetworkChangeNotifier::AddNetworkChangeObserver(this); |
| } |
| ~PluginNetworkObserver() { |
| - net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this); |
| - net::NetworkChangeNotifier::RemoveIPAddressObserver(this); |
| + net::NetworkChangeNotifier::RemoveNetworkChangeObserver(this); |
| } |
| - // IPAddressObserver implementation. |
| - virtual void OnIPAddressChanged() OVERRIDE { |
| - // TODO(brettw) bug 90246: This doesn't seem correct. The online/offline |
|
szym
2013/01/20 06:52:08
Don't forget to add BUG=90246 to CL description.
|
| - // notification seems like it should be sufficient, but I don't see that |
| - // 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 |
| - // OnConnectionTypeChanged(). |
| - process_host_->Send(new PpapiMsg_SetNetworkState(true)); |
| - } |
| - |
| - // ConnectionTypeObserver implementation. |
| - virtual void OnConnectionTypeChanged( |
| + // NetworkChangeObserver implementation. |
| + virtual void OnNetworkChanged( |
| net::NetworkChangeNotifier::ConnectionType type) { |
| process_host_->Send(new PpapiMsg_SetNetworkState( |
| type != net::NetworkChangeNotifier::CONNECTION_NONE)); |