| 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/extension_switch_utils.h" | 5 #include "chrome/common/extensions/extension_switch_utils.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/common/chrome_switches.h" | 8 #include "chrome/common/chrome_switches.h" |
| 9 | 9 |
| 10 namespace extensions { | 10 namespace extensions { |
| 11 | 11 |
| 12 namespace switch_utils { | 12 namespace switch_utils { |
| 13 | 13 |
| 14 bool IsEasyOffStoreInstallEnabled() { | 14 bool IsEasyOffStoreInstallEnabled() { |
| 15 // Disabling easy off-store installation is not yet implemented for Aura. Not | 15 // Disabling easy off-store installation is not yet implemented for Aura. Not |
| 16 // sure what the Aura equivalent for this UI is. | 16 // sure what the Aura equivalent for this UI is. |
| 17 #if defined(USE_AURA) | 17 #if defined(USE_AURA) |
| 18 return true; | 18 return true; |
| 19 #else | 19 #else |
| 20 return CommandLine::ForCurrentProcess()->HasSwitch( | 20 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 21 switches::kEnableEasyOffStoreExtensionInstall); | 21 switches::kEnableEasyOffStoreExtensionInstall); |
| 22 #endif | 22 #endif |
| 23 } | 23 } |
| 24 | 24 |
| 25 bool IsActionBoxEnabled() { | 25 bool IsActionBoxEnabled() { |
| 26 return CommandLine::ForCurrentProcess()->HasSwitch( | 26 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 27 switches::kEnableActionBox); | 27 switches::kEnableActionBox); |
| 28 } | 28 } |
| 29 | 29 |
| 30 bool IsExtensionsInActionBoxEnabled() { |
| 31 return IsActionBoxEnabled() && CommandLine::ForCurrentProcess()->HasSwitch( |
| 32 switches::kEnableExtensionsInActionBox); |
| 33 } |
| 34 |
| 30 bool AreScriptBadgesEnabled() { | 35 bool AreScriptBadgesEnabled() { |
| 31 return CommandLine::ForCurrentProcess()->HasSwitch( | 36 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 32 switches::kEnableScriptBadges); | 37 switches::kEnableScriptBadges); |
| 33 } | 38 } |
| 34 | 39 |
| 35 } // switch_utils | 40 } // switch_utils |
| 36 | 41 |
| 37 } // extensions | 42 } // extensions |
| OLD | NEW |