| Index: base/feature_list.h
|
| diff --git a/base/feature_list.h b/base/feature_list.h
|
| index e9ed00a124ad8f701d05391ede500e0c5f84138b..698ecd533423e06c85a6748bd7d85ab23a46fb96 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
|
| + // base::test::ScopedFeatureList.
|
| + static std::unique_ptr<FeatureList> ClearInstanceForTesting();
|
| +
|
| + // Sets a given (initialized) |instance| to be the singleton feature list,
|
| + // for testing. Existing instance must be null. This is primarily intended
|
| + // to support base::test::ScopedFeatureList helper class.
|
| + static void RestoreInstanceForTesting(std::unique_ptr<FeatureList> instance);
|
|
|
| private:
|
| FRIEND_TEST_ALL_PREFIXES(FeatureListTest, CheckFeatureIdentity);
|
|
|