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

Unified Diff: content/browser/ppapi_plugin_process_host.cc

Issue 11620007: Switch from OnIPAddressChanged and OnConnectionTypeChange to OnNetworkChanged Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 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));

Powered by Google App Engine
This is Rietveld 408576698