Index: extensions/common/feature_switch.h |
diff --git a/extensions/common/feature_switch.h b/extensions/common/feature_switch.h |
index c170f9c2fb8f91cd74ef99130fc9630d3d1492e0..93e11f145586b8557fbeeea4542363da730122e0 100644 |
--- a/extensions/common/feature_switch.h |
+++ b/extensions/common/feature_switch.h |
@@ -6,6 +6,7 @@ |
#define EXTENSIONS_COMMON_FEATURE_SWITCH_H_ |
#include <string> |
+#include <vector> |
#include "base/macros.h" |
@@ -27,7 +28,9 @@ namespace extensions { |
// 3. If there is a switch name, and the switch is present in the command line, |
// the command line value will be used. |
// 4. If there is a finch experiment associated and applicable to the machine, |
-// the finch value will be used. |
+// the finch value will be used. In order for the feature to be enabled by |
+// finch experiment, the machine must be in the "Enabled" group for the |
+// experiment and all dependent experiments. |
// 5. Otherwise, the default value is used. |
class FeatureSwitch { |
public: |
@@ -72,13 +75,19 @@ class FeatureSwitch { |
FeatureSwitch(const char* switch_name, |
const char* field_trial_name, |
DefaultValue default_value); |
+ FeatureSwitch(const char* switch_name, |
+ const char* field_trial_name, |
+ const std::vector<const char*>& dependent_field_trials, |
Devlin
2016/02/09 18:45:14
"dependent" is the wrong word here - it should pro
imcheng
2016/02/09 21:35:39
Done.
|
+ DefaultValue default_value); |
FeatureSwitch(const base::CommandLine* command_line, |
const char* switch_name, |
DefaultValue default_value); |
FeatureSwitch(const base::CommandLine* command_line, |
const char* switch_name, |
const char* field_trial_name, |
+ const std::vector<const char*>& dependent_field_trials, |
DefaultValue default_value); |
+ ~FeatureSwitch(); |
// Consider using ScopedOverride instead. |
void SetOverrideValue(OverrideValue value); |
@@ -89,10 +98,12 @@ class FeatureSwitch { |
private: |
std::string GetLegacyEnableFlag() const; |
std::string GetLegacyDisableFlag() const; |
+ bool DependentFieldTrialsEnabled() const; |
const base::CommandLine* command_line_; |
const char* switch_name_; |
const char* field_trial_name_; |
+ std::vector<const char*> dependent_field_trials_; |
Devlin
2016/02/09 18:45:14
this should probably just be std::vector<std::stri
imcheng
2016/02/09 21:35:39
Done.
|
bool default_value_; |
OverrideValue override_value_; |