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

Side by Side Diff: net/base/network_change_notifier_linux.h

Issue 9147026: API for connection type (Ethernet/WIFI/WWAN ...) in NetworkChangeNotifier. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Review comments 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_BASE_NETWORK_CHANGE_NOTIFIER_LINUX_H_ 5 #ifndef NET_BASE_NETWORK_CHANGE_NOTIFIER_LINUX_H_
6 #define NET_BASE_NETWORK_CHANGE_NOTIFIER_LINUX_H_ 6 #define NET_BASE_NETWORK_CHANGE_NOTIFIER_LINUX_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 15 matching lines...) Expand all
26 // Unittests inject a mock bus. 26 // Unittests inject a mock bus.
27 static NetworkChangeNotifierLinux* CreateForTest(dbus::Bus* bus); 27 static NetworkChangeNotifierLinux* CreateForTest(dbus::Bus* bus);
28 28
29 private: 29 private:
30 class Thread; 30 class Thread;
31 31
32 explicit NetworkChangeNotifierLinux(dbus::Bus* bus); 32 explicit NetworkChangeNotifierLinux(dbus::Bus* bus);
33 virtual ~NetworkChangeNotifierLinux(); 33 virtual ~NetworkChangeNotifierLinux();
34 34
35 // NetworkChangeNotifier: 35 // NetworkChangeNotifier:
36 virtual bool IsCurrentlyOffline() const OVERRIDE; 36 virtual ConnectionType GetCurrentConnectionType() const OVERRIDE;
37 37
38 // The thread used to listen for notifications. This relays the notification 38 // The thread used to listen for notifications. This relays the notification
39 // to the registered observers without posting back to the thread the object 39 // to the registered observers without posting back to the thread the object
40 // was created on. 40 // was created on.
41 scoped_ptr<Thread> notifier_thread_; 41 scoped_ptr<Thread> notifier_thread_;
42 42
43 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierLinux); 43 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierLinux);
44 }; 44 };
45 45
46 } // namespace net 46 } // namespace net
47 47
48 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_LINUX_H_ 48 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_LINUX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698