Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Side by Side Diff: chrome/common/extensions/extension_switch_utils.h

Issue 10565017: Parse the script_badge manifest section. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix more review comments, and make script_badge_ non-mutable Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698