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

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

Issue 10928193: Add native-side unit test for Android NetworkChangeNotifier (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebasing Created 8 years, 3 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
« no previous file with comments | « net/android/network_change_notifier_factory_android.cc ('k') | net/net.gyp » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/observer_list_threadsafe.h" 9 #include "base/observer_list_threadsafe.h"
10 #include "net/base/net_export.h" 10 #include "net/base/net_export.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 // tests. 187 // tests.
188 static void NotifyObserversOfIPAddressChange(); 188 static void NotifyObserversOfIPAddressChange();
189 static void NotifyObserversOfConnectionTypeChange(); 189 static void NotifyObserversOfConnectionTypeChange();
190 static void NotifyObserversOfDNSChange(); 190 static void NotifyObserversOfDNSChange();
191 191
192 // Stores |config| in NetworkState and notifies observers. 192 // Stores |config| in NetworkState and notifies observers.
193 static void SetDnsConfig(const DnsConfig& config); 193 static void SetDnsConfig(const DnsConfig& config);
194 194
195 private: 195 private:
196 friend class HostResolverImplDnsTest; 196 friend class HostResolverImplDnsTest;
197 friend class NetworkChangeNotifierAndroidTest;
197 friend class NetworkChangeNotifierLinuxTest; 198 friend class NetworkChangeNotifierLinuxTest;
198 friend class NetworkChangeNotifierWinTest; 199 friend class NetworkChangeNotifierWinTest;
199 200
200 class NetworkState; 201 class NetworkState;
201 202
202 // Allows a second NetworkChangeNotifier to be created for unit testing, so 203 // Allows a second NetworkChangeNotifier to be created for unit testing, so
203 // the test suite can create a MockNetworkChangeNotifier, but platform 204 // the test suite can create a MockNetworkChangeNotifier, but platform
204 // specific NetworkChangeNotifiers can also be created for testing. To use, 205 // specific NetworkChangeNotifiers can also be created for testing. To use,
205 // create an DisableForTest object, and then create the new 206 // create an DisableForTest object, and then create the new
206 // NetworkChangeNotifier object. The NetworkChangeNotifier must be 207 // NetworkChangeNotifier object. The NetworkChangeNotifier must be
(...skipping 21 matching lines...) Expand all
228 229
229 // A little-piggy-back observer that simply logs UMA histogram data. 230 // A little-piggy-back observer that simply logs UMA histogram data.
230 scoped_ptr<HistogramWatcher> histogram_watcher_; 231 scoped_ptr<HistogramWatcher> histogram_watcher_;
231 232
232 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifier); 233 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifier);
233 }; 234 };
234 235
235 } // namespace net 236 } // namespace net
236 237
237 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_H_ 238 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_H_
OLDNEW
« no previous file with comments | « net/android/network_change_notifier_factory_android.cc ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698