 Chromium Code Reviews
 Chromium Code Reviews Issue 8249008:
  Offline state detection for linux, using new D-Bus library.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 8249008:
  Offline state detection for linux, using new D-Bus library.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| 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..6e36eb95f3fa61eec3baa3f2ba93bbfc0f34528c 100644 | 
| --- a/net/base/network_change_notifier_linux.h | 
| +++ b/net/base/network_change_notifier_linux.h | 
| @@ -11,15 +11,29 @@ | 
| #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(); | 
| + // Unittests inject a mock bus. | 
| + static NetworkChangeNotifierLinux* CreateForTest(dbus::Bus* bus) { | 
| 
satorux1
2011/10/26 18:53:15
I'm slightly worrying about inlining the function
 
adamk
2011/10/26 19:09:34
Done (though my memory is that clang cares more ab
 | 
| + return new NetworkChangeNotifierLinux(bus); | 
| + } | 
| + | 
| + protected: | 
| + | 
| private: | 
| class Thread; | 
| + // For unittests. | 
| + explicit NetworkChangeNotifierLinux(dbus::Bus* bus); | 
| + | 
| virtual ~NetworkChangeNotifierLinux(); | 
| // NetworkChangeNotifier: |