| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/common/extensions/feature_switch.h" | 5 #include "extensions/common/feature_switch.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| 11 #include "chrome/common/chrome_switches.h" | |
| 12 #include "extensions/common/switches.h" | 11 #include "extensions/common/switches.h" |
| 13 | 12 |
| 14 namespace extensions { | 13 namespace extensions { |
| 15 | 14 |
| 16 namespace { | 15 namespace { |
| 17 | 16 |
| 18 class CommonSwitches { | 17 class CommonSwitches { |
| 19 public: | 18 public: |
| 20 CommonSwitches() | 19 CommonSwitches() |
| 21 : easy_off_store_install( | 20 : easy_off_store_install( |
| 22 ::switches::kEasyOffStoreExtensionInstall, | 21 switches::kEasyOffStoreExtensionInstall, |
| 23 FeatureSwitch::DEFAULT_DISABLED), | 22 FeatureSwitch::DEFAULT_DISABLED), |
| 24 global_commands( | 23 global_commands( |
| 25 ::switches::kGlobalCommands, | 24 switches::kGlobalCommands, |
| 26 FeatureSwitch::DEFAULT_DISABLED), | 25 FeatureSwitch::DEFAULT_DISABLED), |
| 27 script_badges( | 26 script_badges( |
| 28 ::switches::kScriptBadges, | 27 switches::kScriptBadges, |
| 29 FeatureSwitch::DEFAULT_DISABLED), | 28 FeatureSwitch::DEFAULT_DISABLED), |
| 30 script_bubble( | 29 script_bubble( |
| 31 ::switches::kScriptBubble, | 30 switches::kScriptBubble, |
| 32 FeatureSwitch::DEFAULT_DISABLED), | 31 FeatureSwitch::DEFAULT_DISABLED), |
| 33 prompt_for_external_extensions( | 32 prompt_for_external_extensions( |
| 34 ::switches::kPromptForExternalExtensions, | 33 switches::kPromptForExternalExtensions, |
| 35 #if defined(OS_WIN) | 34 #if defined(OS_WIN) |
| 36 FeatureSwitch::DEFAULT_ENABLED), | 35 FeatureSwitch::DEFAULT_ENABLED), |
| 37 #else | 36 #else |
| 38 FeatureSwitch::DEFAULT_DISABLED), | 37 FeatureSwitch::DEFAULT_DISABLED), |
| 39 #endif | 38 #endif |
| 40 error_console( | 39 error_console( |
| 41 switches::kErrorConsole, | 40 switches::kErrorConsole, |
| 42 FeatureSwitch::DEFAULT_DISABLED) {} | 41 FeatureSwitch::DEFAULT_DISABLED) {} |
| 43 | 42 |
| 44 FeatureSwitch easy_off_store_install; | 43 FeatureSwitch easy_off_store_install; |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 137 |
| 139 void FeatureSwitch::SetOverrideValue(OverrideValue override_value) { | 138 void FeatureSwitch::SetOverrideValue(OverrideValue override_value) { |
| 140 override_value_ = override_value; | 139 override_value_ = override_value; |
| 141 } | 140 } |
| 142 | 141 |
| 143 FeatureSwitch::OverrideValue FeatureSwitch::GetOverrideValue() const { | 142 FeatureSwitch::OverrideValue FeatureSwitch::GetOverrideValue() const { |
| 144 return override_value_; | 143 return override_value_; |
| 145 } | 144 } |
| 146 | 145 |
| 147 } // namespace extensions | 146 } // namespace extensions |
| OLD | NEW |