| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 BASE_TEST_SCOPED_FEATURE_LIST_H_ | 5 #ifndef BASE_TEST_SCOPED_FEATURE_LIST_H_ |
| 6 #define BASE_TEST_SCOPED_FEATURE_LIST_H_ | 6 #define BASE_TEST_SCOPED_FEATURE_LIST_H_ |
| 7 | 7 |
| 8 #include <initializer_list> | 8 #include <initializer_list> |
| 9 | 9 |
| 10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 const std::string& disable_features); | 40 const std::string& disable_features); |
| 41 | 41 |
| 42 // Initializes and registers a FeatureList instance enabling a single | 42 // Initializes and registers a FeatureList instance enabling a single |
| 43 // feature. | 43 // feature. |
| 44 void InitAndEnableFeature(const base::Feature& feature); | 44 void InitAndEnableFeature(const base::Feature& feature); |
| 45 | 45 |
| 46 // Initializes and registers a FeatureList instance disabling a single | 46 // Initializes and registers a FeatureList instance disabling a single |
| 47 // feature. | 47 // feature. |
| 48 void InitAndDisableFeature(const base::Feature& feature); | 48 void InitAndDisableFeature(const base::Feature& feature); |
| 49 | 49 |
| 50 // Initializes and registers a FeatureList instance with |
| 51 // override_enabled_features and override_disabled_features overrides |
| 52 // current feature_list. |
| 53 void InitWithFeatureListAndOverrides( |
| 54 const std::vector<std::string>& override_enabled_features, |
| 55 const std::vector<std::string>& override_disabled_features); |
| 56 |
| 50 private: | 57 private: |
| 51 std::unique_ptr<FeatureList> original_feature_list_; | 58 std::unique_ptr<FeatureList> original_feature_list_; |
| 52 | 59 |
| 53 DISALLOW_COPY_AND_ASSIGN(ScopedFeatureList); | 60 DISALLOW_COPY_AND_ASSIGN(ScopedFeatureList); |
| 54 }; | 61 }; |
| 55 | 62 |
| 56 } // namespace test | 63 } // namespace test |
| 57 } // namespace base | 64 } // namespace base |
| 58 | 65 |
| 59 #endif // BASE_TEST_SCOPED_FEATURE_LIST_H_ | 66 #endif // BASE_TEST_SCOPED_FEATURE_LIST_H_ |
| OLD | NEW |