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

Unified Diff: base/feature_list.h

Issue 2887523002: Avoid changing enabled features while the browser is already running.
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/feature_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/feature_list.h
diff --git a/base/feature_list.h b/base/feature_list.h
index c9f4a7b0c462805dfd622ef68317634bae251956..453deb32d0a1c0eeb0f02052102ce29fea3d7190 100644
--- a/base/feature_list.h
+++ b/base/feature_list.h
@@ -190,6 +190,12 @@ class BASE_EXPORT FeatureList {
// to support base::test::ScopedFeatureList helper class.
static void RestoreInstanceForTesting(std::unique_ptr<FeatureList> instance);
+ // Test harnesses should disallow calls to ClearInstanceForTesting and
+ // RestoreInstanceForTesting from test code, while the test code is running in
+ // presence of other threads that make use of base::FeatureList (because such
+ // calls are inherently racey).
+ static void BlockOverridingInstanceForTesting(bool block);
+
private:
FRIEND_TEST_ALL_PREFIXES(FeatureListTest, CheckFeatureIdentity);
FRIEND_TEST_ALL_PREFIXES(FeatureListTest,
« no previous file with comments | « no previous file | base/feature_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698