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

Unified Diff: net/base/network_change_notifier.h

Issue 1255263002: Remove a race around NetworkChangeNotifier::test_notifications_only_ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Possible iOS fix Created 5 years, 5 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
« no previous file with comments | « content/browser/net_info_browsertest.cc ('k') | net/base/network_change_notifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/network_change_notifier.h
diff --git a/net/base/network_change_notifier.h b/net/base/network_change_notifier.h
index df6792f7dcfe6c172fe1a78a326a3a88308f8f16..abced4859a29857b493bf52012a0041ad6c9828b 100644
--- a/net/base/network_change_notifier.h
+++ b/net/base/network_change_notifier.h
@@ -312,7 +312,8 @@ class NET_EXPORT NetworkChangeNotifier {
// Enable or disable notifications from the host. After setting to true, be
// sure to pump the RunLoop until idle to finish any preexisting
- // notifications.
+ // notifications. To use this, it must must be called before a
+ // NetworkChangeNotifier is created.
static void SetTestNotificationsOnly(bool test_only);
// Return a string equivalent to |type|.
@@ -451,7 +452,7 @@ class NET_EXPORT NetworkChangeNotifier {
scoped_ptr<NetworkChangeCalculator> network_change_calculator_;
// Set true to disable non-test notifications (to prevent flakes in tests).
- bool test_notifications_only_;
+ static bool test_notifications_only_;
DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifier);
};
« no previous file with comments | « content/browser/net_info_browsertest.cc ('k') | net/base/network_change_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698