Chromium Code Reviews| Index: chrome/common/extensions/feature_switch.cc |
| diff --git a/chrome/common/extensions/feature_switch.cc b/chrome/common/extensions/feature_switch.cc |
| index 0bf53f38e8b126cc36495319adf9ae41be02a6d5..cd5e18505f023b995d5d9ed07b6b4284725cefce 100644 |
| --- a/chrome/common/extensions/feature_switch.cc |
| +++ b/chrome/common/extensions/feature_switch.cc |
| @@ -8,6 +8,7 @@ |
| #include "base/lazy_instance.h" |
| #include "base/string_util.h" |
| #include "chrome/common/chrome_switches.h" |
| +#include "content/public/common/content_switches.h" |
| namespace extensions { |
| @@ -30,6 +31,9 @@ class CommonSwitches { |
| FeatureSwitch::DEFAULT_DISABLED), |
| script_bubble( |
| switches::kScriptBubble, |
| + FeatureSwitch::DEFAULT_DISABLED), |
| + tab_capture( |
| + switches::kEnableTabCapture, |
| FeatureSwitch::DEFAULT_DISABLED) { |
| // Disabling easy off-store installation is not yet implemented for Aura. Not |
| // sure what the Aura equivalent for this UI is. |
| @@ -48,6 +52,7 @@ class CommonSwitches { |
| FeatureSwitch extensions_in_action_box; |
| FeatureSwitch script_badges; |
| FeatureSwitch script_bubble; |
| + FeatureSwitch tab_capture; |
| }; |
| base::LazyInstance<CommonSwitches> g_common_switches = |
| @@ -71,6 +76,9 @@ FeatureSwitch* FeatureSwitch::script_badges() { |
| FeatureSwitch* FeatureSwitch::script_bubble() { |
| return &g_common_switches.Get().script_bubble; |
| } |
| +FeatureSwitch* FeatureSwitch::tab_capture() { |
| + return &g_common_switches.Get().tab_capture; |
| +} |
| FeatureSwitch::ScopedOverride::ScopedOverride(FeatureSwitch* feature, |
| @@ -125,6 +133,9 @@ bool FeatureSwitch::IsEnabled() const { |
| if (default_value_ && command_line_->HasSwitch(GetLegacyDisableFlag())) |
| return false; |
| + if (command_line_->HasSwitch(switch_name_)) |
|
Aaron Boodman
2012/10/17 20:28:14
Should not be necessary (GetLegacyEnableFlag() sho
justinlin
2012/10/17 23:41:48
The problem is the key is switches::kEnableTabCapt
Aaron Boodman
2012/10/18 22:51:35
So change kEnableTabCapture to "tab-capture" (prob
justinlin
2012/10/19 00:03:33
Done.
|
| + return true; |
| + |
| return default_value_; |
| } |