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

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

Issue 8578013: Revert "Offline state detection for linux, using new D-Bus library." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « net/DEPS ('k') | net/base/network_change_notifier.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_H_ 5 #ifndef NET_BASE_NETWORK_CHANGE_NOTIFIER_H_
6 #define NET_BASE_NETWORK_CHANGE_NOTIFIER_H_ 6 #define NET_BASE_NETWORK_CHANGE_NOTIFIER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/observer_list_threadsafe.h" 10 #include "base/observer_list_threadsafe.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 NetworkChangeNotifier(); 129 NetworkChangeNotifier();
130 130
131 // Broadcasts a notification to all registered observers. Note that this 131 // Broadcasts a notification to all registered observers. Note that this
132 // happens asynchronously, even for observers on the current thread, even in 132 // happens asynchronously, even for observers on the current thread, even in
133 // tests. 133 // tests.
134 static void NotifyObserversOfIPAddressChange(); 134 static void NotifyObserversOfIPAddressChange();
135 static void NotifyObserversOfOnlineStateChange(); 135 static void NotifyObserversOfOnlineStateChange();
136 static void NotifyObserversOfDNSChange(); 136 static void NotifyObserversOfDNSChange();
137 137
138 private: 138 private:
139 friend class NetworkChangeNotifierLinuxTest;
140 friend class NetworkChangeNotifierWinTest; 139 friend class NetworkChangeNotifierWinTest;
141 140
142 // Allows a second NetworkChangeNotifier to be created for unit testing, so 141 // Allows a second NetworkChangeNotifier to be created for unit testing, so
143 // the test suite can create a MockNetworkChangeNotifier, but platform 142 // the test suite can create a MockNetworkChangeNotifier, but platform
144 // specific NetworkChangeNotifiers can also be created for testing. To use, 143 // specific NetworkChangeNotifiers can also be created for testing. To use,
145 // create an DisableForTest object, and then create the new 144 // create an DisableForTest object, and then create the new
146 // NetworkChangeNotifier object. The NetworkChangeNotifier must be 145 // NetworkChangeNotifier object. The NetworkChangeNotifier must be
147 // destroyed before the DisableForTest object, as its destruction will restore 146 // destroyed before the DisableForTest object, as its destruction will restore
148 // the original NetworkChangeNotifier. 147 // the original NetworkChangeNotifier.
149 class NET_EXPORT_PRIVATE DisableForTest { 148 class NET_EXPORT_PRIVATE DisableForTest {
(...skipping 12 matching lines...) Expand all
162 online_state_observer_list_; 161 online_state_observer_list_;
163 const scoped_refptr<ObserverListThreadSafe<DNSObserver> > 162 const scoped_refptr<ObserverListThreadSafe<DNSObserver> >
164 resolver_state_observer_list_; 163 resolver_state_observer_list_;
165 164
166 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifier); 165 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifier);
167 }; 166 };
168 167
169 } // namespace net 168 } // namespace net
170 169
171 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_H_ 170 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_H_
OLDNEW
« no previous file with comments | « net/DEPS ('k') | net/base/network_change_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698