| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_FEATURE_LIST_H_ | 5 #ifndef BASE_FEATURE_LIST_H_ |
| 6 #define BASE_FEATURE_LIST_H_ | 6 #define BASE_FEATURE_LIST_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // | 66 // |
| 67 // Features can be explicitly forced on or off by specifying a list of comma- | 67 // Features can be explicitly forced on or off by specifying a list of comma- |
| 68 // separated feature names via the following command-line flags: | 68 // separated feature names via the following command-line flags: |
| 69 // | 69 // |
| 70 // --enable-features=Feature5,Feature7 | 70 // --enable-features=Feature5,Feature7 |
| 71 // --disable-features=Feature1,Feature2,Feature3 | 71 // --disable-features=Feature1,Feature2,Feature3 |
| 72 // | 72 // |
| 73 // After initialization (which should be done single-threaded), the FeatureList | 73 // After initialization (which should be done single-threaded), the FeatureList |
| 74 // API is thread safe. | 74 // API is thread safe. |
| 75 // | 75 // |
| 76 // To integrate with Finch for experimental control, Googlers can read |
| 77 // go/finch-feature-api |
| 78 // |
| 76 // Note: This class is a singleton, but does not use base/memory/singleton.h in | 79 // Note: This class is a singleton, but does not use base/memory/singleton.h in |
| 77 // order to have control over its initialization sequence. Specifically, the | 80 // order to have control over its initialization sequence. Specifically, the |
| 78 // intended use is to create an instance of this class and fully initialize it, | 81 // intended use is to create an instance of this class and fully initialize it, |
| 79 // before setting it as the singleton for a process, via SetInstance(). | 82 // before setting it as the singleton for a process, via SetInstance(). |
| 80 class BASE_EXPORT FeatureList { | 83 class BASE_EXPORT FeatureList { |
| 81 public: | 84 public: |
| 82 FeatureList(); | 85 FeatureList(); |
| 83 ~FeatureList(); | 86 ~FeatureList(); |
| 84 | 87 |
| 85 // Initializes feature overrides via command-line flags |enable_features| and | 88 // Initializes feature overrides via command-line flags |enable_features| and |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 | 280 |
| 278 // Whether this object has been initialized from command line. | 281 // Whether this object has been initialized from command line. |
| 279 bool initialized_from_command_line_ = false; | 282 bool initialized_from_command_line_ = false; |
| 280 | 283 |
| 281 DISALLOW_COPY_AND_ASSIGN(FeatureList); | 284 DISALLOW_COPY_AND_ASSIGN(FeatureList); |
| 282 }; | 285 }; |
| 283 | 286 |
| 284 } // namespace base | 287 } // namespace base |
| 285 | 288 |
| 286 #endif // BASE_FEATURE_LIST_H_ | 289 #endif // BASE_FEATURE_LIST_H_ |
| OLD | NEW |