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

Unified Diff: net/base/network_change_notifier_linux.h

Issue 8249008: Offline state detection for linux, using new D-Bus library. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added unittest Created 9 years, 2 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: net/base/network_change_notifier_linux.h
diff --git a/net/base/network_change_notifier_linux.h b/net/base/network_change_notifier_linux.h
index 89b054559d238d0d6aa06f00ad31c2f5eb0d7179..a5d3e0c98c631592fd39e050b8f0dd77369ce2e6 100644
--- a/net/base/network_change_notifier_linux.h
+++ b/net/base/network_change_notifier_linux.h
@@ -11,20 +11,28 @@
#include "base/memory/scoped_ptr.h"
#include "net/base/network_change_notifier.h"
+namespace dbus {
+class Bus;
+}
+
namespace net {
class NetworkChangeNotifierLinux : public NetworkChangeNotifier {
public:
NetworkChangeNotifierLinux();
-
- private:
- class Thread;
-
virtual ~NetworkChangeNotifierLinux();
- // NetworkChangeNotifier:
+ protected:
+ // For testing.
+ explicit NetworkChangeNotifierLinux(dbus::Bus* bus);
satorux1 2011/10/26 17:37:09 Function overloading is prohibited per our style g
adamk 2011/10/26 18:35:52 My reading of that section is not to prohibit oper
satorux1 2011/10/26 18:53:15 Let's go with 1).
adamk 2011/10/26 19:09:34 Actually, there's only one caller in production co
+
+ // NetworkChangeNotifier implementation.
+ // Protected for testing.
virtual bool IsCurrentlyOffline() const OVERRIDE;
+ private:
+ class Thread;
+
// The thread used to listen for notifications. This relays the notification
// to the registered observers without posting back to the thread the object
// was created on.

Powered by Google App Engine
This is Rietveld 408576698