Chromium Code Reviews| Index: base/feature_list.h |
| diff --git a/base/feature_list.h b/base/feature_list.h |
| index e9ed00a124ad8f701d05391ede500e0c5f84138b..8c166feac7a51feef57579bdf93b3b7ea0d7e56b 100644 |
| --- a/base/feature_list.h |
| +++ b/base/feature_list.h |
| @@ -165,8 +165,16 @@ class BASE_EXPORT FeatureList { |
| // process. This should only be called once and |instance| must not be null. |
| static void SetInstance(std::unique_ptr<FeatureList> instance); |
| - // Clears the previously-registered singleton instance for tests. |
| - static void ClearInstanceForTesting(); |
| + // Clears the previously-registered singleton instance for tests and returns |
| + // the old instance. |
| + // Note: Most tests should never call this directly, instead consider using |
|
Ilya Sherman
2016/08/09 01:06:57
nit: s/directly, instead/directly. Instead
Alexei Svitkine (slow)
2016/08/09 01:26:16
Done.
|
| + // base::test::ScopedFeatureList. |
| + static std::unique_ptr<FeatureList> ClearInstanceForTesting(); |
| + |
| + // Sets an existing (initialized) |instance| to be the singleton feature |
| + // list, for testing. Existing instance must be null. This is primarily |
|
Ilya Sherman
2016/08/09 01:06:57
nit: You use the word "existing" in two different
Alexei Svitkine (slow)
2016/08/09 01:26:16
Done.
|
| + // intended to support base::test::ScopedFeatureList helper class. |
| + static void RestoreInstanceForTesting(std::unique_ptr<FeatureList> instance); |
| private: |
| FRIEND_TEST_ALL_PREFIXES(FeatureListTest, CheckFeatureIdentity); |