Chromium Code Reviews| 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 // TODO(jyasskin): Convert this to a generic switch system that wraps the whole | |
| 18 // interaction with CommandLine::HasSwitch and doesn't require globals. | |
|
not at google - send to devlin
2012/06/18 22:59:41
yeah, seems like this functionality would be nice
| |
| 19 enum EnabledState { | |
| 20 ENABLED, | |
| 21 DISABLED | |
| 22 }; | |
| 23 | |
| 24 // Using this makes all other access to IsActionBoxEnabled NOT thread-safe. | |
| 25 class ScopedSetActionBoxForTest { | |
| 26 public: | |
| 27 explicit ScopedSetActionBoxForTest(EnabledState); | |
| 28 ~ScopedSetActionBoxForTest(); | |
| 29 }; | |
| 30 | |
| 17 } // switch_utils | 31 } // switch_utils |
| 18 | 32 |
| 19 } // extensions | 33 } // extensions |
| 20 | 34 |
| 21 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_SWITCH_UTILS_H_ | 35 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_SWITCH_UTILS_H_ |
| OLD | NEW |