| 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 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_SWITCH_UTILS_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_SWITCH_UTILS_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_SWITCH_UTILS_H_ | 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_SWITCH_UTILS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 namespace extensions { | 9 namespace extensions { |
| 10 | 10 |
| 11 namespace switch_utils { | 11 namespace switch_utils { |
| 12 | 12 |
| 13 bool IsEasyOffStoreInstallEnabled(); | 13 bool IsEasyOffStoreInstallEnabled(); |
| 14 | 14 |
| 15 bool IsActionBoxEnabled(); | 15 bool IsActionBoxEnabled(); |
| 16 | 16 |
| 17 bool AreScriptBadgesEnabled(); | 17 bool AreScriptBadgesEnabled(); |
| 18 | 18 |
| 19 // TODO(jyasskin): Convert this to a generic switch system that wraps the whole |
| 20 // interaction with CommandLine::HasSwitch and doesn't require globals. |
| 21 enum EnabledState { |
| 22 ENABLED, |
| 23 DISABLED |
| 24 }; |
| 25 |
| 26 // Using this makes all other access to AreScriptBadgesEnabled NOT thread-safe. |
| 27 class ScopedSetScriptBadgeForTest { |
| 28 public: |
| 29 explicit ScopedSetScriptBadgeForTest(EnabledState); |
| 30 ~ScopedSetScriptBadgeForTest(); |
| 31 }; |
| 32 |
| 19 } // switch_utils | 33 } // switch_utils |
| 20 | 34 |
| 21 } // extensions | 35 } // extensions |
| 22 | 36 |
| 23 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_SWITCH_UTILS_H_ | 37 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_SWITCH_UTILS_H_ |
| OLD | NEW |